Add save screenshot shortcut to main window

merge-requests/1/head
Moritz Müller 2017-09-29 13:12:31 +02:00
rodzic 55f82a60e4
commit a227c54e40
3 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -1978,6 +1978,7 @@ void UI_Mainwindow::show_howto_operate()
"Press 'c' to center the horizontal position.\n" "Press 'c' to center the horizontal position.\n"
"Press 't' to center the trigger position.\n" "Press 't' to center the trigger position.\n"
"Press 'f' to toggle FFT.\n" "Press 'f' to toggle FFT.\n"
"Press 'p' to save a screenshot.\n"
); );
msgBox.exec(); msgBox.exec();

Wyświetl plik

@ -231,7 +231,8 @@ private:
*select_chan4_act, *select_chan4_act,
*toggle_fft_act, *toggle_fft_act,
*center_trigger_act, *center_trigger_act,
*center_position_act; *center_position_act,
*save_screenshot_act;
struct tmcdev *device; struct tmcdev *device;

Wyświetl plik

@ -509,6 +509,11 @@ UI_Mainwindow::UI_Mainwindow()
toggle_fft_act = new QAction(this); toggle_fft_act = new QAction(this);
toggle_fft_act->setShortcut(QKeySequence("f")); toggle_fft_act->setShortcut(QKeySequence("f"));
addAction(toggle_fft_act); addAction(toggle_fft_act);
save_screenshot_act = new QAction(this);
save_screenshot_act->setShortcut(QKeySequence("p"));
connect(save_screenshot_act, SIGNAL(triggered()), this, SLOT(save_screenshot()));
addAction(save_screenshot_act);
DPRwidget->setEnabled(false); DPRwidget->setEnabled(false);