diff --git a/modules/gui/src/gosty_app.cc b/modules/gui/src/gosty_app.cc index 949c764910e16d957ccec9bd1edba5e9c24b6ec5..ec2a6b14c4d4056ffc580a046281fe6c7a547789 100644 --- a/modules/gui/src/gosty_app.cc +++ b/modules/gui/src/gosty_app.cc @@ -66,6 +66,10 @@ GostyApp* GostyApp::Instance() { return GostyApp::app_; } +bool GostyApp::ValidInstance() { + return GostyApp::app_ != NULL; +} + void GostyApp::SetAppTitle(const QString& app_title) { main_->setWindowTitle(app_title); diff --git a/modules/gui/src/gosty_app.hh b/modules/gui/src/gosty_app.hh index 47b0f23fadfe151a262e25f39910b5da9eda1c24..5398c01c83a71474a29cf9c3c394bb600f0c83b9 100644 --- a/modules/gui/src/gosty_app.hh +++ b/modules/gui/src/gosty_app.hh @@ -157,6 +157,11 @@ public: /// \return the GostyApp instance static GostyApp* Instance(); + /// \brief + /// GostyApp is implemented as Singleton. This returns whether there is + /// already a valid instance around + static bool ValidInstance(); + /// \brief This methods sets the Title of this Application /// \param app_title Title that will be displayed in the title bar void SetAppTitle(const QString& app_title);