action( EditPasteId )->setEnabled(canPaste);
}
+/*!
+ SLOT: Performs some actions when dockable windows are triggered
+*/
+void LightApp_Application::onDockWindowVisibilityChanged( bool )
+{
+}
+
QWidget* LightApp_Application::dockWindow( const int id ) const
{
QWidget* wid = 0;
dock->setObjectName( wid->objectName().isEmpty() ? QString( "window_%1" ).arg( id ) :
QString( "%1Dock" ).arg( wid->objectName() ) );
dock->setWidget( wid );
+ dock->toggleViewAction()->setData( QVariant( wid->objectName() ) );
+ connect( dock->toggleViewAction(), SIGNAL( triggered( bool ) ),
+ this, SLOT( onDockWindowVisibilityChanged( bool ) ) );
QKeySequence accel = wid->property( "shortcut" ).value<QKeySequence>();
if ( !accel.isEmpty() )
virtual void onCopy();
virtual void onPaste();
virtual void onSelectionChanged();
+ virtual void onDockWindowVisibilityChanged( bool );
protected:
virtual void createActions();
#endif
}
+/*!Public SLOT. Performs some actions when dockable windows are triggered.*/
+void SalomeApp_Application::onDockWindowVisibilityChanged( bool theIsVisible )
+{
+ LightApp_Application::onDockWindowVisibilityChanged( theIsVisible );
+ QAction* send = (QAction*)sender();
+ QString aWinName = send->data().toString();
+ if ( theIsVisible && aWinName == "objectBrowser" )
+ objectBrowserColumnsVisibility();
+}
+
/*!Gets file filter.
*\retval QString "(*.hdf)"
*/
virtual void onCheckIn();
virtual void onLocalCheckIn();
+ virtual void onDockWindowVisibilityChanged( bool );
+
protected slots:
void onStudyCreated( SUIT_Study* );
void onStudyOpened( SUIT_Study* );