From: stv Date: Mon, 2 Mar 2009 09:35:34 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V5_1_1a2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a82859d0f82f448773bfb565d0bb1dff3e785caa;p=modules%2Fgui.git *** empty log message *** --- diff --git a/src/Qtx/QtxWorkstack.h b/src/Qtx/QtxWorkstack.h index c8abd3e7e..13ccd06c0 100644 --- a/src/Qtx/QtxWorkstack.h +++ b/src/Qtx/QtxWorkstack.h @@ -168,11 +168,11 @@ private: const int need_pos, const int splitter_pos ); private: - QWidget* myWin; //!< active widget - QtxWorkstackArea* myArea; //!< active workarea - QtxWorkstackSplitter* mySplit; //!< tol-level splitter - QWidget* myWorkWin; //!< widget where popup menu is invoked (used internally) - QtxWorkstackArea* myWorkArea; //!< workarea where popup menu is invoked (used internally) + QPointer myWin; //!< active widget + QPointer myArea; //!< active workarea + QtxWorkstackSplitter* mySplit; //!< tol-level splitter + QPointer myWorkWin; //!< widget where popup menu is invoked (used internally) + QPointer myWorkArea; //!< workarea where popup menu is invoked (used internally) QMap myActionsMap; //!< actions map diff --git a/src/Qtx/QtxWorkstackAction.cxx b/src/Qtx/QtxWorkstackAction.cxx index 8e813797e..0686ce4a8 100644 --- a/src/Qtx/QtxWorkstackAction.cxx +++ b/src/Qtx/QtxWorkstackAction.cxx @@ -45,10 +45,17 @@ QtxWorkstackAction::QtxWorkstackAction( QtxWorkstack* ws, QObject* parent ) myWorkstack( ws ), myWindowsFlag( true ) { - insertAction( new QtxAction( tr( "Split the active window on two vertical parts" ), - tr( "Split vertically" ), 0, this ), SplitVertical ); - insertAction( new QtxAction( tr( "Split the active window on two horizontal parts" ), - tr( "Split horizontally" ), 0, this ), SplitHorizontal ); + if ( myWorkstack ) + insertAction( myWorkstack->action( QtxWorkstack::SplitVertical ), SplitVertical ); + else + insertAction( new QtxAction( tr( "Split the active window on two vertical parts" ), + tr( "Split vertically" ), 0, this ), SplitVertical ); + + if ( myWorkstack ) + insertAction( myWorkstack->action( QtxWorkstack::SplitHorizontal ), SplitHorizontal ); + else + insertAction( new QtxAction( tr( "Split the active window on two horizontal parts" ), + tr( "Split horizontally" ), 0, this ), SplitHorizontal ); connect( this, SIGNAL( triggered( int ) ), this, SLOT( onTriggered( int ) ) ); @@ -73,8 +80,8 @@ QtxWorkstack* QtxWorkstackAction::workstack() const /*! \brief Set actions to be visible in the menu. - - Actions, which IDs are set in \a flags parameter, will be shown in the + + Actions, which IDs are set in \a flags parameter, will be shown in the menu bar. Other actions will not be shown. \param flags ORed together actions flags @@ -205,6 +212,7 @@ void QtxWorkstackAction::setStatusTip( const int id, const QString& txt ) */ void QtxWorkstackAction::perform( const int type ) { + /* switch ( type ) { case SplitVertical: @@ -214,6 +222,7 @@ void QtxWorkstackAction::perform( const int type ) splitHorizontal(); break; } + */ } /*! @@ -356,7 +365,7 @@ void QtxWorkstackAction::activateItem( const int idx ) /*! \brief Called when menu item is activated by the user. - + Perform the corresponding action. \param id menu item identifier