#pragma once #include #include #include #include #include class Configurator:public QApplication { Q_OBJECT public: Configurator(int &argc, char **&argv); QNetworkAccessManager &nam() { return _nam; } QString baseUrl() const { return "https://dashboard." + _loginDialog->domain(); } QString user() const { return _loginDialog->user(); } QString password() const { return _loginDialog->password(); } QByteArray download(QUrl const &url); void waitForDownload(QNetworkReply *r) const; Services const &services() const { return _services; } protected Q_SLOTS: void loginRequested(); private: QNetworkAccessManager _nam; FederatedLogin * _loginDialog; Services _services; }; #define app static_cast(Configurator::instance())