From 45d0f6556f2f856e9f4f3f53b78bcb7ccf3762b3 Mon Sep 17 00:00:00 2001 From: san Date: Tue, 26 Oct 2010 06:12:16 +0000 Subject: [PATCH] Rolling back previous integration from KALLISTO team (virtual initialize() method for application classes) --- src/CAM/CAM_Application.cxx | 8 ++++---- src/CAM/CAM_Application.h | 3 ++- src/STD/STD_Application.cxx | 14 ++------------ src/STD/STD_Application.h | 1 - src/SUIT/SUIT_Application.cxx | 9 --------- src/SUIT/SUIT_Application.h | 3 --- 6 files changed, 8 insertions(+), 30 deletions(-) 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& ); -- 2.39.2