Coin Logo http://www.sim.no
http://www.coin3d.org

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  *
00008  *  This file is part of the Coin 3D visualization library.
00009  *  Copyright (C) by Kongsberg Oil & Gas Technologies.
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 Kongsberg Oil & Gas Technologies
00020  *  about acquiring a Coin Professional Edition License.
00021  *
00022  *  See http://www.coin3d.org/ for more information.
00023  *
00024  *  Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
00025  *  http://www.sim.no/  sales@sim.no  coin-support@coin3d.org
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   const char * getRightWheelString() const;
00114   QWidget * getRightWheelLabelWidget(void) const;
00115 
00116   virtual SbBool processSoEvent(const SoEvent * const event);
00117 
00118 protected:
00119   QWidget * leftWheel;
00120   QWidget * rightWheel;
00121   QWidget * bottomWheel;
00122 
00123   QWidget * leftDecoration;
00124   QWidget * rightDecoration;
00125   QWidget * bottomDecoration;
00126 
00127   QWidget * leftWheelLabel;
00128   char * leftWheelStr;
00129   float leftWheelVal;
00130 
00131   QWidget * rightWheelLabel;
00132   char * rightWheelStr;
00133   float rightWheelVal;
00134 
00135   QWidget * bottomWheelLabel;
00136   char * bottomWheelStr;
00137   float bottomWheelVal;
00138 
00139   SoQtPopupMenu * prefmenu;
00140 
00141 private:
00142   // Private class for implementation hiding. The idiom we're using is
00143   // a variant of what is known as the "Cheshire Cat", and is also
00144   // described as the "Bridge" pattern in «Design Patterns» by Gamma
00145   // et al (aka The Gang Of Four).
00146   class SoQtFullViewerP * pimpl;
00147 
00148   friend class SoGuiFullViewerP;
00149   friend class SoQtFullViewerP;
00150 
00151 
00152 
00153 // FIXME: get rid of non-templatized code. 20020108 mortene.
00154 
00155 #ifdef __COIN_SOXT__ // FIXME: get rid of non-templatized code. 20020108 mortene.
00156 protected:
00157   Widget buildFunctionsSubmenu(Widget popup);
00158   Widget buildDrawStyleSubmenu(Widget popup);
00159 
00160   char * popupTitle;
00161   SbBool popupEnabled;
00162   SbPList * viewerButtonWidgets;
00163 #endif // __COIN_SOXT__
00164 };
00165 
00166 // *************************************************************************
00167 
00168 #endif // ! SOQT_FULLVIEWER_H

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

Generated on Sun Dec 1 2013 03:16:16 for SoQt by Doxygen 1.7.5.1.