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,
const QtBaseViewer* _share,
Options _options ) :
QWidget(_parent),
statusbar_(0),
statusbar_(_statusBar),
glareaGrabbed_(false),
updateLocked_(false),
projectionUpdateLocked_(false),
blending_(true),
sceneGraphDialog_(0),
options_(_options),
privateStatusBar_(0),
disableKeyHandling_(false),
externalDrag_(false),
snapshotName_("snap.png"),
......@@ -232,7 +231,6 @@ QtBaseViewer::QtBaseViewer( QWidget* _parent,
QtBaseViewer::~QtBaseViewer()
{
delete privateStatusBar_;
delete snapshot_;
delete glstate_;
delete sceneGraphDialog_;
......@@ -256,19 +254,7 @@ QtBaseViewer::sizeHint() const
void QtBaseViewer::setStatusBar(QStatusBar* _sb)
{
if (_sb==0)
{
if (privateStatusBar_==0)
privateStatusBar_=new QStatusBar(this);
statusbar_=privateStatusBar_;
if (options_ & ShowPrivateStatusBar)
privateStatusBar_->show();
else
privateStatusBar_->hide();
}
else {
statusbar_ = _sb;
}
statusbar_ = _sb;
}
......@@ -277,10 +263,6 @@ void QtBaseViewer::setStatusBar(QStatusBar* _sb)
void QtBaseViewer::applyOptions(int _options)
{
if (_options&ShowPrivateStatusBar)
setStatusBar(0);
else if (privateStatusBar_!=0)
privateStatusBar_->hide();
if (_options&ShowWheelX) wheelX_->show();
else wheelX_->hide();
......@@ -1324,7 +1306,6 @@ QtBaseViewer::createWidgets(const QGLFormat* _format,
QStatusBar* _sb,
const QtBaseViewer* _share)
{
statusbar_=privateStatusBar_=0;
setStatusBar(_sb);
drawMenu_=0;
pickMenu_=0;
......@@ -1344,12 +1325,6 @@ QtBaseViewer::createWidgets(const QGLFormat* _format,
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
QGLWidget* share = 0;
if (_share) share = _share->glWidget_;
......
......@@ -123,31 +123,13 @@ public:
/// all options disabled
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>
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)!
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)?
ShowWheelX=0x20,
......@@ -161,8 +143,8 @@ public:
/// Show all three wheels (default)!
ShowWheels=0xe0,
/// default: all options (but not private statusbar) enabled
DefaultOptions = 0xffff & (~ShowPrivateStatusBar)
/// default: all options enabled
DefaultOptions = 0xffff
};
......@@ -196,15 +178,9 @@ public:
virtual QSize sizeHint () const;
/// get status bar, guaranteed to be not 0 (\c QStatusBar may be invisible)
QStatusBar* statusBar() { return statusbar_; }
/** 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.
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);
......@@ -580,7 +556,8 @@ signals:
*/
void signalMouseEventIdentify( QMouseEvent* );
/// set view, used for synchronizing (cf. slotSetView())
/// set view, used for synchronizing (cf. slotSetView())
void signalSetView( const ACG::GLMatrixd& _modelview,
const ACG::GLMatrixd& _inverse_modelview );
/// scene graph has changed
......@@ -791,9 +768,6 @@ private:
// Base graphics widget layout
QGraphicsGridLayout* glBaseLayout_;
// private status bar, 0 if status bar is provided externally
QStatusBar* privateStatusBar_;
// Layout for the basic widget ( viewer + wheels )
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