added copy from clipboard to tray icon

This commit is contained in:
Niklas 2019-05-11 20:29:51 +02:00
parent 1924d00f88
commit 6d12575915
2 changed files with 4 additions and 2 deletions

View File

@ -76,13 +76,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
QAction *active = ACTION(tr("Screenshot active window"), menu);
connect(active, &QAction::triggered, this, [] { screenshotter::activeDelayed(); });
#endif
QAction *copyClipboard = ACTION(tr("Copy from Clipbaord"), menu);
QAction *picker = ACTION(tr("Show color picker"), menu);
QAction *rec = ACTION(tr("Record screen"), menu);
QAction *recoff = ACTION(tr("Stop recording"), menu);
QAction *recabort = ACTION(tr("Abort recording"), menu);
menu->addActions({ shtoggle, picker });
menu->addSeparator();
menu->addActions({ fullscreen, area });
menu->addActions({ fullscreen, area, copyClipboard });
#ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW
menu->addAction(active);
#endif
@ -103,6 +104,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
});
connect(fullscreen, &QAction::triggered, this, [] { screenshotter::fullscreenDelayed(); });
connect(area, &QAction::triggered, this, [] { screenshotter::areaDelayed(); });
connect(copyClipboard, &QAction::triggered, this, &clipboardcopy::copyClipboard);
connect(rec, &QAction::triggered, this, &MainWindow::rec);
connect(recoff, &QAction::triggered, controller, &RecordingController::end);
connect(recabort, &QAction::triggered, controller, &RecordingController::abort);

View File

@ -58,7 +58,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent), ui(new Ui::Se
#ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW
addHotkeyItem(ui->hotkeys, tr("Active window"), "active", [&] { screenshotter::active(); });
#endif
addHotkeyItem(ui->hotkeys, tr("Copy Clipboard"), "clipboard", [] { clipboardcopy::copyClipboard(); });
addHotkeyItem(ui->hotkeys, tr("Copy from Clipboard"), "clipboard", [] { clipboardcopy::copyClipboard(); });
addHotkeyItem(ui->hotkeys, tr("Color picker"), "picker", [] { ColorPickerScene::showPicker(); });
addHotkeyItem(ui->hotkeys, tr("Stop Recording"), "recordingstop", [&] { MainWindow::inst()->controller->end(); });
addHotkeyItem(ui->hotkeys, tr("Start Recording"), "recordingstart", [&] { MainWindow::inst()->rec(); });