#include <QtxActionMenuMgr.h>
#include <QtxActionToolMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_Application.h>
+
/*!Icon.*/
static const char* ModuleIcon[] = {
"20 20 2 1",
void CAM_Module::initialize( CAM_Application* app )
{
myApp = app;
+ if (myApp) {
+ SUIT_Session* aSession = SUIT_Session::session();
+ connect(aSession, SIGNAL( applicationClosed( SUIT_Application* ) ),
+ this, SLOT( onApplicationClosed( SUIT_Application* ) ));
+ }
}
/*!\retval Module icon.*/
{
}
+/*!Public slot, nullify application pointer if the application was closed.*/
+void CAM_Module::onApplicationClosed( SUIT_Application* theApp )
+{
+ if (myApp == theApp)
+ myApp = NULL;
+}
+
/*!Create and return new instance of CAM_DataModel.*/
CAM_DataModel* CAM_Module::createDataModel()
{
class QAction;
class SUIT_Study;
+class SUIT_Application;
class CAM_Study;
class CAM_DataModel;
class CAM_Application;
virtual void studyClosed( SUIT_Study* );
virtual void studyChanged( SUIT_Study*, SUIT_Study* );
+ virtual void onApplicationClosed( SUIT_Application* );
+
protected:
virtual CAM_DataModel* createDataModel();