Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated copyright comment
[modules/gui.git]
/
src
/
SUIT
/
SUIT_Application.cxx
diff --git
a/src/SUIT/SUIT_Application.cxx
b/src/SUIT/SUIT_Application.cxx
old mode 100755
(executable)
new mode 100644
(file)
index
95a42da
..
fef1771
--- a/
src/SUIT/SUIT_Application.cxx
+++ b/
src/SUIT/SUIT_Application.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
24 CEA, EDF
, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-58,7
+58,8
@@
SUIT_Application::SUIT_Application()
: QObject( 0 ),
myStudy( 0 ),
myDesktop( 0 ),
: QObject( 0 ),
myStudy( 0 ),
myDesktop( 0 ),
- myStatusLabel( 0 )
+ myStatusLabel( 0 ),
+ myPostRoutines( QList<PostRoutine>() )
{
if ( SUIT_Session::session() )
SUIT_Session::session()->insertApplication( this );
{
if ( SUIT_Session::session() )
SUIT_Session::session()->insertApplication( this );
@@
-74,6
+75,9
@@
SUIT_Application::~SUIT_Application()
delete s;
setDesktop( 0 );
delete s;
setDesktop( 0 );
+
+ foreach ( PostRoutine routine, myPostRoutines )
+ routine();
}
/*!
}
/*!
@@
-395,6
+399,16
@@
int SUIT_Application::createTool( const int id, const QString& tBar, const int i
return intId != -1 ? id : -1;
}
return intId != -1 ? id : -1;
}
+/*!
+ Clears given toolbar.
+ \param title - title of toolbar
+*/
+void SUIT_Application::clearTool( const QString& title )
+{
+ if ( desktop() && desktop()->toolMgr() )
+ desktop()->toolMgr()->clear( title );
+}
+
/*!
Creates new menu item
\return identificator of new action in menu manager
/*!
Creates new menu item
\return identificator of new action in menu manager
@@
-689,7
+703,8
@@
int SUIT_Application::registerAction( const int id, QAction* a )
if ( desktop() && desktop()->toolMgr() )
desktop()->toolMgr()->registerAction( a );
if ( desktop() && desktop()->toolMgr() )
desktop()->toolMgr()->registerAction( a );
- if ( desktop() )
+ if ( desktop() && a->shortcutContext() != Qt::WidgetShortcut &&
+ a->shortcutContext() != Qt::WidgetWithChildrenShortcut )
desktop()->addAction( a );
return ident;
desktop()->addAction( a );
return ident;
@@
-727,3
+742,9
@@
void SUIT_Application::onHelpContextModule( const QString& /*theComponentName*/,
const QString& /*theContext*/ )
{
}
const QString& /*theContext*/ )
{
}
+
+void SUIT_Application::addPostRoutine( PostRoutine theRoutine )
+{
+ if ( !myPostRoutines.contains( theRoutine ) )
+ myPostRoutines << theRoutine;
+}