| 32 | { |
| 33 | |
| 34 | Application::Application(const std::shared_ptr<ClientContext>& ctx, QWidget* parent) : QMainWindow(parent) { |
| 35 | context_ = ctx; |
| 36 | settings_ = Settings::Instance(); |
| 37 | resize(1515, 768); |
| 38 | auto notifier = this->context_->GetMessageNotifier(); |
| 39 | (new MainWindowWrapper(notifier, this))->Setup(tr("GammaRay Client")); |
| 40 | |
| 41 | theme_ = new MainWindowPrivate(this); |
| 42 | QString app_dir = qApp->applicationDirPath(); |
| 43 | QString style_dir = app_dir + "/resources/"; |
| 44 | theme_->AdvancedStyleSheet = new acss::QtAdvancedStylesheet(this); |
| 45 | theme_->AdvancedStyleSheet->setStylesDirPath(style_dir); |
| 46 | theme_->AdvancedStyleSheet->setOutputDirPath(app_dir + "/output"); |
| 47 | theme_->AdvancedStyleSheet->setCurrentStyle("qt_material"); |
| 48 | theme_->AdvancedStyleSheet->setCurrentTheme("light_blue"); |
| 49 | theme_->AdvancedStyleSheet->updateStylesheet(); |
| 50 | setWindowIcon(theme_->AdvancedStyleSheet->styleIcon()); |
| 51 | qApp->setStyleSheet(theme_->AdvancedStyleSheet->styleSheet()); |
| 52 | |
| 53 | CreateLayout(); |
| 54 | Init(); |
| 55 | |
| 56 | } |
| 57 | |
| 58 | Application::~Application() { |
| 59 | delete theme_; |
nothing calls this directly
no test coverage detected