From daf3de24e83fb542c11651a403be50193c15be72 Mon Sep 17 00:00:00 2001 From: stv Date: Fri, 18 May 2007 07:21:12 +0000 Subject: [PATCH] no message --- src/Qtx/QtxAction.cxx | 14 ++++-------- src/Qtx/QtxAction.h | 6 ++--- src/STD/STD_MDIDesktop.cxx | 38 ++++++++++++++++++++++--------- src/STD/STD_MDIDesktop.h | 8 +++---- src/SUIT/SUIT_ActionOperation.cxx | 4 ++-- src/SUIT/SUIT_Application.cxx | 2 +- 6 files changed, 41 insertions(+), 31 deletions(-) diff --git a/src/Qtx/QtxAction.cxx b/src/Qtx/QtxAction.cxx index 99dc21fa3..6e6692bb8 100755 --- a/src/Qtx/QtxAction.cxx +++ b/src/Qtx/QtxAction.cxx @@ -39,10 +39,9 @@ \param name action name (in terms of QObject) \param toggle if \c true the action is a toggle action */ -QtxAction::QtxAction( QObject* parent, const char* name, bool toggle ) +QtxAction::QtxAction( QObject* parent, bool toggle ) : QAction( parent ) { - setObjectName( name ); setCheckable( toggle ); QApplication::instance()->installEventFilter( this ); @@ -61,14 +60,12 @@ QtxAction::QtxAction( QObject* parent, const char* name, bool toggle ) \param name action name (in terms of QObject) \param toggle if \c true the action is a toggle action */ -QtxAction::QtxAction( const QString& text, const QIcon& icon, - const QString& menuText, int accel, - QObject* parent, const char* name, bool toggle ) +QtxAction::QtxAction( const QString& text, const QIcon& icon, const QString& menuText, + int accel, QObject* parent, bool toggle ) : QAction( icon, menuText, parent ) { setToolTip( text ); setShortcut( accel ); - setObjectName( name ); setCheckable( toggle ); QApplication::instance()->installEventFilter( this ); @@ -86,13 +83,12 @@ QtxAction::QtxAction( const QString& text, const QIcon& icon, \param name action name (in terms of QObject) \param toggle if \c true the action is a toggle action */ -QtxAction::QtxAction( const QString& text, const QString& menuText, int accel, - QObject* parent, const char* name, bool toggle ) +QtxAction::QtxAction( const QString& text, const QString& menuText, + int accel, QObject* parent, bool toggle ) : QAction( menuText, parent ) { setToolTip( text ); setShortcut( accel ); - setObjectName( name ); setCheckable( toggle ); QApplication::instance()->installEventFilter( this ); diff --git a/src/Qtx/QtxAction.h b/src/Qtx/QtxAction.h index 7540446ad..e599c1f4c 100755 --- a/src/Qtx/QtxAction.h +++ b/src/Qtx/QtxAction.h @@ -37,9 +37,9 @@ class QTX_EXPORT QtxAction : public QAction Q_OBJECT public: - QtxAction( QObject* = 0, const char* = 0, bool = false ); - QtxAction( const QString&, const QString&, int, QObject*, const char* = 0, bool = false ); - QtxAction( const QString&, const QIcon&, const QString&, int, QObject*, const char* = 0, bool = false ); + QtxAction( QObject* = 0, bool = false ); + QtxAction( const QString&, const QString&, int, QObject*, bool = false ); + QtxAction( const QString&, const QIcon&, const QString&, int, QObject*, bool = false ); virtual ~QtxAction(); virtual bool eventFilter( QObject*, QEvent* ); diff --git a/src/STD/STD_MDIDesktop.cxx b/src/STD/STD_MDIDesktop.cxx index f48313a82..039833bb0 100755 --- a/src/STD/STD_MDIDesktop.cxx +++ b/src/STD/STD_MDIDesktop.cxx @@ -22,16 +22,18 @@ #include #include +#include //#include //#include #include #include -#include #include -/*!Constructor.*/ +/*! + Constructor. +*/ STD_MDIDesktop::STD_MDIDesktop() : SUIT_Desktop(), myWorkspace( 0 )//, @@ -44,7 +46,7 @@ myWorkspace( 0 )//, setCentralWidget( base ); - myWorkspace = new QWorkspace( base ); + myWorkspace = new QtxWorkspace( base ); main->addWidget( myWorkspace ); connect( myWorkspace, SIGNAL( windowActivated( QWidget* ) ), @@ -53,12 +55,16 @@ myWorkspace( 0 )//, createActions(); } -/*!destructor.*/ +/*! + Destructor. +*/ STD_MDIDesktop::~STD_MDIDesktop() { } -/*!\retval SUIT_ViewWindow - return const active window.*/ +/*! + \retval SUIT_ViewWindow - return const active window. +*/ SUIT_ViewWindow* STD_MDIDesktop::activeWindow() const { SUIT_ViewWindow* wnd = 0; @@ -70,7 +76,9 @@ SUIT_ViewWindow* STD_MDIDesktop::activeWindow() const return wnd; } -/*!\retval QPtrList - return const active window list.*/ +/*! + \retval QList - return const active window list. +*/ QList STD_MDIDesktop::windows() const { QList winList; @@ -86,7 +94,9 @@ QList STD_MDIDesktop::windows() const return winList; } -/*! add the new widget into desktop.*/ +/*! + Add the new widget into desktop. +*/ void STD_MDIDesktop::addWindow( QWidget* w ) { if ( !w || !workspace() ) @@ -130,20 +140,26 @@ void STD_MDIDesktop::setWindowOperations( const QList& opList ) // myWorkspaceAction->setItems( flags ); } -/*!\retval QWorkspace pointer - work space.*/ -QWorkspace* STD_MDIDesktop::workspace() const +/*! + \retval QtxWorkspace pointer - work space. +*/ +QtxWorkspace* STD_MDIDesktop::workspace() const { return myWorkspace; } -/*!Emit window activated.*/ +/*! + Emit window activated. +*/ void STD_MDIDesktop::onWindowActivated( QWidget* w ) { if ( w && w->inherits( "SUIT_ViewWindow" ) ) emit windowActivated( (SUIT_ViewWindow*)w ); } -/*!Create actions: cascade, Tile, Tile Horizontal, Tile Vertical*/ +/*! + Create actions: cascade, Tile, Tile Horizontal, Tile Vertical +*/ void STD_MDIDesktop::createActions() { /* diff --git a/src/STD/STD_MDIDesktop.h b/src/STD/STD_MDIDesktop.h index 7a90174b4..22caa0cae 100755 --- a/src/STD/STD_MDIDesktop.h +++ b/src/STD/STD_MDIDesktop.h @@ -23,7 +23,7 @@ #include -class QWorkspace; +class QtxWorkspace; //class QtxWorkspaceAction; #if defined WIN32 @@ -34,8 +34,6 @@ class STD_EXPORT STD_MDIDesktop: public SUIT_Desktop { Q_OBJECT - class Workspace; - public: enum { MenuWindowId = 6 }; enum { Cascade, Tile, HTile, VTile }; @@ -52,7 +50,7 @@ public: void setWindowOperations( const int, ... ); void setWindowOperations( const QList& ); - QWorkspace* workspace() const; + QtxWorkspace* workspace() const; private slots: void onWindowActivated( QWidget* ); @@ -65,7 +63,7 @@ private: int operationFlag( const int ) const; private: - QWorkspace* myWorkspace; + QtxWorkspace* myWorkspace; // QtxWorkspaceAction* myWorkspaceAction; }; diff --git a/src/SUIT/SUIT_ActionOperation.cxx b/src/SUIT/SUIT_ActionOperation.cxx index 5c7b4711b..68d207687 100644 --- a/src/SUIT/SUIT_ActionOperation.cxx +++ b/src/SUIT/SUIT_ActionOperation.cxx @@ -53,7 +53,7 @@ void SUIT_ActionOperation::setAction( const QString& text, const QIcon& icon, const QString& menuText, QKeySequence accel, QObject* parent, bool toggle ) { - setAction( new QtxAction( text, icon, menuText, accel, parent, 0, toggle ) ); + setAction( new QtxAction( text, icon, menuText, accel, parent, toggle ) ); } /*!Set action. @@ -62,7 +62,7 @@ void SUIT_ActionOperation::setAction( const QString& text, const QIcon& icon, void SUIT_ActionOperation::setAction( const QString& text, const QString& menuText, QKeySequence accel, QObject* parent, bool toggle ) { - setAction( new QtxAction( text, menuText, accel, parent, 0, toggle ) ); + setAction( new QtxAction( text, menuText, accel, parent, toggle ) ); } /*!Set action. diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index 25e5bd542..0f01076b0 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -575,7 +575,7 @@ QAction* SUIT_Application::createAction( const int id, const QString& text, cons const QString& menu, const QString& tip, const int key, QObject* parent, const bool toggle, QObject* reciever, const char* member ) { - QtxAction* a = new QtxAction( text, icon, menu, key, parent, 0, toggle ); + QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle ); a->setStatusTip( tip ); if ( reciever && member ) -- 2.39.2