#include <Application.hpp>
Singleton application wide configuration management.
openstudio::ApplicationSingleton::~ApplicationSingleton |
( |
| ) |
|
QCoreApplication* openstudio::ApplicationSingleton::application |
( |
bool |
gui = true | ) |
|
get the QApplication, if no QApplication has been set this will create a default one
boost::optional<bool> openstudio::ApplicationSingleton::getSettingValueAsBool |
( |
const std::string & |
key | ) |
|
Get the value of setting as given type, be careful when using getSettingValueAsBool you must first check if the optional is set and then check its value.
boost::optional<double> openstudio::ApplicationSingleton::getSettingValueAsDouble |
( |
const std::string & |
key | ) |
|
boost::optional<int> openstudio::ApplicationSingleton::getSettingValueAsInt |
( |
const std::string & |
key | ) |
|
boost::optional<std::string> openstudio::ApplicationSingleton::getSettingValueAsString |
( |
const std::string & |
key | ) |
|
bool openstudio::ApplicationSingleton::hasSetting |
( |
const std::string & |
key | ) |
|
Check if application has given setting.
bool openstudio::ApplicationSingleton::isDefaultInstance |
( |
| ) |
|
Check if the application is headless.
bool openstudio::ApplicationSingleton::processEvents |
( |
| ) |
|
Process pending Qt events returns true if some work was done.
bool openstudio::ApplicationSingleton::processEvents |
( |
int |
maxTime | ) |
|
void openstudio::ApplicationSingleton::removeSetting |
( |
const std::string & |
key | ) |
|
bool openstudio::ApplicationSingleton::setApplication |
( |
QCoreApplication * |
qApplication | ) |
|
set the QApplication, this should be done before calling application(), no op if it has already been set.
Returns true if set succeeded.
void openstudio::ApplicationSingleton::setSettingValue |
( |
const std::string & |
key, |
|
|
bool |
value |
|
) |
| |
Set application value to given value.
void openstudio::ApplicationSingleton::setSettingValue |
( |
const std::string & |
key, |
|
|
int |
value |
|
) |
| |
void openstudio::ApplicationSingleton::setSettingValue |
( |
const std::string & |
key, |
|
|
double |
value |
|
) |
| |
void openstudio::ApplicationSingleton::setSettingValue |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
* openstudio::ApplicationSingleton::sketchUpWidget |
( |
| ) |
|
get the QWidget wrapper around SketchUp window initialized by call to application, only implemented for windows