}
return info;
}
+
+bool CAM_Application::abortAllOperations()
+{
+ bool isNextOperationAllowed = true;
+ for( QList<CAM_Module*>::const_iterator it = myModules.begin(); it != myModules.end(); ++it )
+ {
+ if( !(*it)->abortAllOperations() )
+ isNextOperationAllowed = false;
+ }
+ return isNextOperationAllowed;
+}
static QString moduleLibrary( const QString&, const bool = true );
+ virtual bool abortAllOperations();
+
private:
void readModuleList();
\fn void CAM_Module::updateCommandsStatus();
\brief Update menu/toolbar actions.
*/
+
+
+bool CAM_Module::abortAllOperations()
+{
+ return true;
+}
// after activate/deactivate modules
QMap<QPair<int, QAction*>, QKeySequence> myActionShortcutMap; //!< copy actions shortcut map
+ virtual bool abortAllOperations();
+
private:
CAM_Application* myApp; //!< parent application object
QString myName; //!< module title (user name)
/*! \retval true, if document was opened successful, else false.*/
bool STD_Application::onOpenDoc( const QString& aName )
{
+ bool isNextOperationAllowed = abortAllOperations();
+ if( !isNextOperationAllowed )
+ return false;
+
QApplication::setOverrideCursor( Qt::WaitCursor );
bool res = openAction( openChoice( aName ), aName );
if ( !activeStudy() )
return;
+ bool isNextOperationAllowed = abortAllOperations();
+ if( !isNextOperationAllowed )
+ return;
+
bool isOk = false;
if ( activeStudy()->isSaved() )
{
if ( !study )
return false;
+ bool isNextOperationAllowed = abortAllOperations();
+ if( !isNextOperationAllowed )
+ return false;
+
bool isOk = false;
while ( !isOk )
{
return myViewMgrs.indexOf(const_cast<SUIT_ViewManager*>(theManager));
}
+bool STD_Application::abortAllOperations()
+{
+ return true;
+}
virtual bool closeDoc( bool ask = true );
virtual bool closeActiveDoc( bool permanently = true );
+ virtual bool abortAllOperations();
+
private:
ViewManagerList myViewMgrs;
SUIT_ViewManager* myActiveViewMgr;