From 6d12575915fb5ce6d5d3fd8277d47811fb1eab60 Mon Sep 17 00:00:00 2001 From: Gurkengewuerz Date: Sat, 11 May 2019 20:29:51 +0200 Subject: [PATCH] added copy from clipboard to tray icon --- src/mainwindow.cpp | 4 +++- src/settingsdialog.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 30b1271..c5c3b9f 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -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); diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index 1bddfcd..46bb8a9 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -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(); });