1
/**************************************************************************\
3
* This file is part of the Coin 3D visualization library.
4
* Copyright (C) 1998-2005 by Systems in Motion. All rights reserved.
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.
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.
17
* See <URL:http://www.coin3d.org/> for more information.
19
* Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
20
* <URL:http://www.sim.no/>.
22
\**************************************************************************/
24
#ifndef SOQT_FULLVIEWER_H
25
#define SOQT_FULLVIEWER_H
27
#include <Inventor/Qt/viewers/SoQtViewer.h>
31
// *************************************************************************
33
class SOQT_DLL_API SoQtFullViewer : public SoQtViewer {
34
SOQT_OBJECT_ABSTRACT_HEADER(SoQtFullViewer, SoQtViewer);
39
BUILD_DECORATION = 0x01,
41
BUILD_ALL = (BUILD_DECORATION | BUILD_POPUP)
44
void setDecoration(const SbBool on);
45
SbBool isDecoration(void) const;
47
void setPopupMenuEnabled(const SbBool on);
48
SbBool isPopupMenuEnabled(void) const;
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;
57
QWidget * getRenderAreaWidget(void) const;
59
virtual void setViewing(SbBool on);
61
virtual void setComponentCursor(const SoQtCursor & cursor);
64
SoQtFullViewer(QWidget * parent,
72
virtual void sizeChanged(const SbVec2s & size);
74
QWidget * buildWidget(QWidget * parent);
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);
84
virtual void buildPopupMenu(void);
85
virtual void setPopupMenuString(const char * title);
86
virtual void openPopupMenu(const SbVec2s position);
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);
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);
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);
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;
113
virtual SbBool processSoEvent(const SoEvent * const event);
117
QWidget * rightWheel;
118
QWidget * bottomWheel;
120
QWidget * leftDecoration;
121
QWidget * rightDecoration;
122
QWidget * bottomDecoration;
124
QWidget * leftWheelLabel;
128
QWidget * rightWheelLabel;
129
char * rightWheelStr;
132
QWidget * bottomWheelLabel;
133
char * bottomWheelStr;
134
float bottomWheelVal;
136
SoQtPopupMenu * prefmenu;
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;
145
friend class SoGuiFullViewerP;
146
friend class SoQtFullViewerP;
150
// FIXME: get rid of non-templatized code. 20020108 mortene.
152
#ifdef __COIN_SOXT__ // FIXME: get rid of non-templatized code. 20020108 mortene.
154
Widget buildFunctionsSubmenu(Widget popup);
155
Widget buildDrawStyleSubmenu(Widget popup);
159
SbPList * viewerButtonWidgets;
160
#endif // __COIN_SOXT__
163
// *************************************************************************
165
#endif // ! SOQT_FULLVIEWER_H