}
return info;
}
+
+/*!
+ \brief Abort active operations if there are any
+
+ Iterates through all modules and asks each of them if there are pending operations that cannot be aborted.
+
+ \return \c false if some operation cannot be aborted
+*/
+bool CAM_Application::abortAllOperations()
+{
+ bool aborted = true;
+ for ( QList<CAM_Module*>::const_iterator it = myModules.begin(); it != myModules.end() && aborted; ++it )
+ {
+ aborted = (*it)->abortAllOperations();
+ }
+ return aborted;
+}
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 )
{
+ if ( !abortAllOperations() )
+ return false;
+
QApplication::setOverrideCursor( Qt::WaitCursor );
bool res = openAction( openChoice( aName ), aName );
if ( !activeStudy() )
return;
+ if ( !abortAllOperations() )
+ return;
+
bool isOk = false;
if ( activeStudy()->isSaved() )
{
if ( !study )
return false;
+ if ( !abortAllOperations() )
+ return false;
+
bool isOk = false;
while ( !isOk )
{
return myViewMgrs.indexOf(const_cast<SUIT_ViewManager*>(theManager));
}
+/*!
+ \brief Abort active operations if there are any
+ \return \c false if some operation cannot be aborted
+*/
+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;