MCPcopy Create free account
hub / github.com/deskflow/deskflow / MainWindow

Method MainWindow

src/lib/gui/MainWindow.cpp:60–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58using CoreProcessState = CoreProcess::ProcessState;
59
60MainWindow::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")));

Callers

nothing calls this directly

Calls 6

isWindowsFunction · 0.85
isEnabledFunction · 0.85
isCertValidFunction · 0.85
generateCertificateFunction · 0.85
certFingerprintFunction · 0.85
listenMethod · 0.80

Tested by

no test coverage detected