diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-02-21 07:33:02 -0800 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-02-21 07:33:02 -0800 |
commit | e34866dad21a98e901c188df7e87f37ae5502a88 (patch) | |
tree | fb5dd0f2c395b31c70e65f127ce0190ec2b90a56 /gr-qtgui/lib/displayform.cc | |
parent | 4aabba72f0d268174855fce97a80bd55acb1358c (diff) | |
parent | 762a08915c252e0604b466dc97d5e51b0a86562d (diff) |
Merge branch 'master' into next
Conflicts:
gr-utils/python/modtool/templates.py
Diffstat (limited to 'gr-qtgui/lib/displayform.cc')
-rw-r--r-- | gr-qtgui/lib/displayform.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gr-qtgui/lib/displayform.cc b/gr-qtgui/lib/displayform.cc index 27a09512fc..13c2d8a193 100644 --- a/gr-qtgui/lib/displayform.cc +++ b/gr-qtgui/lib/displayform.cc @@ -29,6 +29,7 @@ DisplayForm::DisplayForm(int nplots, QWidget* parent) : QWidget(parent), d_nplots(nplots), d_system_specified_flag(false) { d_isclosed = false; + d_axislabels = true; // Set the initial plot size resize(QSize(800, 600)); @@ -53,11 +54,18 @@ DisplayForm::DisplayForm(int nplots, QWidget* parent) this, SLOT(setGrid(bool))); d_grid_state = false; + d_axislabelsmenu = new QAction("Axis Labels", this); + d_axislabelsmenu->setCheckable(true); + d_axislabelsmenu->setStatusTip(tr("Toggle Axis Labels on/off")); + connect(d_axislabelsmenu, SIGNAL(triggered(bool)), + this, SLOT(setAxisLabels(bool))); + // Create a pop-up menu for manipulating the figure d_menu_on = true; d_menu = new QMenu(this); d_menu->addAction(d_stop_act); d_menu->addAction(d_grid_act); + d_menu->addAction(d_axislabelsmenu); for(int i = 0; i < d_nplots; i++) { d_line_title_act.push_back(new LineTitleAction(i, this)); @@ -339,6 +347,14 @@ DisplayForm::setGrid(bool on) } void +DisplayForm::setAxisLabels(bool en) +{ + d_axislabels = en; + d_axislabelsmenu->setChecked(en); + getPlot()->setAxisLabels(d_axislabels); +} + +void DisplayForm::saveFigure() { QPixmap qpix = QPixmap::grabWidget(this); |