/*!Update commands status.*/
void STD_Application::updateCommandsStatus()
{
+ SUIT_Application::updateCommandsStatus();
+
bool aHasStudy = activeStudy() != 0;
bool aIsNeedToSave = false;
if ( aHasStudy )
*/
SUIT_Application::~SUIT_Application()
{
+ setActiveStudy( 0 );
delete myStudy;
- myStudy = 0;
setDesktop( 0 );
}
emit infoChanged( QString::null );
}
+/*!
+ Updates status of the registerd actions
+*/
+void SUIT_Application::updateCommandsStatus()
+{}
+
/*!
Initialize with application arguments
\param argc - number of application arguments
if ( myStudy == study )
return;
+ if(myStudy)
+ disconnect(myStudy, SIGNAL( studyModified( SUIT_Study* ) ), this, SLOT( updateCommandsStatus() ) );
+
+ if(study)
+ connect(study, SIGNAL( studyModified( SUIT_Study* ) ), this, SLOT( updateCommandsStatus() ) );
+
myStudy = study;
}
void activated( SUIT_Application* );
void infoChanged( QString );
+public slots:
+ virtual void updateCommandsStatus();
+
private slots:
void onInfoClear();
myIsModified = on;
}
+/*!
+ Set study modified to \a on.
+ */
+void SUIT_Study::Modified()
+{
+ setIsModified( TRUE );
+ sendChangesNotification();
+}
+
/*!
Set root object.
*/
virtual bool isSaved() const;
virtual bool isModified() const;
+ virtual void Modified();
virtual void createDocument();
virtual void closeDocument( bool = true );