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