From: san Date: Tue, 26 Oct 2010 06:12:16 +0000 (+0000) Subject: Rolling back previous integration from KALLISTO team (virtual initialize() method... X-Git-Tag: V5_1_10~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=45d0f6556f2f856e9f4f3f53b78bcb7ccf3762b3;p=modules%2Fgui.git Rolling back previous integration from KALLISTO team (virtual initialize() method for application classes) --- diff --git a/src/CAM/CAM_Application.cxx b/src/CAM/CAM_Application.cxx index 2a150abcc..555cdd9f8 100755 --- a/src/CAM/CAM_Application.cxx +++ b/src/CAM/CAM_Application.cxx @@ -91,18 +91,18 @@ CAM_Application::~CAM_Application() } /*! - \brief Initializes an application. + \brief Start an application. Load all modules, if "auto loading" flag has been set to \c true. \sa CAM_Application() */ -void CAM_Application::initialize() +void CAM_Application::start() { - STD_Application::initialize(); - if ( myAutoLoad ) loadModules(); + + STD_Application::start(); } /*! diff --git a/src/CAM/CAM_Application.h b/src/CAM/CAM_Application.h index 3313c5a4d..e04876078 100755 --- a/src/CAM/CAM_Application.h +++ b/src/CAM/CAM_Application.h @@ -45,6 +45,8 @@ public: CAM_Application( const bool = true ); virtual ~CAM_Application(); + virtual void start(); + CAM_Module* activeModule() const; CAM_Module* module( const QString& ) const; @@ -68,7 +70,6 @@ public: virtual void createEmptyStudy(); protected: - virtual void initialize(); virtual SUIT_Study* createNewStudy(); virtual void updateCommandsStatus(); diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index 1b3212088..645206233 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -78,11 +78,9 @@ QString STD_Application::applicationName() const return QString( "StdApplication" ); } -/*!Prepare STD_Application*/ -void STD_Application::initialize() +/*!Start STD_Application*/ +void STD_Application::start() { - SUIT_Application::initialize(); - createActions(); updateDesktopTitle(); @@ -90,15 +88,7 @@ void STD_Application::initialize() setEditEnabled( myEditEnabled ); loadPreferences(); -} -/*!Start STD_Application*/ -void STD_Application::start() -{ - // san: Need this simple implementation, as some applications - // call STD_Application::start() explicitly - // so we need to provide at least some implementation at this level - // to avoid link errors SUIT_Application::start(); } diff --git a/src/STD/STD_Application.h b/src/STD/STD_Application.h index 3db33af3f..5c12b4b65 100755 --- a/src/STD/STD_Application.h +++ b/src/STD/STD_Application.h @@ -141,7 +141,6 @@ protected: enum { CloseCancel, CloseSave, CloseDiscard }; protected: - virtual void initialize(); virtual void createActions(); virtual void updateCommandsStatus(); diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index c9d410ac1..ead59e4c4 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -117,19 +117,10 @@ QString SUIT_Application::applicationVersion() const */ void SUIT_Application::start() { - initialize(); - if ( desktop() ) desktop()->show(); } -/*! - Prepares the contents of the application's main widget, does nothing by default. -*/ -void SUIT_Application::initialize() -{ -} - /*! Opens document into active Study. If Study is empty - creates it. \param theFileName - name of document file diff --git a/src/SUIT/SUIT_Application.h b/src/SUIT/SUIT_Application.h index 6fb1b8917..f20dc5633 100755 --- a/src/SUIT/SUIT_Application.h +++ b/src/SUIT/SUIT_Application.h @@ -124,9 +124,6 @@ protected: //! Creates a new Study instance. Must be redefined in new application according to its Study type. virtual SUIT_Study* createNewStudy(); virtual void setActiveStudy( SUIT_Study* ); - - //! Prepares the contents of the application's main widget, does nothing by default. - virtual void initialize(); /** @name Create tool functions*/ //@{ int createTool( const QString& );