saveDockWindowsState();
CAM_Application::onNewDoc();
+
+ activateDefaultModule();
}
/*!
updateWindows();
updateViewManagers();
}
+
+ activateDefaultModule();
}
/*!
pref->setItemProperty( "strings", aValuesList, mruLinkType );
pref->setItemProperty( "indexes", anIndicesList, mruLinkType );
+ // Default Module Preferences
+ int moduleGroup = pref->addPreference( tr( "PREF_DEFAULT_MODULE" ), genTab );
+ int moduleNameCombo = pref->addPreference( tr( "PREF_DEF_MODULE_NAME" ), moduleGroup, LightApp_Preferences::Selector, "Activate", "def_module" );
+ aValuesList.clear();
+ anIndicesList.clear();
+ aValuesList << tr("PREF_DEF_MODULE_NONE") << tr("PREF_DEF_MODULE_CATHARE") << tr("PREF_DEF_MODULE_DIAGRAM");
+ anIndicesList << 0 << 1 << 2 ;
+ pref->setItemProperty( "strings", aValuesList, moduleNameCombo );
+ pref->setItemProperty( "indexes", anIndicesList, moduleNameCombo );
+
// theme values
Style_Model* aSModel = 0;
QStyle* style = qApp->style();
return res;
}
+
+void LightApp_Application::activateDefaultModule()
+{
+ QString defModName("");
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ int sel = resMgr->integerValue( "Activate", "def_module" );
+ if ( sel > 0 ) {
+ LightApp_ModuleAction* moduleAction =
+ qobject_cast<LightApp_ModuleAction*>( action( ModulesListId ) );
+ if ( moduleAction && moduleAction->activeModule() == "" )
+ {
+ switch( sel ) {
+ case 1: defModName = "CATHARE GUI"; break;
+ case 2: defModName = "DIAGRAMS"; break;
+ }
+ activateModule( defModName );
+ }
+ }
+}
\ No newline at end of file
<!-- General study settings -->
<parameter name="store_positions" value="true" />
</section>
+ <section name="Activate">
+ <!-- StartUp settings -->
+ <parameter name="def_module" value="0" />
+ </section>
<section name="OCCViewer" >
<!-- OCC viewer preferences -->
<parameter name="background" value="35, 136, 145" />
<source>PREF_MRU_LINK_FULL</source>
<translation>Full</translation>
</message>
+ <message>
+ <source>PREF_DEFAULT_MODULE</source>
+ <translation>Start Options</translation>
+ </message>
+ <message>
+ <source>PREF_DEF_MODULE_NAME</source>
+ <translation>Activate module by default:</translation>
+ </message>
+ <message>
+ <source>PREF_DEF_MODULE_NONE</source>
+ <translation>Activate nothing</translation>
+ </message>
+ <message>
+ <source>PREF_DEF_MODULE_CATHARE</source>
+ <translation>Cathare module</translation>
+ </message>
+ <message>
+ <source>PREF_DEF_MODULE_DIAGRAM</source>
+ <translation>Diagram module</translation>
+ </message>
<message>
<source></source>
<translation></translation>