From e9139d50777adc3c698e5f738ac1b9a757d56b8a Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 23 Nov 2005 11:34:11 +0000 Subject: [PATCH] no message --- src/Qtx/QtxMainWindow.cxx | 19 ++++++++++++++----- src/Qtx/QtxMainWindow.h | 2 ++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/Qtx/QtxMainWindow.cxx b/src/Qtx/QtxMainWindow.cxx index faf8642cf..b54cb3727 100644 --- a/src/Qtx/QtxMainWindow.cxx +++ b/src/Qtx/QtxMainWindow.cxx @@ -58,6 +58,7 @@ bool QtxMainWindow::Filter::eventFilter( QObject* o, QEvent* e ) QtxMainWindow::QtxMainWindow( QWidget* parent, const char* name, WFlags f ) : QMainWindow( parent, name, f ), +myMode( -1 ), myMenuBar( NULL ), myStatusBar( NULL ) { @@ -205,7 +206,18 @@ void QtxMainWindow::loadGeometry( QtxResourceMgr* resMgr, const QString& section resize( win_w, win_h ); move( win_x, win_y ); - switch ( winState ) + myMode = winState; + + vis ? show() : hide(); +} + +void QtxMainWindow::show() +{ + int mode = myMode; + + myMode = -1; + + switch ( mode ) { case WS_Normal: showNormal(); @@ -216,12 +228,9 @@ void QtxMainWindow::loadGeometry( QtxResourceMgr* resMgr, const QString& section case WS_Maximized: showMaximized(); break; - case WS_Hidden: - vis = false; - break; } - vis ? show() : hide(); + QMainWindow::show(); } int QtxMainWindow::relativeCoordinate( const int type, const int WH, const int wh ) const diff --git a/src/Qtx/QtxMainWindow.h b/src/Qtx/QtxMainWindow.h index 9829ea850..e31ab5d73 100644 --- a/src/Qtx/QtxMainWindow.h +++ b/src/Qtx/QtxMainWindow.h @@ -36,6 +36,7 @@ public: virtual bool eventFilter( QObject*, QEvent* ); public slots: + virtual void show(); virtual void setAppropriate( QDockWindow*, bool ); protected: @@ -50,6 +51,7 @@ private: int relativeCoordinate( const int, const int, const int ) const; private: + int myMode; QDockWindow* myMenuBar; QDockWindow* myStatusBar; }; -- 2.39.2