refs #335, renamed enums in Application context

component means something different in GUI, renamed to application
This commit is contained in:
Klaus Basan
2014-10-10 01:42:07 +02:00
committed by Roland Winklmeier
parent 678cc2e0cc
commit 5eaaf70fcd
3 changed files with 12 additions and 10 deletions

View File

@@ -43,18 +43,18 @@ namespace BlackCore
IContextApplication(CRuntimeConfig::ContextMode mode, CRuntime *runtime); IContextApplication(CRuntimeConfig::ContextMode mode, CRuntime *runtime);
public: public:
//! Components //! Parts of the application
enum Component : uint enum Application : uint
{ {
ComponentGui, ApplicationGui,
ComponentCore ApplicationCore
}; };
//! What a component does //! State of application
enum Actions : uint enum Actions : uint
{ {
ActionStarts, ApplicationStarts,
ActionStops ApplicationStops
}; };
//! Service name //! Service name

View File

@@ -65,11 +65,13 @@ MainWindow::~MainWindow()
*/ */
void MainWindow::gracefulShutdown() void MainWindow::gracefulShutdown()
{ {
if (!this->m_init) return; if (!this->m_init) { return; }
this->m_init = false; this->m_init = false;
if (this->getIContextApplication()) if (this->getIContextApplication())
this->getIContextApplication()->notifyAboutComponentChange(IContextApplication::ComponentGui, IContextApplication::ActionStops); {
this->getIContextApplication()->notifyAboutComponentChange(IContextApplication::ApplicationGui, IContextApplication::ApplicationStops);
}
// close info window // close info window
if (this->m_compInfoWindow) if (this->m_compInfoWindow)

View File

@@ -132,7 +132,7 @@ void MainWindow::init(const CRuntimeConfig &runtimeConfig)
this->ps_setMainPage(true); this->ps_setMainPage(true);
// starting // starting
this->getIContextApplication()->notifyAboutComponentChange(IContextApplication::ComponentGui, IContextApplication::ActionStarts); this->getIContextApplication()->notifyAboutComponentChange(IContextApplication::ApplicationGui, IContextApplication::ApplicationStarts);
// We don't receive signals from the past. So ask for it simulate an initial signal // We don't receive signals from the past. So ask for it simulate an initial signal
ps_onSimulatorConnectionChanged(this->getIContextSimulator()->isConnected()); ps_onSimulatorConnectionChanged(this->getIContextSimulator()->isConnected());