[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 05/07: qtgui: controlpanel toggle in popup
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 05/07: qtgui: controlpanel toggle in popup menu. |
Date: |
Tue, 31 Mar 2015 14:51:20 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 107db61b14482315714834ffd4eacc5b23166286
Author: Tom Rondeau <address@hidden>
Date: Mon Mar 30 13:56:19 2015 -0700
qtgui: controlpanel toggle in popup menu.
---
gr-qtgui/include/gnuradio/qtgui/timedisplayform.h | 4 +++-
gr-qtgui/lib/timedisplayform.cc | 22 ++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/gr-qtgui/include/gnuradio/qtgui/timedisplayform.h
b/gr-qtgui/include/gnuradio/qtgui/timedisplayform.h
index a52e1bf..99638b6 100644
--- a/gr-qtgui/include/gnuradio/qtgui/timedisplayform.h
+++ b/gr-qtgui/include/gnuradio/qtgui/timedisplayform.h
@@ -80,8 +80,9 @@ public slots:
void setTriggerTagKey(QString s);
void setTriggerTagKey(const std::string &s);
- void teardownControlPanel();
+ void setupControlPanel(bool en);
void setupControlPanel();
+ void teardownControlPanel();
private slots:
void newData(const QEvent*);
@@ -119,6 +120,7 @@ private:
QAction *d_stemmenu;
QAction *d_semilogxmenu;
QAction *d_semilogymenu;
+ QAction *d_controlpanelmenu;
std::vector<QAction*> d_tagsmenu;
QMenu *d_triggermenu;
diff --git a/gr-qtgui/lib/timedisplayform.cc b/gr-qtgui/lib/timedisplayform.cc
index c9414a2..e55e145 100644
--- a/gr-qtgui/lib/timedisplayform.cc
+++ b/gr-qtgui/lib/timedisplayform.cc
@@ -99,6 +99,12 @@ TimeDisplayForm::TimeDisplayForm(int nplots, QWidget* parent)
d_triggermenu->addAction(d_tr_tag_key_act);
d_menu->addMenu(d_triggermenu);
+ d_controlpanelmenu = new QAction("Control Panel", this);
+ d_controlpanelmenu->setCheckable(true);
+ d_menu->addAction(d_controlpanelmenu);
+ connect(d_controlpanelmenu, SIGNAL(triggered(bool)),
+ this, SLOT(setupControlPanel(bool)));
+
setTriggerMode(gr::qtgui::TRIG_MODE_FREE);
setTriggerSlope(gr::qtgui::TRIG_SLOPE_POS);
@@ -143,10 +149,23 @@ TimeDisplayForm::~TimeDisplayForm()
teardownControlPanel();
}
+void
+TimeDisplayForm::setupControlPanel(bool en)
+{
+ if(en) {
+ setupControlPanel();
+ }
+ else {
+ teardownControlPanel();
+ }
+}
void
TimeDisplayForm::setupControlPanel()
{
+ if(d_controlpanel)
+ delete d_controlpanel;
+
// Create the control panel layout
d_controlpanel = new TimeControlPanel(this);
@@ -169,6 +188,8 @@ TimeDisplayForm::setupControlPanel()
d_controlpanel->toggleGrid(d_grid_act->isChecked());
d_controlpanel->toggleTriggerMode(getTriggerMode());
d_controlpanel->toggleTriggerSlope(getTriggerSlope());
+
+ d_controlpanelmenu->setChecked(true);
}
void
@@ -179,6 +200,7 @@ TimeDisplayForm::teardownControlPanel()
delete d_controlpanel;
d_controlpanel = NULL;
}
+ d_controlpanelmenu->setChecked(false);
}
TimeDomainDisplayPlot*
- [Commit-gnuradio] [gnuradio] branch master updated (1ef31a4 -> 066003f), git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 04/07: qtgui: improves speed of time plots., git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 07/07: Merge remote-tracking branch 'tom/qtgui/controlpanel', git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 06/07: qtgui: better signal/slot usage to update the plots., git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 05/07: qtgui: controlpanel toggle in popup menu.,
git <=
- [Commit-gnuradio] [gnuradio] 03/07: qtgui: changing style of grid lines for better readability., git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 02/07: qtgui: wip: adding control panel to time display., git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 01/07: modtool: Added sample manifest file, git, 2015/03/31