diff --git a/interface.cpp b/interface.cpp index 7d9df05..9754fd9 100644 --- a/interface.cpp +++ b/interface.cpp @@ -1964,6 +1964,7 @@ void UI_Mainwindow::show_howto_operate() "Press 'c' to center the horizontal position.\n" "Press 't' to center the trigger position.\n" "Press 'f' to toggle FFT.\n" + "Press 'p' to save a screenshot.\n" ); msgBox.exec(); diff --git a/mainwindow.h b/mainwindow.h index 00e9d39..50989fa 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -231,7 +231,8 @@ private: *select_chan4_act, *toggle_fft_act, *center_trigger_act, - *center_position_act; + *center_position_act, + *save_screenshot_act; struct tmcdev *device; diff --git a/mainwindow_constr.cpp b/mainwindow_constr.cpp index c541fa0..641ea4a 100644 --- a/mainwindow_constr.cpp +++ b/mainwindow_constr.cpp @@ -509,6 +509,11 @@ UI_Mainwindow::UI_Mainwindow() toggle_fft_act = new QAction(this); toggle_fft_act->setShortcut(QKeySequence("f")); 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);