GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
form_menus.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef FORM_MENUS_H
12 #define FORM_MENUS_H
13 
14 #include <QtGui/QDoubleValidator>
15 #include <QtGui/QIntValidator>
16 #include <QtGui/QtGui>
17 #include <QComboBox>
18 #include <stdexcept>
19 #include <vector>
20 
21 #include <QtWidgets/QtWidgets>
22 
23 #include <gnuradio/filter/firdes.h>
26 #include <qwt_symbol.h>
27 
28 class LineColorMenu : public QMenu
29 {
30  Q_OBJECT
31 
32 public:
33  LineColorMenu(unsigned int which, QWidget* parent)
34  : QMenu("Line Color", parent), d_which(which)
35  {
36  d_grp = new QActionGroup(this);
37 
38  d_act.push_back(new QAction("Blue", this));
39  d_act.push_back(new QAction("Red", this));
40  d_act.push_back(new QAction("Green", this));
41  d_act.push_back(new QAction("Black", this));
42  d_act.push_back(new QAction("Cyan", this));
43  d_act.push_back(new QAction("Magenta", this));
44  d_act.push_back(new QAction("Yellow", this));
45  d_act.push_back(new QAction("Gray", this));
46  d_act.push_back(new QAction("Dark Red", this));
47  d_act.push_back(new QAction("Dark Green", this));
48  d_act.push_back(new QAction("Dark Blue", this));
49  d_act.push_back(new QAction("Dark Gray", this));
50 
51  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getBlue()));
52  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getRed()));
53  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getGreen()));
54  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getBlack()));
55  connect(d_act[4], SIGNAL(triggered()), this, SLOT(getCyan()));
56  connect(d_act[5], SIGNAL(triggered()), this, SLOT(getMagenta()));
57  connect(d_act[6], SIGNAL(triggered()), this, SLOT(getYellow()));
58  connect(d_act[7], SIGNAL(triggered()), this, SLOT(getGray()));
59  connect(d_act[8], SIGNAL(triggered()), this, SLOT(getDarkRed()));
60  connect(d_act[9], SIGNAL(triggered()), this, SLOT(getDarkGreen()));
61  connect(d_act[10], SIGNAL(triggered()), this, SLOT(getDarkBlue()));
62  connect(d_act[11], SIGNAL(triggered()), this, SLOT(getDarkGray()));
63 
64  QListIterator<QAction*> i(d_act);
65  while (i.hasNext()) {
66  QAction* a = i.next();
67  a->setCheckable(true);
68  a->setActionGroup(d_grp);
69  addAction(a);
70  }
71  }
72 
73  ~LineColorMenu() override {}
74 
75  int getNumActions() const { return d_act.size(); }
76 
77  QAction* getAction(unsigned int which)
78  {
79  if (which < static_cast<unsigned int>(d_act.size()))
80  return d_act[which];
81  else
82  throw std::runtime_error("LineColorMenu::getAction: which out of range.");
83  }
84 
85 signals:
86  void whichTrigger(unsigned int which, const QString& name);
87 
88 public slots:
89  void getBlue() { emit whichTrigger(d_which, "blue"); }
90  void getRed() { emit whichTrigger(d_which, "red"); }
91  void getGreen() { emit whichTrigger(d_which, "green"); }
92  void getBlack() { emit whichTrigger(d_which, "black"); }
93  void getCyan() { emit whichTrigger(d_which, "cyan"); }
94  void getMagenta() { emit whichTrigger(d_which, "magenta"); }
95  void getYellow() { emit whichTrigger(d_which, "yellow"); }
96  void getGray() { emit whichTrigger(d_which, "gray"); }
97  void getDarkRed() { emit whichTrigger(d_which, "darkred"); }
98  void getDarkGreen() { emit whichTrigger(d_which, "darkgreen"); }
99  void getDarkBlue() { emit whichTrigger(d_which, "darkblue"); }
100  void getDarkGray() { emit whichTrigger(d_which, "darkgray"); }
101 
102 private:
103  QActionGroup* d_grp;
104  QList<QAction*> d_act;
105  int d_which;
106 };
107 
108 
109 /********************************************************************/
110 
111 
112 class LineWidthMenu : public QMenu
113 {
114  Q_OBJECT
115 
116 public:
117  LineWidthMenu(unsigned int which, QWidget* parent)
118  : QMenu("Line Width", parent), d_which(which)
119  {
120  d_grp = new QActionGroup(this);
121 
122  d_act.push_back(new QAction("1", this));
123  d_act.push_back(new QAction("2", this));
124  d_act.push_back(new QAction("3", this));
125  d_act.push_back(new QAction("4", this));
126  d_act.push_back(new QAction("5", this));
127  d_act.push_back(new QAction("6", this));
128  d_act.push_back(new QAction("7", this));
129  d_act.push_back(new QAction("8", this));
130  d_act.push_back(new QAction("9", this));
131  d_act.push_back(new QAction("10", this));
132 
133  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getOne()));
134  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getTwo()));
135  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getThree()));
136  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getFour()));
137  connect(d_act[4], SIGNAL(triggered()), this, SLOT(getFive()));
138  connect(d_act[5], SIGNAL(triggered()), this, SLOT(getSix()));
139  connect(d_act[6], SIGNAL(triggered()), this, SLOT(getSeven()));
140  connect(d_act[7], SIGNAL(triggered()), this, SLOT(getEight()));
141  connect(d_act[8], SIGNAL(triggered()), this, SLOT(getNine()));
142  connect(d_act[9], SIGNAL(triggered()), this, SLOT(getTen()));
143 
144  QListIterator<QAction*> i(d_act);
145  while (i.hasNext()) {
146  QAction* a = i.next();
147  a->setCheckable(true);
148  a->setActionGroup(d_grp);
149  addAction(a);
150  }
151  }
152 
153  ~LineWidthMenu() override {}
154 
155  int getNumActions() const { return d_act.size(); }
156 
157  QAction* getAction(unsigned int which)
158  {
159  if (which < static_cast<unsigned int>(d_act.size()))
160  return d_act[which];
161  else
162  throw std::runtime_error("LineWidthMenu::getAction: which out of range.");
163  }
164 
165 signals:
166  void whichTrigger(unsigned int which, unsigned int width);
167 
168 public slots:
169  void getOne() { emit whichTrigger(d_which, 1); }
170  void getTwo() { emit whichTrigger(d_which, 2); }
171  void getThree() { emit whichTrigger(d_which, 3); }
172  void getFour() { emit whichTrigger(d_which, 4); }
173  void getFive() { emit whichTrigger(d_which, 5); }
174  void getSix() { emit whichTrigger(d_which, 6); }
175  void getSeven() { emit whichTrigger(d_which, 7); }
176  void getEight() { emit whichTrigger(d_which, 8); }
177  void getNine() { emit whichTrigger(d_which, 9); }
178  void getTen() { emit whichTrigger(d_which, 10); }
179 
180 private:
181  QActionGroup* d_grp;
182  QList<QAction*> d_act;
183  int d_which;
184 };
185 
186 
187 /********************************************************************/
188 
189 
190 class LineStyleMenu : public QMenu
191 {
192  Q_OBJECT
193 
194 public:
195  LineStyleMenu(unsigned int which, QWidget* parent)
196  : QMenu("Line Style", parent), d_which(which)
197  {
198  d_grp = new QActionGroup(this);
199 
200  d_act.push_back(new QAction("None", this));
201  d_act.push_back(new QAction("Solid", this));
202  d_act.push_back(new QAction("Dash", this));
203  d_act.push_back(new QAction("Dots", this));
204  d_act.push_back(new QAction("Dash-Dot", this));
205  d_act.push_back(new QAction("Dash-Dot-Dot", this));
206 
207  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getNone()));
208  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getSolid()));
209  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getDash()));
210  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getDots()));
211  connect(d_act[4], SIGNAL(triggered()), this, SLOT(getDashDot()));
212  connect(d_act[5], SIGNAL(triggered()), this, SLOT(getDashDotDot()));
213 
214  QListIterator<QAction*> i(d_act);
215  while (i.hasNext()) {
216  QAction* a = i.next();
217  a->setCheckable(true);
218  a->setActionGroup(d_grp);
219  addAction(a);
220  }
221  }
222 
223  ~LineStyleMenu() override {}
224 
225  int getNumActions() const { return d_act.size(); }
226 
227  QAction* getAction(unsigned int which)
228  {
229  if (which < static_cast<unsigned int>(d_act.size()))
230  return d_act[which];
231  else
232  throw std::runtime_error("LineStyleMenu::getAction: which out of range.");
233  }
234 
235 signals:
236  void whichTrigger(unsigned int which, Qt::PenStyle);
237 
238 public slots:
239  void getNone() { emit whichTrigger(d_which, Qt::NoPen); }
240  void getSolid() { emit whichTrigger(d_which, Qt::SolidLine); }
241  void getDash() { emit whichTrigger(d_which, Qt::DashLine); }
242  void getDots() { emit whichTrigger(d_which, Qt::DotLine); }
243  void getDashDot() { emit whichTrigger(d_which, Qt::DashDotLine); }
244  void getDashDotDot() { emit whichTrigger(d_which, Qt::DashDotDotLine); }
245 
246 private:
247  QActionGroup* d_grp;
248  QList<QAction*> d_act;
249  int d_which;
250 };
251 
252 
253 /********************************************************************/
254 
255 
256 class LineMarkerMenu : public QMenu
257 {
258  Q_OBJECT
259 
260 public:
261  LineMarkerMenu(unsigned int which, QWidget* parent)
262  : QMenu("Line Marker", parent), d_which(which)
263  {
264  d_grp = new QActionGroup(this);
265 
266  d_act.push_back(new QAction("None", this));
267  d_act.push_back(new QAction("Circle", this));
268  d_act.push_back(new QAction("Rectangle", this));
269  d_act.push_back(new QAction("Diamond", this));
270  d_act.push_back(new QAction("Triangle", this));
271  d_act.push_back(new QAction("Down Triangle", this));
272  d_act.push_back(new QAction("Left Triangle", this));
273  d_act.push_back(new QAction("Right Triangle", this));
274  d_act.push_back(new QAction("Cross", this));
275  d_act.push_back(new QAction("X-Cross", this));
276  d_act.push_back(new QAction("Horiz. Line", this));
277  d_act.push_back(new QAction("Vert. Line", this));
278  d_act.push_back(new QAction("Star 1", this));
279  d_act.push_back(new QAction("Star 2", this));
280  d_act.push_back(new QAction("Hexagon", this));
281 
282  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getNone()));
283  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getCircle()));
284  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getRect()));
285  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getDiamond()));
286  connect(d_act[4], SIGNAL(triggered()), this, SLOT(getTriangle()));
287  connect(d_act[5], SIGNAL(triggered()), this, SLOT(getDTriangle()));
288  connect(d_act[6], SIGNAL(triggered()), this, SLOT(getLTriangle()));
289  connect(d_act[7], SIGNAL(triggered()), this, SLOT(getRTriangle()));
290  connect(d_act[8], SIGNAL(triggered()), this, SLOT(getCross()));
291  connect(d_act[9], SIGNAL(triggered()), this, SLOT(getXCross()));
292  connect(d_act[10], SIGNAL(triggered()), this, SLOT(getHLine()));
293  connect(d_act[11], SIGNAL(triggered()), this, SLOT(getVLine()));
294  connect(d_act[12], SIGNAL(triggered()), this, SLOT(getStar1()));
295  connect(d_act[13], SIGNAL(triggered()), this, SLOT(getStar2()));
296  connect(d_act[14], SIGNAL(triggered()), this, SLOT(getHexagon()));
297 
298  QListIterator<QAction*> i(d_act);
299  while (i.hasNext()) {
300  QAction* a = i.next();
301  a->setCheckable(true);
302  a->setActionGroup(d_grp);
303  addAction(a);
304  }
305  }
306 
307  ~LineMarkerMenu() override {}
308 
309  int getNumActions() const { return d_act.size(); }
310 
311  QAction* getAction(unsigned int which)
312  {
313  if (which < static_cast<unsigned int>(d_act.size()))
314  return d_act[which];
315  else
316  throw std::runtime_error("LineMarkerMenu::getAction: which out of range.");
317  }
318 
319 signals:
320  void whichTrigger(unsigned int which, QwtSymbol::Style);
321 
322 public slots:
323  void getNone() { emit whichTrigger(d_which, QwtSymbol::NoSymbol); }
324  void getCircle() { emit whichTrigger(d_which, QwtSymbol::Ellipse); }
325  void getRect() { emit whichTrigger(d_which, QwtSymbol::Rect); }
326  void getDiamond() { emit whichTrigger(d_which, QwtSymbol::Diamond); }
327  void getTriangle() { emit whichTrigger(d_which, QwtSymbol::Triangle); }
328  void getDTriangle() { emit whichTrigger(d_which, QwtSymbol::DTriangle); }
329  void getLTriangle() { emit whichTrigger(d_which, QwtSymbol::LTriangle); }
330  void getRTriangle() { emit whichTrigger(d_which, QwtSymbol::RTriangle); }
331  void getCross() { emit whichTrigger(d_which, QwtSymbol::Cross); }
332  void getXCross() { emit whichTrigger(d_which, QwtSymbol::XCross); }
333  void getHLine() { emit whichTrigger(d_which, QwtSymbol::HLine); }
334  void getVLine() { emit whichTrigger(d_which, QwtSymbol::VLine); }
335  void getStar1() { emit whichTrigger(d_which, QwtSymbol::Star1); }
336  void getStar2() { emit whichTrigger(d_which, QwtSymbol::Star2); }
337  void getHexagon() { emit whichTrigger(d_which, QwtSymbol::Hexagon); }
338 
339 private:
340  QActionGroup* d_grp;
341  QList<QAction*> d_act;
342  int d_which;
343 };
344 
345 
346 /********************************************************************/
347 
348 
349 class MarkerAlphaMenu : public QMenu
350 {
351  Q_OBJECT
352 
353 public:
354  MarkerAlphaMenu(unsigned int which, QWidget* parent)
355  : QMenu("Line Transparency", parent), d_which(which)
356  {
357  d_grp = new QActionGroup(this);
358 
359  d_act.push_back(new QAction("None", this));
360  d_act.push_back(new QAction("Low", this));
361  d_act.push_back(new QAction("Medium", this));
362  d_act.push_back(new QAction("High", this));
363  d_act.push_back(new QAction("Off", this));
364 
365  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getNone()));
366  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getLow()));
367  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getMedium()));
368  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getHigh()));
369  connect(d_act[4], SIGNAL(triggered()), this, SLOT(getOff()));
370 
371  QListIterator<QAction*> i(d_act);
372  while (i.hasNext()) {
373  QAction* a = i.next();
374  a->setCheckable(true);
375  a->setActionGroup(d_grp);
376  addAction(a);
377  }
378  }
379 
380  ~MarkerAlphaMenu() override {}
381 
382  int getNumActions() const { return d_act.size(); }
383 
384  QAction* getAction(unsigned int which)
385  {
386  if (which < static_cast<unsigned int>(d_act.size()))
387  return d_act[which];
388  else
389  throw std::runtime_error("MarkerAlphaMenu::getAction: which out of range.");
390  }
391 
392 signals:
393  void whichTrigger(unsigned int which, unsigned int);
394 
395 public slots:
396  void getNone() { emit whichTrigger(d_which, 255); }
397  void getLow() { emit whichTrigger(d_which, 200); }
398  void getMedium() { emit whichTrigger(d_which, 125); }
399  void getHigh() { emit whichTrigger(d_which, 50); }
400  void getOff() { emit whichTrigger(d_which, 0); }
401 
402 private:
403  QActionGroup* d_grp;
404  QList<QAction*> d_act;
405  int d_which;
406 };
407 
408 
409 /********************************************************************/
410 
411 
412 class LineTitleAction : public QAction
413 {
414  Q_OBJECT
415 
416 public:
417  LineTitleAction(unsigned int which, QWidget* parent)
418  : QAction("Line Title", parent), d_which(which)
419  {
420  d_diag = new QDialog(parent);
421  d_diag->setModal(true);
422 
423  d_text = new QLineEdit();
424 
425  QGridLayout* layout = new QGridLayout(d_diag);
426  QPushButton* btn_ok = new QPushButton(tr("OK"));
427  QPushButton* btn_cancel = new QPushButton(tr("Cancel"));
428 
429  layout->addWidget(d_text, 0, 0, 1, 2);
430  layout->addWidget(btn_ok, 1, 0);
431  layout->addWidget(btn_cancel, 1, 1);
432 
433  connect(btn_ok, SIGNAL(clicked()), this, SLOT(getText()));
434  connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
435 
436  connect(this, SIGNAL(triggered()), this, SLOT(getTextDiag()));
437  }
438 
439  ~LineTitleAction() override {}
440 
441 signals:
442  void whichTrigger(unsigned int which, const QString& text);
443 
444 public slots:
445  void getTextDiag() { d_diag->exec(); }
446 
447 private slots:
448  void getText()
449  {
450  emit whichTrigger(d_which, d_text->text());
451  d_diag->accept();
452  }
453 
454 private:
455  int d_which;
456 
457  QDialog* d_diag;
458  QLineEdit* d_text;
459 };
460 
461 
462 /********************************************************************/
463 
464 
465 class AverageMenu : public QMenu
466 {
467  Q_OBJECT
468 
469 public:
470  AverageMenu(const std::string& menuTitle, QWidget* parent)
471  : QMenu(menuTitle.c_str(), parent)
472  {
473  d_grp = new QActionGroup(this);
474 
475  d_off = 1.0;
476  d_high = 0.05;
477  d_medium = 0.1;
478  d_low = 0.2;
479 
480  d_act.push_back(new QAction("Off", this));
481  d_act.push_back(new QAction("High", this));
482  d_act.push_back(new QAction("Medium", this));
483  d_act.push_back(new QAction("Low", this));
484 
485  d_grp = new QActionGroup(this);
486  for (int t = 0; t < d_act.size(); t++) {
487  d_act[t]->setCheckable(true);
488  d_act[t]->setActionGroup(d_grp);
489  }
490  d_act[0]->setChecked(true);
491 
492  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getOff()));
493  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getHigh()));
494  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getMedium()));
495  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getLow()));
496 
497  QListIterator<QAction*> i(d_act);
498  while (i.hasNext()) {
499  QAction* a = i.next();
500  a->setCheckable(true);
501  a->setActionGroup(d_grp);
502  addAction(a);
503  }
504  }
505 
506  ~AverageMenu() override {}
507 
508  int getNumActions() const { return d_act.size(); }
509 
510  QAction* getAction(unsigned int which)
511  {
512  if (which < static_cast<unsigned int>(d_act.size()))
513  return d_act[which];
514  else
515  throw std::runtime_error("AverageMenu::getAction: which out of range.");
516  }
517 
518  QAction* getActionFromAvg(float avg)
519  {
520  int which = 0;
521  if (avg == d_off)
522  which = 0;
523  else if (avg == d_high)
524  which = 1;
525  else if (avg == d_medium)
526  which = 2;
527  else if (avg == d_low)
528  which = 3;
529  return d_act[static_cast<int>(which)];
530  }
531 
532  void setHigh(float x) { d_high = x; }
533 
534  void setMedium(float x) { d_medium = x; }
535 
536  void setLow(float x) { d_low = x; }
537 
538 signals:
539  void whichTrigger(float alpha);
540 
541 public slots:
542  void getOff() { emit whichTrigger(d_off); }
543  void getHigh() { emit whichTrigger(d_high); }
544  void getMedium() { emit whichTrigger(d_medium); }
545  void getLow() { emit whichTrigger(d_low); }
546  void getOther(const QString& str)
547  {
548  float value = str.toFloat();
549  emit whichTrigger(value);
550  }
551 
552 private:
553  QList<QAction*> d_act;
554  QActionGroup* d_grp;
555  float d_off, d_high, d_medium, d_low;
556 };
557 
558 /********************************************************************/
559 
561 {
562 public:
563  FFTAverageMenu(QWidget* parent) : AverageMenu("FFT Average", parent)
564  {
565  // nop
566  }
567 
568  ~FFTAverageMenu() override {}
569 };
570 
571 /********************************************************************/
572 
573 
574 class FFTWindowMenu : public QMenu
575 {
576  Q_OBJECT
577 
578 public:
579  FFTWindowMenu(QWidget* parent) : QMenu("FFT Window", parent)
580  {
581  d_act.push_back(new QAction("None", this));
582  d_act.push_back(new QAction("Hamming", this));
583  d_act.push_back(new QAction("Hann", this));
584  d_act.push_back(new QAction("Blackman", this));
585  d_act.push_back(new QAction("Blackman-harris", this));
586  d_act.push_back(new QAction("Rectangular", this));
587  d_act.push_back(new QAction("Kaiser", this));
588  d_act.push_back(new QAction("Flat-top", this));
589 
590  d_grp = new QActionGroup(this);
591  for (int t = 0; t < d_act.size(); t++) {
592  d_act[t]->setCheckable(true);
593  d_act[t]->setActionGroup(d_grp);
594  }
595 
596  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getNone()));
597  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getHamming()));
598  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getHann()));
599  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getBlackman()));
600  connect(d_act[4], SIGNAL(triggered()), this, SLOT(getBlackmanharris()));
601  connect(d_act[5], SIGNAL(triggered()), this, SLOT(getRectangular()));
602  connect(d_act[6], SIGNAL(triggered()), this, SLOT(getKaiser()));
603  connect(d_act[7], SIGNAL(triggered()), this, SLOT(getFlattop()));
604 
605  QListIterator<QAction*> i(d_act);
606  while (i.hasNext()) {
607  QAction* a = i.next();
608  addAction(a);
609  }
610  }
611 
612  ~FFTWindowMenu() override {}
613 
614  int getNumActions() const { return d_act.size(); }
615 
616  QAction* getAction(unsigned int which)
617  {
618  if (which < static_cast<unsigned int>(d_act.size()))
619  return d_act[which];
620  else
621  throw std::runtime_error("FFTWindowMenu::getAction: which out of range.");
622  }
623 
625  {
626  int which = 0;
627  switch (static_cast<int>(type)) {
628  case ((gr::fft::window::WIN_NONE)):
629  which = 0;
630  break;
632  which = 1;
633  break;
634  case ((gr::fft::window::WIN_HANN)):
635  which = 2;
636  break;
638  which = 3;
639  break;
641  which = 4;
642  break;
644  which = 5;
645  break;
647  which = 6;
648  break;
650  which = 7;
651  break;
652  }
653  return d_act[which];
654  }
655 
656 signals:
658 
659 public slots:
668 
669 private:
670  QList<QAction*> d_act;
671  QActionGroup* d_grp;
672 };
673 
674 
675 /********************************************************************/
676 
677 
678 class NPointsMenu : public QAction
679 {
680  Q_OBJECT
681 
682 public:
683  NPointsMenu(QWidget* parent) : QAction("Number of Points", parent)
684  {
685  d_diag = new QDialog(parent);
686  d_diag->setWindowTitle("Number of Points");
687  d_diag->setModal(true);
688 
689  d_text = new QLineEdit();
690 
691  QGridLayout* layout = new QGridLayout(d_diag);
692  QPushButton* btn_ok = new QPushButton(tr("OK"));
693  QPushButton* btn_cancel = new QPushButton(tr("Cancel"));
694 
695  layout->addWidget(d_text, 0, 0, 1, 2);
696  layout->addWidget(btn_ok, 1, 0);
697  layout->addWidget(btn_cancel, 1, 1);
698 
699  connect(btn_ok, SIGNAL(clicked()), this, SLOT(getText()));
700  connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
701 
702  connect(this, SIGNAL(triggered()), this, SLOT(getTextDiag()));
703  }
704 
705  ~NPointsMenu() override {}
706 
707 signals:
708  void whichTrigger(const int npts);
709 
710 public slots:
711  void setDiagText(const int npts) { d_text->setText(QString().setNum(npts)); }
712 
713  void getTextDiag() { d_diag->show(); }
714 
715 private slots:
716  void getText()
717  {
718  emit whichTrigger(d_text->text().toInt());
719  d_diag->accept();
720  }
721 
722 private:
723  QDialog* d_diag;
724  QLineEdit* d_text;
725 };
726 
727 
728 /********************************************************************/
729 
730 
731 class ColorMapMenu : public QMenu
732 {
733  Q_OBJECT
734 
735 public:
736  ColorMapMenu(unsigned int which, QWidget* parent)
737  : QMenu("Color Map", parent), d_which(which)
738  {
739  d_grp = new QActionGroup(this);
740 
741  d_act.push_back(new QAction("Multi-Color", this));
742  d_act.push_back(new QAction("White Hot", this));
743  d_act.push_back(new QAction("Black Hot", this));
744  d_act.push_back(new QAction("Incandescent", this));
745  d_act.push_back(new QAction("Sunset", this));
746  d_act.push_back(new QAction("Cool", this));
747  d_act.push_back(new QAction("Other", this));
748  // d_act.push_back(new OtherDualAction("Min Intensity: ", "Max Intensity: ",
749  // this));
750 
751  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getMultiColor()));
752  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getWhiteHot()));
753  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getBlackHot()));
754  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getIncandescent()));
755  connect(d_act[4], SIGNAL(triggered()), this, SLOT(getSunset()));
756  connect(d_act[5], SIGNAL(triggered()), this, SLOT(getCool()));
757  connect(d_act[6], SIGNAL(triggered()), this, SLOT(getOther()));
758 
759  QListIterator<QAction*> i(d_act);
760  while (i.hasNext()) {
761  QAction* a = i.next();
762  a->setCheckable(true);
763  a->setActionGroup(d_grp);
764  addAction(a);
765  }
766 
767  d_max_value = QColor("white");
768  d_min_value = QColor("white");
769  }
770 
771  ~ColorMapMenu() override {}
772 
773  int getNumActions() const { return d_act.size(); }
774 
775  QAction* getAction(unsigned int which)
776  {
777  if (which < static_cast<unsigned int>(d_act.size()))
778  return d_act[which];
779  else
780  throw std::runtime_error("ColorMapMenu::getAction: which out of range.");
781  }
782 
783 signals:
784  void whichTrigger(unsigned int which,
785  const int type,
786  const QColor& min_color = QColor(),
787  const QColor& max_color = QColor());
788 
789 public slots:
791  {
793  }
794  void getWhiteHot()
795  {
797  }
798  void getBlackHot()
799  {
801  }
803  {
805  }
806  void getSunset()
807  {
809  }
810  void getCool()
811  {
813  }
814  // void getOther(d_which, const QString &min_str, const QString &max_str)
815  void getOther()
816  {
817  QMessageBox::information(
818  this,
819  "Set low and high intensities",
820  "In the next windows, select the low and then the high intensity colors.",
821  QMessageBox::Ok);
822  d_min_value = QColorDialog::getColor(d_min_value, this);
823  d_max_value = QColorDialog::getColor(d_max_value, this);
824 
825  emit whichTrigger(d_which,
827  d_min_value,
828  d_max_value);
829  }
830 
831 private:
832  QActionGroup* d_grp;
833  QList<QAction*> d_act;
834  QColor d_max_value, d_min_value;
835  int d_which;
836 };
837 
838 
839 /********************************************************************/
840 
841 
842 class TriggerModeMenu : public QMenu
843 {
844  Q_OBJECT
845 
846 public:
847  TriggerModeMenu(QWidget* parent) : QMenu("Mode", parent)
848  {
849  d_grp = new QActionGroup(this);
850  d_act.push_back(new QAction("Free", this));
851  d_act.push_back(new QAction("Auto", this));
852  d_act.push_back(new QAction("Normal", this));
853  d_act.push_back(new QAction("Tag", this));
854 
855  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getFree()));
856  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getAuto()));
857  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getNorm()));
858  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getTag()));
859 
860  QListIterator<QAction*> i(d_act);
861  while (i.hasNext()) {
862  QAction* a = i.next();
863  a->setCheckable(true);
864  a->setActionGroup(d_grp);
865  addAction(a);
866  }
867  }
868 
869  ~TriggerModeMenu() override {}
870 
871  int getNumActions() const { return d_act.size(); }
872 
873  QAction* getAction(unsigned int which)
874  {
875  if (which < static_cast<unsigned int>(d_act.size()))
876  return d_act[which];
877  else
878  throw std::runtime_error("TriggerModeMenu::getAction: which out of range.");
879  }
880 
882  {
883  switch (mode) {
885  return d_act[0];
886  break;
888  return d_act[1];
889  break;
891  return d_act[2];
892  break;
894  return d_act[3];
895  break;
896  default:
897  throw std::runtime_error("TriggerModeMenu::getAction: unknown trigger mode.");
898  }
899  }
900 
901 signals:
903 
904 public slots:
909 
910 private:
911  QList<QAction*> d_act;
912  QActionGroup* d_grp;
913 };
914 
915 
916 /********************************************************************/
917 
918 
919 class TriggerSlopeMenu : public QMenu
920 {
921  Q_OBJECT
922 
923 public:
924  TriggerSlopeMenu(QWidget* parent) : QMenu("Slope", parent)
925  {
926  d_grp = new QActionGroup(this);
927  d_act.push_back(new QAction("Positive", this));
928  d_act.push_back(new QAction("Negative", this));
929 
930  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getPos()));
931  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getNeg()));
932 
933  QListIterator<QAction*> i(d_act);
934  while (i.hasNext()) {
935  QAction* a = i.next();
936  a->setCheckable(true);
937  a->setActionGroup(d_grp);
938  addAction(a);
939  }
940  }
941 
942  ~TriggerSlopeMenu() override {}
943 
944  int getNumActions() const { return d_act.size(); }
945 
946  QAction* getAction(unsigned int which)
947  {
948  if (which < static_cast<unsigned int>(d_act.size()))
949  return d_act[which];
950  else
951  throw std::runtime_error("TriggerSlopeMenu::getAction: which out of range.");
952  }
953 
955  {
956  switch (slope) {
958  return d_act[0];
959  break;
961  return d_act[1];
962  break;
963  default:
964  throw std::runtime_error(
965  "TriggerSlopeMenu::getAction: unknown trigger slope.");
966  }
967  }
968 
969 signals:
971 
972 public slots:
975 
976 private:
977  QList<QAction*> d_act;
978  QActionGroup* d_grp;
979 };
980 
981 
982 /********************************************************************/
983 
984 
985 class TriggerChannelMenu : public QMenu
986 {
987  Q_OBJECT
988 
989 public:
990  TriggerChannelMenu(int nchans, QWidget* parent) : QMenu("Channel", parent)
991  {
992  d_grp = new QActionGroup(this);
993  for (int i = 0; i < nchans; i++) {
994  d_act.push_back(new QAction(QString().setNum(i), this));
995  d_act[i]->setCheckable(true);
996  d_act[i]->setActionGroup(d_grp);
997 
998  addAction(d_act[i]);
999  connect(d_act[i], SIGNAL(triggered()), this, SLOT(getChannel()));
1000  }
1001  }
1002 
1003  ~TriggerChannelMenu() override {}
1004 
1005  int getNumActions() const { return d_act.size(); }
1006 
1007  QAction* getAction(unsigned int which)
1008  {
1009  if (which < static_cast<unsigned int>(d_act.size()))
1010  return d_act[which];
1011  else
1012  throw std::runtime_error(
1013  "TriggerChannelMenu::getAction: which out of range.");
1014  }
1015 
1016 
1017 signals:
1018  void whichTrigger(int n);
1019 
1020 public slots:
1021  void getChannel()
1022  {
1023  QAction* a = d_grp->checkedAction();
1024  int which = a->text().toInt();
1025  emit whichTrigger(which);
1026  }
1027 
1028 private:
1029  QList<QAction*> d_act;
1030  QActionGroup* d_grp;
1031 };
1032 
1033 
1034 /********************************************************************/
1035 
1036 
1037 class NumberLayoutMenu : public QMenu
1038 {
1039  Q_OBJECT
1040 
1041 public:
1042  NumberLayoutMenu(QWidget* parent) : QMenu("Layout", parent)
1043  {
1044  d_grp = new QActionGroup(this);
1045  d_act.push_back(new QAction("Horizontal", this));
1046  d_act.push_back(new QAction("Vertical", this));
1047  d_act.push_back(new QAction("None", this));
1048 
1049  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getHoriz()));
1050  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getVert()));
1051  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getNone()));
1052 
1053  QListIterator<QAction*> i(d_act);
1054  while (i.hasNext()) {
1055  QAction* a = i.next();
1056  a->setCheckable(true);
1057  a->setActionGroup(d_grp);
1058  addAction(a);
1059  }
1060  }
1061 
1062  ~NumberLayoutMenu() override {}
1063 
1064  int getNumActions() const { return d_act.size(); }
1065 
1066  QAction* getAction(unsigned int which)
1067  {
1068  if (which < static_cast<unsigned int>(d_act.size()))
1069  return d_act[which];
1070  else
1071  throw std::runtime_error("NumberLayoutMenu::getAction: which out of range.");
1072  }
1073 
1075  {
1076  switch (layout) {
1078  return d_act[0];
1079  break;
1081  return d_act[1];
1082  break;
1084  return d_act[1];
1085  break;
1086  default:
1087  throw std::runtime_error("NumberLayoutMenu::getAction: unknown layout type.");
1088  }
1089  }
1090 
1091 signals:
1093 
1094 public slots:
1098 
1099 private:
1100  QList<QAction*> d_act;
1101  QActionGroup* d_grp;
1102 };
1103 
1104 
1105 /********************************************************************/
1106 
1107 
1108 class NumberColorMapMenu : public QMenu
1109 {
1110  Q_OBJECT
1111 
1112 public:
1113  NumberColorMapMenu(unsigned int which, QWidget* parent)
1114  : QMenu("Color Map", parent), d_which(which)
1115  {
1116  d_grp = new QActionGroup(this);
1117 
1118  d_act.push_back(new QAction("Black", this));
1119  d_act.push_back(new QAction("Blue-Red", this));
1120  d_act.push_back(new QAction("White Hot", this));
1121  d_act.push_back(new QAction("Black Hot", this));
1122  d_act.push_back(new QAction("Black-Red", this));
1123  d_act.push_back(new QAction("Other", this));
1124 
1125  connect(d_act[0], SIGNAL(triggered()), this, SLOT(getBlack()));
1126  connect(d_act[1], SIGNAL(triggered()), this, SLOT(getBlueRed()));
1127  connect(d_act[2], SIGNAL(triggered()), this, SLOT(getWhiteHot()));
1128  connect(d_act[3], SIGNAL(triggered()), this, SLOT(getBlackHot()));
1129  connect(d_act[4], SIGNAL(triggered()), this, SLOT(getBlackRed()));
1130  connect(d_act[5], SIGNAL(triggered()), this, SLOT(getOther()));
1131 
1132  QListIterator<QAction*> i(d_act);
1133  while (i.hasNext()) {
1134  QAction* a = i.next();
1135  a->setCheckable(true);
1136  a->setActionGroup(d_grp);
1137  addAction(a);
1138  }
1139 
1140  d_max_value = QColor("black");
1141  d_min_value = QColor("black");
1142  }
1143 
1144  ~NumberColorMapMenu() override {}
1145 
1146  int getNumActions() const { return d_act.size(); }
1147 
1148  QAction* getAction(unsigned int which)
1149  {
1150  if (which < static_cast<unsigned int>(d_act.size()))
1151  return d_act[which];
1152  else
1153  throw std::runtime_error("ColorMapMenu::getAction: which out of range.");
1154  }
1155 
1156 signals:
1157  void
1158  whichTrigger(unsigned int which, const QColor& min_color, const QColor& max_color);
1159 
1160 public slots:
1161  void getBlack() { emit whichTrigger(d_which, QColor("black"), QColor("black")); }
1162  void getBlueRed() { emit whichTrigger(d_which, QColor("blue"), QColor("red")); }
1163  void getWhiteHot() { emit whichTrigger(d_which, QColor("black"), QColor("white")); }
1164  void getBlackHot() { emit whichTrigger(d_which, QColor("white"), QColor("black")); }
1165  void getBlackRed() { emit whichTrigger(d_which, QColor("black"), QColor("red")); }
1166  void getOther()
1167  {
1168  QMessageBox::information(
1169  this,
1170  "Set low and high intensities",
1171  "In the next windows, select the low and then the high intensity colors.",
1172  QMessageBox::Ok);
1173  d_min_value = QColorDialog::getColor(d_min_value, this);
1174  d_max_value = QColorDialog::getColor(d_max_value, this);
1175 
1176  emit whichTrigger(d_which, d_min_value, d_max_value);
1177  }
1178 
1179 private:
1180  QActionGroup* d_grp;
1181  QList<QAction*> d_act;
1182  QColor d_max_value, d_min_value;
1183  int d_which;
1184 };
1185 
1186 
1187 /********************************************************************/
1188 
1189 
1190 class PopupMenu : public QAction
1191 {
1192  Q_OBJECT
1193 
1194 public:
1195  PopupMenu(QString desc, QWidget* parent) : QAction(desc, parent)
1196  {
1197  d_diag = new QDialog(parent);
1198  d_diag->setWindowTitle(desc);
1199  d_diag->setModal(true);
1200 
1201  d_text = new QLineEdit();
1202 
1203  QGridLayout* layout = new QGridLayout(d_diag);
1204  QPushButton* btn_ok = new QPushButton(tr("OK"));
1205  QPushButton* btn_cancel = new QPushButton(tr("Cancel"));
1206 
1207  layout->addWidget(d_text, 0, 0, 1, 2);
1208  layout->addWidget(btn_ok, 1, 0);
1209  layout->addWidget(btn_cancel, 1, 1);
1210 
1211  connect(btn_ok, SIGNAL(clicked()), this, SLOT(getText()));
1212  connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
1213 
1214  connect(this, SIGNAL(triggered()), this, SLOT(getTextDiag()));
1215  }
1216 
1217  ~PopupMenu() override {}
1218 
1219  void setText(QString s) { d_text->setText(s); }
1220 
1221 signals:
1222  void whichTrigger(const QString data);
1223 
1224 public slots:
1225  void getTextDiag() { d_diag->show(); }
1226 
1227 private slots:
1228  void getText()
1229  {
1230  emit whichTrigger(d_text->text());
1231  d_diag->accept();
1232  }
1233 
1234 private:
1235  QDialog* d_diag;
1236  QLineEdit* d_text;
1237 };
1238 
1239 
1240 /********************************************************************/
1241 
1242 
1243 class ItemFloatAct : public QAction
1244 {
1245  Q_OBJECT
1246 
1247 public:
1248  ItemFloatAct(unsigned int which, QString title, QWidget* parent)
1249  : QAction(title, parent), d_which(which)
1250  {
1251  d_diag = new QDialog(parent);
1252  d_diag->setWindowTitle(title);
1253  d_diag->setModal(true);
1254 
1255  d_text = new QLineEdit();
1256 
1257  QGridLayout* layout = new QGridLayout(d_diag);
1258  QPushButton* btn_ok = new QPushButton(tr("OK"));
1259  QPushButton* btn_cancel = new QPushButton(tr("Cancel"));
1260 
1261  layout->addWidget(d_text, 0, 0, 1, 2);
1262  layout->addWidget(btn_ok, 1, 0);
1263  layout->addWidget(btn_cancel, 1, 1);
1264 
1265  connect(btn_ok, SIGNAL(clicked()), this, SLOT(getText()));
1266  connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
1267 
1268  connect(this, SIGNAL(triggered()), this, SLOT(getTextDiag()));
1269  }
1270 
1271  ~ItemFloatAct() override {}
1272 
1273  void setText(float f) { d_text->setText(QString("%1").arg(f)); }
1274 
1275 
1276 signals:
1277  void whichTrigger(unsigned int which, float data);
1278 
1279 public slots:
1280  void getTextDiag() { d_diag->show(); }
1281 
1282 private slots:
1283  void getText()
1284  {
1285  emit whichTrigger(d_which, d_text->text().toFloat());
1286  d_diag->accept();
1287  }
1288 
1289 private:
1290  int d_which;
1291  QDialog* d_diag;
1292  QLineEdit* d_text;
1293 };
1294 
1295 
1296 /********************************************************************/
1297 
1298 
1299 #endif /* FORM_MENUS_H */
Definition: form_menus.h:466
void whichTrigger(float alpha)
void getLow()
Definition: form_menus.h:545
~AverageMenu() override
Definition: form_menus.h:506
void getMedium()
Definition: form_menus.h:544
void getOff()
Definition: form_menus.h:542
AverageMenu(const std::string &menuTitle, QWidget *parent)
Definition: form_menus.h:470
QAction * getActionFromAvg(float avg)
Definition: form_menus.h:518
QAction * getAction(unsigned int which)
Definition: form_menus.h:510
void setHigh(float x)
Definition: form_menus.h:532
void setMedium(float x)
Definition: form_menus.h:534
void setLow(float x)
Definition: form_menus.h:536
void getHigh()
Definition: form_menus.h:543
void getOther(const QString &str)
Definition: form_menus.h:546
int getNumActions() const
Definition: form_menus.h:508
Definition: form_menus.h:732
void getWhiteHot()
Definition: form_menus.h:794
void getCool()
Definition: form_menus.h:810
void getBlackHot()
Definition: form_menus.h:798
void getOther()
Definition: form_menus.h:815
~ColorMapMenu() override
Definition: form_menus.h:771
void whichTrigger(unsigned int which, const int type, const QColor &min_color=QColor(), const QColor &max_color=QColor())
void getIncandescent()
Definition: form_menus.h:802
int getNumActions() const
Definition: form_menus.h:773
QAction * getAction(unsigned int which)
Definition: form_menus.h:775
void getSunset()
Definition: form_menus.h:806
ColorMapMenu(unsigned int which, QWidget *parent)
Definition: form_menus.h:736
void getMultiColor()
Definition: form_menus.h:790
Definition: form_menus.h:561
~FFTAverageMenu() override
Definition: form_menus.h:568
FFTAverageMenu(QWidget *parent)
Definition: form_menus.h:563
Definition: form_menus.h:575
void whichTrigger(const gr::fft::window::win_type type)
void getKaiser()
Definition: form_menus.h:666
int getNumActions() const
Definition: form_menus.h:614
void getBlackmanharris()
Definition: form_menus.h:664
QAction * getAction(unsigned int which)
Definition: form_menus.h:616
void getBlackman()
Definition: form_menus.h:663
void getHamming()
Definition: form_menus.h:661
~FFTWindowMenu() override
Definition: form_menus.h:612
void getRectangular()
Definition: form_menus.h:665
void getFlattop()
Definition: form_menus.h:667
void getHann()
Definition: form_menus.h:662
FFTWindowMenu(QWidget *parent)
Definition: form_menus.h:579
QAction * getActionFromWindow(gr::fft::window::win_type type)
Definition: form_menus.h:624
void getNone()
Definition: form_menus.h:660
Definition: form_menus.h:1244
void whichTrigger(unsigned int which, float data)
~ItemFloatAct() override
Definition: form_menus.h:1271
void getTextDiag()
Definition: form_menus.h:1280
ItemFloatAct(unsigned int which, QString title, QWidget *parent)
Definition: form_menus.h:1248
void setText(float f)
Definition: form_menus.h:1273
Definition: form_menus.h:29
int getNumActions() const
Definition: form_menus.h:75
void getDarkGray()
Definition: form_menus.h:100
void getBlue()
Definition: form_menus.h:89
void getGray()
Definition: form_menus.h:96
void getGreen()
Definition: form_menus.h:91
void getMagenta()
Definition: form_menus.h:94
void getRed()
Definition: form_menus.h:90
void getBlack()
Definition: form_menus.h:92
void getDarkGreen()
Definition: form_menus.h:98
void getDarkRed()
Definition: form_menus.h:97
LineColorMenu(unsigned int which, QWidget *parent)
Definition: form_menus.h:33
QAction * getAction(unsigned int which)
Definition: form_menus.h:77
void whichTrigger(unsigned int which, const QString &name)
void getDarkBlue()
Definition: form_menus.h:99
~LineColorMenu() override
Definition: form_menus.h:73
void getYellow()
Definition: form_menus.h:95
void getCyan()
Definition: form_menus.h:93
Definition: form_menus.h:257
void getStar2()
Definition: form_menus.h:336
~LineMarkerMenu() override
Definition: form_menus.h:307
void getStar1()
Definition: form_menus.h:335
void getVLine()
Definition: form_menus.h:334
void whichTrigger(unsigned int which, QwtSymbol::Style)
void getLTriangle()
Definition: form_menus.h:329
void getDTriangle()
Definition: form_menus.h:328
void getTriangle()
Definition: form_menus.h:327
LineMarkerMenu(unsigned int which, QWidget *parent)
Definition: form_menus.h:261
void getCircle()
Definition: form_menus.h:324
QAction * getAction(unsigned int which)
Definition: form_menus.h:311
int getNumActions() const
Definition: form_menus.h:309
void getRect()
Definition: form_menus.h:325
void getHLine()
Definition: form_menus.h:333
void getRTriangle()
Definition: form_menus.h:330
void getHexagon()
Definition: form_menus.h:337
void getCross()
Definition: form_menus.h:331
void getXCross()
Definition: form_menus.h:332
void getDiamond()
Definition: form_menus.h:326
void getNone()
Definition: form_menus.h:323
Definition: form_menus.h:191
void getSolid()
Definition: form_menus.h:240
void getNone()
Definition: form_menus.h:239
void getDashDot()
Definition: form_menus.h:243
void getDots()
Definition: form_menus.h:242
QAction * getAction(unsigned int which)
Definition: form_menus.h:227
void getDashDotDot()
Definition: form_menus.h:244
void getDash()
Definition: form_menus.h:241
~LineStyleMenu() override
Definition: form_menus.h:223
int getNumActions() const
Definition: form_menus.h:225
LineStyleMenu(unsigned int which, QWidget *parent)
Definition: form_menus.h:195
void whichTrigger(unsigned int which, Qt::PenStyle)
Definition: form_menus.h:413
void getTextDiag()
Definition: form_menus.h:445
LineTitleAction(unsigned int which, QWidget *parent)
Definition: form_menus.h:417
void whichTrigger(unsigned int which, const QString &text)
~LineTitleAction() override
Definition: form_menus.h:439
Definition: form_menus.h:113
void getSix()
Definition: form_menus.h:174
LineWidthMenu(unsigned int which, QWidget *parent)
Definition: form_menus.h:117
~LineWidthMenu() override
Definition: form_menus.h:153
void getNine()
Definition: form_menus.h:177
void getOne()
Definition: form_menus.h:169
void whichTrigger(unsigned int which, unsigned int width)
void getEight()
Definition: form_menus.h:176
void getTwo()
Definition: form_menus.h:170
void getFour()
Definition: form_menus.h:172
void getFive()
Definition: form_menus.h:173
void getSeven()
Definition: form_menus.h:175
void getTen()
Definition: form_menus.h:178
QAction * getAction(unsigned int which)
Definition: form_menus.h:157
int getNumActions() const
Definition: form_menus.h:155
void getThree()
Definition: form_menus.h:171
Definition: form_menus.h:350
void getOff()
Definition: form_menus.h:400
void getMedium()
Definition: form_menus.h:398
MarkerAlphaMenu(unsigned int which, QWidget *parent)
Definition: form_menus.h:354
QAction * getAction(unsigned int which)
Definition: form_menus.h:384
~MarkerAlphaMenu() override
Definition: form_menus.h:380
int getNumActions() const
Definition: form_menus.h:382
void getHigh()
Definition: form_menus.h:399
void whichTrigger(unsigned int which, unsigned int)
void getLow()
Definition: form_menus.h:397
void getNone()
Definition: form_menus.h:396
Definition: form_menus.h:679
void setDiagText(const int npts)
Definition: form_menus.h:711
void getTextDiag()
Definition: form_menus.h:713
void whichTrigger(const int npts)
~NPointsMenu() override
Definition: form_menus.h:705
NPointsMenu(QWidget *parent)
Definition: form_menus.h:683
Definition: form_menus.h:1109
void getBlack()
Definition: form_menus.h:1161
void getBlackRed()
Definition: form_menus.h:1165
NumberColorMapMenu(unsigned int which, QWidget *parent)
Definition: form_menus.h:1113
void getWhiteHot()
Definition: form_menus.h:1163
QAction * getAction(unsigned int which)
Definition: form_menus.h:1148
~NumberColorMapMenu() override
Definition: form_menus.h:1144
void getOther()
Definition: form_menus.h:1166
void whichTrigger(unsigned int which, const QColor &min_color, const QColor &max_color)
int getNumActions() const
Definition: form_menus.h:1146
void getBlueRed()
Definition: form_menus.h:1162
void getBlackHot()
Definition: form_menus.h:1164
Definition: form_menus.h:1038
QAction * getAction(unsigned int which)
Definition: form_menus.h:1066
void getNone()
Definition: form_menus.h:1097
~NumberLayoutMenu() override
Definition: form_menus.h:1062
void whichTrigger(gr::qtgui::graph_t layout)
void getVert()
Definition: form_menus.h:1096
QAction * getAction(gr::qtgui::graph_t layout)
Definition: form_menus.h:1074
NumberLayoutMenu(QWidget *parent)
Definition: form_menus.h:1042
int getNumActions() const
Definition: form_menus.h:1064
void getHoriz()
Definition: form_menus.h:1095
Definition: form_menus.h:1191
~PopupMenu() override
Definition: form_menus.h:1217
PopupMenu(QString desc, QWidget *parent)
Definition: form_menus.h:1195
void whichTrigger(const QString data)
void setText(QString s)
Definition: form_menus.h:1219
void getTextDiag()
Definition: form_menus.h:1225
Definition: form_menus.h:986
~TriggerChannelMenu() override
Definition: form_menus.h:1003
TriggerChannelMenu(int nchans, QWidget *parent)
Definition: form_menus.h:990
int getNumActions() const
Definition: form_menus.h:1005
QAction * getAction(unsigned int which)
Definition: form_menus.h:1007
void getChannel()
Definition: form_menus.h:1021
void whichTrigger(int n)
Definition: form_menus.h:843
~TriggerModeMenu() override
Definition: form_menus.h:869
QAction * getAction(gr::qtgui::trigger_mode mode)
Definition: form_menus.h:881
QAction * getAction(unsigned int which)
Definition: form_menus.h:873
int getNumActions() const
Definition: form_menus.h:871
void getFree()
Definition: form_menus.h:905
void getNorm()
Definition: form_menus.h:907
void getAuto()
Definition: form_menus.h:906
TriggerModeMenu(QWidget *parent)
Definition: form_menus.h:847
void whichTrigger(gr::qtgui::trigger_mode mode)
void getTag()
Definition: form_menus.h:908
Definition: form_menus.h:920
~TriggerSlopeMenu() override
Definition: form_menus.h:942
int getNumActions() const
Definition: form_menus.h:944
void getPos()
Definition: form_menus.h:973
TriggerSlopeMenu(QWidget *parent)
Definition: form_menus.h:924
void getNeg()
Definition: form_menus.h:974
QAction * getAction(unsigned int which)
Definition: form_menus.h:946
void whichTrigger(gr::qtgui::trigger_slope slope)
QAction * getAction(gr::qtgui::trigger_slope slope)
Definition: form_menus.h:954
win_type
Definition: window.h:28
@ WIN_HANN
Hann window; max attenuation 44 dB.
Definition: window.h:31
@ WIN_RECTANGULAR
Basic rectangular window; max attenuation 21 dB.
Definition: window.h:34
@ WIN_BLACKMAN_hARRIS
Blackman-harris window; max attenuation 92 dB.
Definition: window.h:36
@ WIN_KAISER
Kaiser window; max attenuation see window::max_attenuation.
Definition: window.h:35
@ WIN_NONE
don't use a window
Definition: window.h:29
@ WIN_BLACKMAN
Blackman window; max attenuation 74 dB.
Definition: window.h:33
@ WIN_FLATTOP
flat top window; useful in FFTs; max attenuation 93 dB
Definition: window.h:40
@ WIN_HAMMING
Hamming window; max attenuation 53 dB.
Definition: window.h:30
@ INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR
Definition: qtgui_types.h:126
@ INTENSITY_COLOR_MAP_TYPE_USER_DEFINED
Definition: qtgui_types.h:130
@ INTENSITY_COLOR_MAP_TYPE_WHITE_HOT
Definition: qtgui_types.h:127
@ INTENSITY_COLOR_MAP_TYPE_SUNSET
Definition: qtgui_types.h:131
@ INTENSITY_COLOR_MAP_TYPE_COOL
Definition: qtgui_types.h:132
@ INTENSITY_COLOR_MAP_TYPE_BLACK_HOT
Definition: qtgui_types.h:128
@ INTENSITY_COLOR_MAP_TYPE_INCANDESCENT
Definition: qtgui_types.h:129
trigger_mode
Definition: trigger_mode.h:17
@ TRIG_MODE_FREE
Definition: trigger_mode.h:18
@ TRIG_MODE_NORM
Definition: trigger_mode.h:20
@ TRIG_MODE_AUTO
Definition: trigger_mode.h:19
@ TRIG_MODE_TAG
Definition: trigger_mode.h:21
trigger_slope
Definition: trigger_mode.h:24
@ TRIG_SLOPE_NEG
Definition: trigger_mode.h:26
@ TRIG_SLOPE_POS
Definition: trigger_mode.h:25
graph_t
Definition: qtgui_types.h:119
@ NUM_GRAPH_VERT
Definition: qtgui_types.h:122
@ NUM_GRAPH_NONE
Definition: qtgui_types.h:120
@ NUM_GRAPH_HORIZ
Definition: qtgui_types.h:121