| 58 | using CoreProcessState = CoreProcess::ProcessState; |
| 59 | |
| 60 | MainWindow::MainWindow() |
| 61 | : ui{std::make_unique<Ui::MainWindow>()}, |
| 62 | m_coreProcess(m_serverConfig), |
| 63 | m_serverConnection(this, m_serverConfig), |
| 64 | m_clientConnection(this), |
| 65 | m_trayIcon{new QSystemTrayIcon(this)}, |
| 66 | m_guiDupeChecker{new QLocalServer(this)}, |
| 67 | m_daemonIpcClient{new ipc::DaemonIpcClient(this)}, |
| 68 | m_logDock{new LogDock(this)}, |
| 69 | m_lblSecurityStatus{new QLabel(this)}, |
| 70 | m_lblStatus{new QLabel(this)}, |
| 71 | m_btnFingerprint{new QPushButton(this)}, |
| 72 | m_btnUpdate{new QPushButton(this)}, |
| 73 | m_menuFile{new QMenu(this)}, |
| 74 | m_menuEdit{new QMenu(this)}, |
| 75 | m_menuView{new QMenu(this)}, |
| 76 | m_menuHelp{new QMenu(this)}, |
| 77 | m_actionAbout{new QAction(this)}, |
| 78 | m_actionClearSettings{new QAction(this)}, |
| 79 | m_actionReportBug{new QAction(this)}, |
| 80 | m_actionMinimize{new QAction(this)}, |
| 81 | m_actionQuit{new QAction(this)}, |
| 82 | m_actionTrayQuit{new QAction(this)}, |
| 83 | m_actionRestore{new QAction(this)}, |
| 84 | m_actionSettings{new QAction(this)}, |
| 85 | m_actionStartCore{new QAction(this)}, |
| 86 | m_actionRestartCore{new QAction(this)}, |
| 87 | m_actionStopCore{new QAction(this)}, |
| 88 | m_networkMonitor{new NetworkMonitor(this)} |
| 89 | { |
| 90 | ui->setupUi(this); |
| 91 | |
| 92 | setWindowIcon(QIcon::fromTheme(kRevFqdnName)); |
| 93 | |
| 94 | addDockWidget(Qt::BottomDockWidgetArea, m_logDock); |
| 95 | |
| 96 | // Setup Actions |
| 97 | m_actionAbout->setMenuRole(QAction::AboutRole); |
| 98 | m_actionAbout->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::HelpAbout)); |
| 99 | |
| 100 | m_actionMinimize->setIcon(QIcon::fromTheme(QStringLiteral("window-minimize-pip"))); |
| 101 | m_actionRestore->setIcon(QIcon::fromTheme(QStringLiteral("window-restore-pip"))); |
| 102 | |
| 103 | if (!deskflow::platform::isWindows()) { |
| 104 | m_actionQuit->setShortcut(QKeySequence::Quit); |
| 105 | m_actionTrayQuit->setShortcut(QKeySequence::Quit); |
| 106 | } |
| 107 | |
| 108 | m_actionQuit->setIcon(QIcon::fromTheme("application-exit")); |
| 109 | m_actionQuit->setMenuRole(QAction::QuitRole); |
| 110 | |
| 111 | m_actionTrayQuit->setIcon(QIcon::fromTheme("application-exit")); |
| 112 | m_actionTrayQuit->setMenuRole(QAction::NoRole); |
| 113 | |
| 114 | m_actionClearSettings->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear-all"))); |
| 115 | m_actionClearSettings->setMenuRole(QAction::NoRole); |
| 116 | |
| 117 | m_actionSettings->setIcon(QIcon::fromTheme(QStringLiteral("configure"))); |
nothing calls this directly
no test coverage detected