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

SoQtFullViewer.h
1 #ifndef SOQT_FULLVIEWER_H
2 #define SOQT_FULLVIEWER_H
3 
4 // src/Inventor/Qt/viewers/SoQtFullViewer.h. Generated from SoGuiFullViewer.h.in by configure.
5 
6 /**************************************************************************\
7  *
8  * This file is part of the Coin 3D visualization library.
9  * Copyright (C) by Kongsberg Oil & Gas Technologies.
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * ("GPL") version 2 as published by the Free Software Foundation.
14  * See the file LICENSE.GPL at the root directory of this source
15  * distribution for additional information about the GNU GPL.
16  *
17  * For using Coin with software that can not be combined with the GNU
18  * GPL, and for taking advantage of the additional benefits of our
19  * support services, please contact Kongsberg Oil & Gas Technologies
20  * about acquiring a Coin Professional Edition License.
21  *
22  * See http://www.coin3d.org/ for more information.
23  *
24  * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
25  * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
26  *
27 \**************************************************************************/
28 
29 #include <Inventor/Qt/viewers/SoQtViewer.h>
30 
31 class SoQtPopupMenu;
32 
33 // *************************************************************************
34 
35 class SOQT_DLL_API SoQtFullViewer : public SoQtViewer {
36  SOQT_OBJECT_ABSTRACT_HEADER(SoQtFullViewer, SoQtViewer);
37 
38 public:
39  enum BuildFlag {
40  BUILD_NONE = 0x00,
41  BUILD_DECORATION = 0x01,
42  BUILD_POPUP = 0x02,
43  BUILD_ALL = (BUILD_DECORATION | BUILD_POPUP)
44  };
45 
46  void setDecoration(const SbBool on);
47  SbBool isDecoration(void) const;
48 
49  void setPopupMenuEnabled(const SbBool on);
50  SbBool isPopupMenuEnabled(void) const;
51 
52  QWidget * getAppPushButtonParent(void) const;
53  void addAppPushButton(QWidget * newButton);
54  void insertAppPushButton(QWidget * newButton, int index);
55  void removeAppPushButton(QWidget * oldButton);
56  int findAppPushButton(QWidget * oldButton) const;
57  int lengthAppPushButton(void) const;
58 
59  QWidget * getRenderAreaWidget(void) const;
60 
61  virtual void setViewing(SbBool on);
62 
63  virtual void setComponentCursor(const SoQtCursor & cursor);
64 
65 protected:
66  SoQtFullViewer(QWidget * parent,
67  const char * name,
68  SbBool embed,
69  BuildFlag flag,
70  Type type,
71  SbBool build);
72  ~SoQtFullViewer();
73 
74  virtual void sizeChanged(const SbVec2s & size);
75 
76  QWidget * buildWidget(QWidget * parent);
77 
78  virtual void buildDecoration(QWidget * parent);
79  virtual QWidget * buildLeftTrim(QWidget * parent);
80  virtual QWidget * buildBottomTrim(QWidget * parent);
81  virtual QWidget * buildRightTrim(QWidget * parent);
82  QWidget * buildAppButtons(QWidget * parent);
83  QWidget * buildViewerButtons(QWidget * parent);
84  virtual void createViewerButtons(QWidget * parent, SbPList * buttonlist);
85 
86  virtual void buildPopupMenu(void);
87  virtual void setPopupMenuString(const char * title);
88  virtual void openPopupMenu(const SbVec2s position);
89 
90  virtual void leftWheelStart(void);
91  virtual void leftWheelMotion(float);
92  virtual void leftWheelFinish(void);
93  float getLeftWheelValue(void) const;
94  void setLeftWheelValue(const float value);
95 
96  virtual void bottomWheelStart(void);
97  virtual void bottomWheelMotion(float);
98  virtual void bottomWheelFinish(void);
99  float getBottomWheelValue(void) const;
100  void setBottomWheelValue(const float value);
101 
102  virtual void rightWheelStart(void);
103  virtual void rightWheelMotion(float);
104  virtual void rightWheelFinish(void);
105  float getRightWheelValue(void) const;
106  void setRightWheelValue(const float value);
107 
108  void setLeftWheelString(const char * const name);
109  QWidget * getLeftWheelLabelWidget(void) const;
110  void setBottomWheelString(const char * const name);
111  QWidget * getBottomWheelLabelWidget(void) const;
112  void setRightWheelString(const char * const name);
113  const char * getRightWheelString() const;
114  QWidget * getRightWheelLabelWidget(void) const;
115 
116  virtual SbBool processSoEvent(const SoEvent * const event);
117 
118 protected:
119  QWidget * leftWheel;
120  QWidget * rightWheel;
121  QWidget * bottomWheel;
122 
123  QWidget * leftDecoration;
124  QWidget * rightDecoration;
125  QWidget * bottomDecoration;
126 
127  QWidget * leftWheelLabel;
128  char * leftWheelStr;
130 
131  QWidget * rightWheelLabel;
134 
135  QWidget * bottomWheelLabel;
138 
139  SoQtPopupMenu * prefmenu;
140 
141 private:
142  // Private class for implementation hiding. The idiom we're using is
143  // a variant of what is known as the "Cheshire Cat", and is also
144  // described as the "Bridge" pattern in «Design Patterns» by Gamma
145  // et al (aka The Gang Of Four).
146  class SoQtFullViewerP * pimpl;
147 
148  friend class SoGuiFullViewerP;
149  friend class SoQtFullViewerP;
150 
151 
152 
153 // FIXME: get rid of non-templatized code. 20020108 mortene.
154 
155 #ifdef __COIN_SOXT__ // FIXME: get rid of non-templatized code. 20020108 mortene.
156 protected:
157  Widget buildFunctionsSubmenu(Widget popup);
158  Widget buildDrawStyleSubmenu(Widget popup);
159 
160  char * popupTitle;
161  SbBool popupEnabled;
162  SbPList * viewerButtonWidgets;
163 #endif // __COIN_SOXT__
164 };
165 
166 // *************************************************************************
167 
168 #endif // ! SOQT_FULLVIEWER_H
virtual SbBool processSoEvent(const SoEvent *const event)
Definition: SoQtViewer.cpp:3642
float leftWheelVal
Definition: SoQtFullViewer.h:129
QWidget * leftDecoration
Definition: SoQtFullViewer.h:123
BuildFlag
Definition: SoQtFullViewer.h:39
The SoQtViewer class is the top level base viewer class.This is an abstract class, which adds the following features to it&#39;s SoQtRenderArea superclass: convenient methods for camera handling, an automatic headlight configuration.
Definition: SoQtViewer.h:81
float bottomWheelVal
Definition: SoQtFullViewer.h:137
float rightWheelVal
Definition: SoQtFullViewer.h:133
QWidget * leftWheelLabel
Definition: SoQtFullViewer.h:127
QWidget * bottomWheelLabel
Definition: SoQtFullViewer.h:135
QWidget * bottomDecoration
Definition: SoQtFullViewer.h:125
QWidget * bottomWheel
Definition: SoQtFullViewer.h:121
QWidget * rightDecoration
Definition: SoQtFullViewer.h:124
virtual void sizeChanged(const SbVec2s &size)
Definition: SoQtViewer.cpp:3633
virtual void setViewing(SbBool enable)
Definition: SoQtViewer.cpp:2129
SoQtPopupMenu * prefmenu
Definition: SoQtFullViewer.h:139
QWidget * rightWheel
Definition: SoQtFullViewer.h:120
char * leftWheelStr
Definition: SoQtFullViewer.h:128
char * rightWheelStr
Definition: SoQtFullViewer.h:132
QWidget * leftWheel
Definition: SoQtFullViewer.h:119
char * bottomWheelStr
Definition: SoQtFullViewer.h:136
The SoQtCursor class is used to set cursors for GUI components.The class provides both a set of pre-d...
Definition: SoQtCursor.h:32
virtual void setComponentCursor(const SoQtCursor &cursor)
Definition: SoQtComponent.cpp:962
QWidget * rightWheelLabel
Definition: SoQtFullViewer.h:131
The SoQtFullViewer class adds some user interface components to the viewer canvas.The SoQtFullViewer is an abstract viewer class which extends it&#39;s superclass (the basic SoQtViewer class) with two major user interface additions:
Definition: SoQtFullViewer.h:35

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

Generated on Wed Feb 7 2018 for SoQt by Doxygen 1.8.14.