![]() |
http://www.sim.no http://www.coin3d.org |
00001 #ifndef SOQT_FULLVIEWER_H 00002 #define SOQT_FULLVIEWER_H 00003 00004 // src/Inventor/Qt/viewers/SoQtFullViewer.h. Generated from SoGuiFullViewer.h.in by configure. 00005 00006 /**************************************************************************\ 00007 * 00008 * This file is part of the Coin 3D visualization library. 00009 * Copyright (C) 1998-2005 by Systems in Motion. All rights reserved. 00010 * 00011 * This library is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU General Public License 00013 * ("GPL") version 2 as published by the Free Software Foundation. 00014 * See the file LICENSE.GPL at the root directory of this source 00015 * distribution for additional information about the GNU GPL. 00016 * 00017 * For using Coin with software that can not be combined with the GNU 00018 * GPL, and for taking advantage of the additional benefits of our 00019 * support services, please contact Systems in Motion about acquiring 00020 * a Coin Professional Edition License. 00021 * 00022 * See <URL:http://www.coin3d.org/> for more information. 00023 * 00024 * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY. 00025 * <URL:http://www.sim.no/>. 00026 * 00027 \**************************************************************************/ 00028 00029 #include <Inventor/Qt/viewers/SoQtViewer.h> 00030 00031 class SoQtPopupMenu; 00032 00033 // ************************************************************************* 00034 00035 class SOQT_DLL_API SoQtFullViewer : public SoQtViewer { 00036 SOQT_OBJECT_ABSTRACT_HEADER(SoQtFullViewer, SoQtViewer); 00037 00038 public: 00039 enum BuildFlag { 00040 BUILD_NONE = 0x00, 00041 BUILD_DECORATION = 0x01, 00042 BUILD_POPUP = 0x02, 00043 BUILD_ALL = (BUILD_DECORATION | BUILD_POPUP) 00044 }; 00045 00046 void setDecoration(const SbBool on); 00047 SbBool isDecoration(void) const; 00048 00049 void setPopupMenuEnabled(const SbBool on); 00050 SbBool isPopupMenuEnabled(void) const; 00051 00052 QWidget * getAppPushButtonParent(void) const; 00053 void addAppPushButton(QWidget * newButton); 00054 void insertAppPushButton(QWidget * newButton, int index); 00055 void removeAppPushButton(QWidget * oldButton); 00056 int findAppPushButton(QWidget * oldButton) const; 00057 int lengthAppPushButton(void) const; 00058 00059 QWidget * getRenderAreaWidget(void) const; 00060 00061 virtual void setViewing(SbBool on); 00062 00063 virtual void setComponentCursor(const SoQtCursor & cursor); 00064 00065 protected: 00066 SoQtFullViewer(QWidget * parent, 00067 const char * name, 00068 SbBool embed, 00069 BuildFlag flag, 00070 Type type, 00071 SbBool build); 00072 ~SoQtFullViewer(); 00073 00074 virtual void sizeChanged(const SbVec2s & size); 00075 00076 QWidget * buildWidget(QWidget * parent); 00077 00078 virtual void buildDecoration(QWidget * parent); 00079 virtual QWidget * buildLeftTrim(QWidget * parent); 00080 virtual QWidget * buildBottomTrim(QWidget * parent); 00081 virtual QWidget * buildRightTrim(QWidget * parent); 00082 QWidget * buildAppButtons(QWidget * parent); 00083 QWidget * buildViewerButtons(QWidget * parent); 00084 virtual void createViewerButtons(QWidget * parent, SbPList * buttonlist); 00085 00086 virtual void buildPopupMenu(void); 00087 virtual void setPopupMenuString(const char * title); 00088 virtual void openPopupMenu(const SbVec2s position); 00089 00090 virtual void leftWheelStart(void); 00091 virtual void leftWheelMotion(float); 00092 virtual void leftWheelFinish(void); 00093 float getLeftWheelValue(void) const; 00094 void setLeftWheelValue(const float value); 00095 00096 virtual void bottomWheelStart(void); 00097 virtual void bottomWheelMotion(float); 00098 virtual void bottomWheelFinish(void); 00099 float getBottomWheelValue(void) const; 00100 void setBottomWheelValue(const float value); 00101 00102 virtual void rightWheelStart(void); 00103 virtual void rightWheelMotion(float); 00104 virtual void rightWheelFinish(void); 00105 float getRightWheelValue(void) const; 00106 void setRightWheelValue(const float value); 00107 00108 void setLeftWheelString(const char * const name); 00109 QWidget * getLeftWheelLabelWidget(void) const; 00110 void setBottomWheelString(const char * const name); 00111 QWidget * getBottomWheelLabelWidget(void) const; 00112 void setRightWheelString(const char * const name); 00113 QWidget * getRightWheelLabelWidget(void) const; 00114 00115 virtual SbBool processSoEvent(const SoEvent * const event); 00116 00117 protected: 00118 QWidget * leftWheel; 00119 QWidget * rightWheel; 00120 QWidget * bottomWheel; 00121 00122 QWidget * leftDecoration; 00123 QWidget * rightDecoration; 00124 QWidget * bottomDecoration; 00125 00126 QWidget * leftWheelLabel; 00127 char * leftWheelStr; 00128 float leftWheelVal; 00129 00130 QWidget * rightWheelLabel; 00131 char * rightWheelStr; 00132 float rightWheelVal; 00133 00134 QWidget * bottomWheelLabel; 00135 char * bottomWheelStr; 00136 float bottomWheelVal; 00137 00138 SoQtPopupMenu * prefmenu; 00139 00140 private: 00141 // Private class for implementation hiding. The idiom we're using is 00142 // a variant of what is known as the "Cheshire Cat", and is also 00143 // described as the "Bridge" pattern in «Design Patterns» by Gamma 00144 // et al (aka The Gang Of Four). 00145 class SoQtFullViewerP * pimpl; 00146 00147 friend class SoGuiFullViewerP; 00148 friend class SoQtFullViewerP; 00149 00150 00151 00152 // FIXME: get rid of non-templatized code. 20020108 mortene. 00153 00154 #ifdef __COIN_SOXT__ // FIXME: get rid of non-templatized code. 20020108 mortene. 00155 protected: 00156 Widget buildFunctionsSubmenu(Widget popup); 00157 Widget buildDrawStyleSubmenu(Widget popup); 00158 00159 char * popupTitle; 00160 SbBool popupEnabled; 00161 SbPList * viewerButtonWidgets; 00162 #endif // __COIN_SOXT__ 00163 }; 00164 00165 // ************************************************************************* 00166 00167 #endif // ! SOQT_FULLVIEWER_H
Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.
Generated on Fri Aug 27 2010 06:24:30 for SoQt by Doxygen. 1.7.1