~ubuntu-branches/ubuntu/oneiric/soqt/oneiric

« back to all changes in this revision

Viewing changes to build/msvc7/src/Inventor/Qt/viewers/SoQtFullViewer.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2006-02-06 22:34:00 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060206223400-g69m5soqa4zh0gkc
Tags: 1.3.0-3
debian/control: update libsoqt-dev depends.  Closes: #351700.

Show diffs side-by-side

added added

removed removed

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