| 333 | } |
| 334 | |
| 335 | QMenu* TrayIcon::buildDefaultActions() |
| 336 | { |
| 337 | QAction *showWindowAction = new QAction(tr("&Show/hide window"), this); |
| 338 | connect(showWindowAction, &QAction::triggered, this, &TrayIcon::iconActivated); |
| 339 | showWindowAction->setProperty("tag", "show"); |
| 340 | |
| 341 | QAction *quitAction = new QAction(tr("&Quit"), this); |
| 342 | connect(quitAction, &QAction::triggered, qApp, &QCoreApplication::quit); |
| 343 | quitAction->setProperty("tag", "quit"); |
| 344 | |
| 345 | QMenu *menu = new QMenu(); |
| 346 | menu->addAction(tray_disableAction); |
| 347 | menu->addMenu(tray_presetMenu); |
| 348 | menu->addSeparator(); |
| 349 | menu->addAction(showWindowAction); |
| 350 | menu->addAction(quitAction); |
| 351 | return menu; |
| 352 | } |
| 353 | |
| 354 | QMenu* TrayIcon::getTrayMenu() |
| 355 | { |
no test coverage detected