Coin Logo http://www.coin3d.org/
http://www.kongsberg.com/kogt/

SoQtFullViewer.h

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  * Copyright (c) Kongsberg Oil & Gas Technologies AS
00008  * All rights reserved.
00009  * 
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions are
00012  * met:
00013  * 
00014  * Redistributions of source code must retain the above copyright notice,
00015  * this list of conditions and the following disclaimer.
00016  * 
00017  * Redistributions in binary form must reproduce the above copyright
00018  * notice, this list of conditions and the following disclaimer in the
00019  * documentation and/or other materials provided with the distribution.
00020  * 
00021  * Neither the name of the copyright holder nor the names of its
00022  * contributors may be used to endorse or promote products derived from
00023  * this software without specific prior written permission.
00024  * 
00025  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00026  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00027  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00028  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00029  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00030  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00031  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00032  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00033  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00034  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00035  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 \**************************************************************************/
00037 
00038 #include <Inventor/Qt/viewers/SoQtViewer.h>
00039 
00040 class SoQtPopupMenu;
00041 
00042 // *************************************************************************
00043 
00044 class SOQT_DLL_API SoQtFullViewer : public SoQtViewer {
00045   SOQT_OBJECT_ABSTRACT_HEADER(SoQtFullViewer, SoQtViewer);
00046 
00047 public:
00048   enum BuildFlag {
00049     BUILD_NONE       = 0x00,
00050     BUILD_DECORATION = 0x01,
00051     BUILD_POPUP      = 0x02,
00052     BUILD_ALL        = (BUILD_DECORATION | BUILD_POPUP)
00053   };
00054 
00055   void setDecoration(const SbBool on);
00056   SbBool isDecoration(void) const;
00057 
00058   void setPopupMenuEnabled(const SbBool on);
00059   SbBool isPopupMenuEnabled(void) const;
00060 
00061   QWidget * getAppPushButtonParent(void) const;
00062   void addAppPushButton(QWidget * newButton);
00063   void insertAppPushButton(QWidget * newButton, int index);
00064   void removeAppPushButton(QWidget * oldButton);
00065   int findAppPushButton(QWidget * oldButton) const;
00066   int lengthAppPushButton(void) const;
00067 
00068   QWidget * getRenderAreaWidget(void) const;
00069 
00070   virtual void setViewing(SbBool on);
00071 
00072   virtual void setComponentCursor(const SoQtCursor & cursor);
00073 
00074 protected:
00075   SoQtFullViewer(QWidget * parent,
00076                     const char * name,
00077                     SbBool embed,
00078                     BuildFlag flag,
00079                     Type type,
00080                     SbBool build);
00081   ~SoQtFullViewer();
00082 
00083   virtual void sizeChanged(const SbVec2s & size);
00084 
00085   QWidget * buildWidget(QWidget * parent);
00086 
00087   virtual void buildDecoration(QWidget * parent);
00088   virtual QWidget * buildLeftTrim(QWidget * parent);
00089   virtual QWidget * buildBottomTrim(QWidget * parent);
00090   virtual QWidget * buildRightTrim(QWidget * parent);
00091   QWidget * buildAppButtons(QWidget * parent);
00092   QWidget * buildViewerButtons(QWidget * parent);
00093   virtual void createViewerButtons(QWidget * parent, SbPList * buttonlist);
00094 
00095   virtual void buildPopupMenu(void);
00096   virtual void setPopupMenuString(const char * title);
00097   virtual void openPopupMenu(const SbVec2s position);
00098 
00099   virtual void leftWheelStart(void);
00100   virtual void leftWheelMotion(float);
00101   virtual void leftWheelFinish(void);
00102   float getLeftWheelValue(void) const;
00103   void setLeftWheelValue(const float value);
00104 
00105   virtual void bottomWheelStart(void);
00106   virtual void bottomWheelMotion(float);
00107   virtual void bottomWheelFinish(void);
00108   float getBottomWheelValue(void) const;
00109   void setBottomWheelValue(const float value);
00110 
00111   virtual void rightWheelStart(void);
00112   virtual void rightWheelMotion(float);
00113   virtual void rightWheelFinish(void);
00114   float getRightWheelValue(void) const;
00115   void setRightWheelValue(const float value);
00116 
00117   void setLeftWheelString(const char * const name);
00118   QWidget * getLeftWheelLabelWidget(void) const;
00119   void setBottomWheelString(const char * const name);
00120   QWidget * getBottomWheelLabelWidget(void) const;
00121   void setRightWheelString(const char * const name);
00122   const char * getRightWheelString() const;
00123   QWidget * getRightWheelLabelWidget(void) const;
00124 
00125   virtual SbBool processSoEvent(const SoEvent * const event);
00126 
00127 protected:
00128   QWidget * leftWheel;
00129   QWidget * rightWheel;
00130   QWidget * bottomWheel;
00131 
00132   QWidget * leftDecoration;
00133   QWidget * rightDecoration;
00134   QWidget * bottomDecoration;
00135 
00136   QWidget * leftWheelLabel;
00137   char * leftWheelStr;
00138   float leftWheelVal;
00139 
00140   QWidget * rightWheelLabel;
00141   char * rightWheelStr;
00142   float rightWheelVal;
00143 
00144   QWidget * bottomWheelLabel;
00145   char * bottomWheelStr;
00146   float bottomWheelVal;
00147 
00148   SoQtPopupMenu * prefmenu;
00149 
00150 private:
00151   // Private class for implementation hiding. The idiom we're using is
00152   // a variant of what is known as the "Cheshire Cat", and is also
00153   // described as the "Bridge" pattern in «Design Patterns» by Gamma
00154   // et al (aka The Gang Of Four).
00155   class SoQtFullViewerP * pimpl;
00156 
00157   friend class SoGuiFullViewerP;
00158   friend class SoQtFullViewerP;
00159 
00160 
00161 
00162 // FIXME: get rid of non-templatized code. 20020108 mortene.
00163 
00164 #ifdef __COIN_SOXT__ // FIXME: get rid of non-templatized code. 20020108 mortene.
00165 protected:
00166   Widget buildFunctionsSubmenu(Widget popup);
00167   Widget buildDrawStyleSubmenu(Widget popup);
00168 
00169   char * popupTitle;
00170   SbBool popupEnabled;
00171   SbPList * viewerButtonWidgets;
00172 #endif // __COIN_SOXT__
00173 };
00174 
00175 // *************************************************************************
00176 
00177 #endif // ! SOQT_FULLVIEWER_H

Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Mon Sep 7 11:22:57 2015 for SoQt by Doxygen 1.5.6.