Commit ff561c2b authored by Jan Möbius's avatar Jan Möbius

Removed options from main widget

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4480 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a35cf48d
......@@ -150,8 +150,7 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
"Examiner Widget",
statusBar_ ,
&format,
0,
QtExaminerViewer::Nothing);
0);
examiner_widgets_.push_back(examinerWidget);
......@@ -161,8 +160,7 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
"Examiner Widget",
statusBar_ ,
&format,
examinerWidget,
QtExaminerViewer::Nothing);
examinerWidget);
examiner_widgets_.push_back(newWidget);
}
......
......@@ -115,8 +115,7 @@ QtBaseViewer::QtBaseViewer( QWidget* _parent,
const char* /* _name */ ,
QStatusBar *_statusBar,
const QGLFormat* _format,
const QtBaseViewer* _share,
Options _options ) :
const QtBaseViewer* _share) :
QWidget(_parent),
statusbar_(_statusBar),
glareaGrabbed_(false),
......@@ -124,7 +123,6 @@ QtBaseViewer::QtBaseViewer( QWidget* _parent,
projectionUpdateLocked_(false),
blending_(true),
sceneGraphDialog_(0),
options_(_options),
snapshotName_("snap.png"),
snapshotCounter_(0),
snapshot_(0),
......@@ -236,22 +234,6 @@ void QtBaseViewer::setStatusBar(QStatusBar* _sb)
statusbar_ = _sb;
}
//-----------------------------------------------------------------------------
void QtBaseViewer::applyOptions(int _options)
{
if (_options&ShowWheelX) wheelX_->show();
else wheelX_->hide();
if (_options&ShowWheelY) wheelY_->show();
else wheelY_->hide();
if (_options&ShowWheelZ) wheelZ_->show();
else wheelZ_->hide();
}
//-----------------------------------------------------------------------------
......@@ -1325,8 +1307,6 @@ QtBaseViewer::createWidgets(const QGLFormat* _format,
this,SLOT(slotWheelZ(double)));
wheelZ_->setToolTip( "Translate along <b>z-axis</b>.");
wheelZ_->setWhatsThis( "Translate along <b>z-axis</b>.");
if ((options_&ShowWheelZ)==0)
wheelZ_->hide();
wheelY_=new ACG::QtWidgets::QtWheel( 0,"wheel-y",ACG::QtWidgets::QtWheel::Horizontal);
wheelY_->setMinimumSize(wheelY_->sizeHint());
......@@ -1335,8 +1315,6 @@ QtBaseViewer::createWidgets(const QGLFormat* _format,
this,SLOT(slotWheelY(double)));
wheelY_->setToolTip("Rotate around <b>y-axis</b>.");
wheelY_->setWhatsThis( "Rotate around <b>y-axis</b>.");
if ((options_&ShowWheelY)==0)
wheelY_->hide();
wheelX_=new ACG::QtWidgets::QtWheel( 0,"wheel-x",ACG::QtWidgets::QtWheel::Vertical);
wheelX_->setMinimumSize(wheelX_->sizeHint());
......@@ -1345,8 +1323,6 @@ QtBaseViewer::createWidgets(const QGLFormat* _format,
this,SLOT(slotWheelX(double)));
wheelX_->setToolTip("Rotate around <b>x-axis</b>.");
wheelX_->setWhatsThis( "Rotate around <b>x-axis</b>.");
if ((options_&ShowWheelX)==0)
wheelX_->hide();
QGraphicsWidget *wheelX = glScene_->addWidget (wheelX_);
......
......@@ -116,40 +116,6 @@ Q_OBJECT
//-------------------------------------------------------------- public methods
public:
/** Options for creating a QtBaseViewer.
(cf. QtBaseViewer::QtBaseViewer(), applyOptions())
*/
enum Options {
/// all options disabled
Nothing=0,
/** Show tool bar? <br>
The tool bar consists of several buttons that can be used to control
this view, etc. It will be placed vertically on the right side.
\a Note: This toolbar inlcudes the wheels for translation along the
z-axis (right, cf. ShowWheelZ)!
*/
/// Show wheel for rotation around x-axis (left)?
ShowWheelX=0x20,
/// Show wheel for rotation around y-axis (bottom)?
ShowWheelY=0x40,
/** Show wheel for translation along z-axis (right)?
Effect only if ShowToolBar!
*/
ShowWheelZ=0x80,
/// Show all three wheels (default)!
ShowWheels=0xe0,
/// default: all options enabled
DefaultOptions = 0xffff
};
//--------------------------------------------------- constructor / destructor
/** Create a QtBaseViewer.
......@@ -158,14 +124,12 @@ public:
\param _statusBar pointer to an existing status bar for this widget,
if \c statusBar==0 then a \a private status bar will be created
\param _format OpenGL context settings, will be passed to glarea()
\param _options QtBaseViewer::Options
*/
QtBaseViewer( QWidget* _parent=0,
const char* _name=0,
QStatusBar *_statusBar=0,
const QGLFormat* _format=0,
const QtBaseViewer* _share=0,
Options _options=DefaultOptions );
const QtBaseViewer* _share=0);
/// Destructor.
virtual ~QtBaseViewer();
......@@ -184,12 +148,6 @@ public:
*/
void setStatusBar(QStatusBar* _sb);
/// Apply ORed Options \c _options.
void applyOptions(int _options);
/// get current ORed Options
int options() const { return options_; }
/// Makes this widget the current widget for OpenGL operations.
virtual void makeCurrent();
/// Swaps the screen contents with the off-screen buffer.
......@@ -753,9 +711,6 @@ private:
ACG::QtWidgets::QtSceneGraphDialog* sceneGraphDialog_;
// options
Options options_;
// gl widget used as drawing area to paint the graphics scene
QGLWidget* glWidget_;
// graphics scene used to paint gl context and widgets
......
......@@ -69,9 +69,8 @@ QtExaminerViewer::QtExaminerViewer( QWidget* _parent,
const char* _name,
QStatusBar *_statusBar,
const QGLFormat* _format,
const QtBaseViewer* _share,
Options _options ) :
QtBaseViewer(_parent, _name, _statusBar, _format, _share, _options)
const QtBaseViewer* _share) :
QtBaseViewer(_parent, _name, _statusBar, _format, _share)
{
// timer for animation
......
......@@ -85,8 +85,7 @@ public:
const char* _name=0,
QStatusBar *_statusBar=0,
const QGLFormat* _format=0,
const QtBaseViewer* _share=0,
Options _options=DefaultOptions );
const QtBaseViewer* _share=0);
// Destructor.
virtual ~QtExaminerViewer() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment