Commit 28c3ec7b authored by Jan Möbius's avatar Jan Möbius

Remove old statusbar parts from local examiner

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4475 383ad7c9-94d9-4d36-a494-682f7c89f535
parent add5797d
...@@ -118,14 +118,13 @@ QtBaseViewer::QtBaseViewer( QWidget* _parent, ...@@ -118,14 +118,13 @@ QtBaseViewer::QtBaseViewer( QWidget* _parent,
const QtBaseViewer* _share, const QtBaseViewer* _share,
Options _options ) : Options _options ) :
QWidget(_parent), QWidget(_parent),
statusbar_(0), statusbar_(_statusBar),
glareaGrabbed_(false), glareaGrabbed_(false),
updateLocked_(false), updateLocked_(false),
projectionUpdateLocked_(false), projectionUpdateLocked_(false),
blending_(true), blending_(true),
sceneGraphDialog_(0), sceneGraphDialog_(0),
options_(_options), options_(_options),
privateStatusBar_(0),
disableKeyHandling_(false), disableKeyHandling_(false),
externalDrag_(false), externalDrag_(false),
snapshotName_("snap.png"), snapshotName_("snap.png"),
...@@ -232,7 +231,6 @@ QtBaseViewer::QtBaseViewer( QWidget* _parent, ...@@ -232,7 +231,6 @@ QtBaseViewer::QtBaseViewer( QWidget* _parent,
QtBaseViewer::~QtBaseViewer() QtBaseViewer::~QtBaseViewer()
{ {
delete privateStatusBar_;
delete snapshot_; delete snapshot_;
delete glstate_; delete glstate_;
delete sceneGraphDialog_; delete sceneGraphDialog_;
...@@ -256,19 +254,7 @@ QtBaseViewer::sizeHint() const ...@@ -256,19 +254,7 @@ QtBaseViewer::sizeHint() const
void QtBaseViewer::setStatusBar(QStatusBar* _sb) void QtBaseViewer::setStatusBar(QStatusBar* _sb)
{ {
if (_sb==0) statusbar_ = _sb;
{
if (privateStatusBar_==0)
privateStatusBar_=new QStatusBar(this);
statusbar_=privateStatusBar_;
if (options_ & ShowPrivateStatusBar)
privateStatusBar_->show();
else
privateStatusBar_->hide();
}
else {
statusbar_ = _sb;
}
} }
...@@ -277,10 +263,6 @@ void QtBaseViewer::setStatusBar(QStatusBar* _sb) ...@@ -277,10 +263,6 @@ void QtBaseViewer::setStatusBar(QStatusBar* _sb)
void QtBaseViewer::applyOptions(int _options) void QtBaseViewer::applyOptions(int _options)
{ {
if (_options&ShowPrivateStatusBar)
setStatusBar(0);
else if (privateStatusBar_!=0)
privateStatusBar_->hide();
if (_options&ShowWheelX) wheelX_->show(); if (_options&ShowWheelX) wheelX_->show();
else wheelX_->hide(); else wheelX_->hide();
...@@ -1324,7 +1306,6 @@ QtBaseViewer::createWidgets(const QGLFormat* _format, ...@@ -1324,7 +1306,6 @@ QtBaseViewer::createWidgets(const QGLFormat* _format,
QStatusBar* _sb, QStatusBar* _sb,
const QtBaseViewer* _share) const QtBaseViewer* _share)
{ {
statusbar_=privateStatusBar_=0;
setStatusBar(_sb); setStatusBar(_sb);
drawMenu_=0; drawMenu_=0;
pickMenu_=0; pickMenu_=0;
...@@ -1344,12 +1325,6 @@ QtBaseViewer::createWidgets(const QGLFormat* _format, ...@@ -1344,12 +1325,6 @@ QtBaseViewer::createWidgets(const QGLFormat* _format,
layout->addWidget(work,1); // gets all stretch layout->addWidget(work,1); // gets all stretch
// private status bar
assert(statusbar_!=0);
if (privateStatusBar_!=0)
layout->addWidget(privateStatusBar_,0); // no stretch
// Construct GL context & widget // Construct GL context & widget
QGLWidget* share = 0; QGLWidget* share = 0;
if (_share) share = _share->glWidget_; if (_share) share = _share->glWidget_;
......
...@@ -123,31 +123,13 @@ public: ...@@ -123,31 +123,13 @@ public:
/// all options disabled /// all options disabled
Nothing=0, Nothing=0,
/** Show \a private status bar? <br>
If the widget is constructed (cf. QtBaseViewer::QtBaseViewer())
with no status bar (\c _statusBar==0) then a \a private \c QStatusBar
will be created. Use this option to show or hide it. It has \a no
\a effect if the \c QStatusBar is provided externally.
*/
ShowPrivateStatusBar=1,
/** Show tool bar? <br> /** Show tool bar? <br>
The tool bar consists of several buttons that can be used to control 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. this view, etc. It will be placed vertically on the right side.
\a Note: This toolbar inlcudes the wheels for translation along the \a Note: This toolbar inlcudes the wheels for translation along the
z-axis (right, cf. ShowWheelZ)! z-axis (right, cf. ShowWheelZ)!
*/
The default setting is to show \a all buttons (see below).
*/
ShowToolBar=2,
/// Show pick button? Effect only if ShowToolBar!
ShowPickButton=4,
/// Show lasso button? Effect only if ShowToolBar!
ShowLassoButton=8,
/// Show question button? Effect only if ShowToolBar!
ShowQuestionButton=0x10,
/// Show wheel for rotation around x-axis (left)? /// Show wheel for rotation around x-axis (left)?
ShowWheelX=0x20, ShowWheelX=0x20,
...@@ -161,8 +143,8 @@ public: ...@@ -161,8 +143,8 @@ public:
/// Show all three wheels (default)! /// Show all three wheels (default)!
ShowWheels=0xe0, ShowWheels=0xe0,
/// default: all options (but not private statusbar) enabled /// default: all options enabled
DefaultOptions = 0xffff & (~ShowPrivateStatusBar) DefaultOptions = 0xffff
}; };
...@@ -196,15 +178,9 @@ public: ...@@ -196,15 +178,9 @@ public:
virtual QSize sizeHint () const; virtual QSize sizeHint () const;
/// get status bar, guaranteed to be not 0 (\c QStatusBar may be invisible)
QStatusBar* statusBar() { return statusbar_; }
/** Set status bar. /** Set status bar.
Sets the \c QStatusBar widget that is used for informational Sets the \c QStatusBar widget that is used for information
output, e.g. the frame rate of the rotation animation. output, e.g. the frame rate of the rotation animation.
If \c sb==0 a \a private \c QStatusBar will be used,
cf. Options. This private status bar may be invisible,
but statusBar() will \a never return 0 even if setStatusBar(0)
has been called!
*/ */
void setStatusBar(QStatusBar* _sb); void setStatusBar(QStatusBar* _sb);
...@@ -580,7 +556,8 @@ signals: ...@@ -580,7 +556,8 @@ signals:
*/ */
void signalMouseEventIdentify( QMouseEvent* ); void signalMouseEventIdentify( QMouseEvent* );
/// set view, used for synchronizing (cf. slotSetView())
/// set view, used for synchronizing (cf. slotSetView())
void signalSetView( const ACG::GLMatrixd& _modelview, void signalSetView( const ACG::GLMatrixd& _modelview,
const ACG::GLMatrixd& _inverse_modelview ); const ACG::GLMatrixd& _inverse_modelview );
/// scene graph has changed /// scene graph has changed
...@@ -791,9 +768,6 @@ private: ...@@ -791,9 +768,6 @@ private:
// Base graphics widget layout // Base graphics widget layout
QGraphicsGridLayout* glBaseLayout_; QGraphicsGridLayout* glBaseLayout_;
// private status bar, 0 if status bar is provided externally
QStatusBar* privateStatusBar_;
// Layout for the basic widget ( viewer + wheels ) // Layout for the basic widget ( viewer + wheels )
QGridLayout* glLayout_; QGridLayout* glLayout_;
......
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