GNU Radio C++ API Reference: form_menus.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
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>
24#include <gnuradio/qtgui/qtgui_types.h>
25#include <gnuradio/qtgui/trigger_mode.h>
26#include <qwt_symbol.h>
27
28 class LineColorMenu : public QMenu
29{
30 Q_OBJECT
31
32public:
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
85signals:
86 void whichTrigger(unsigned int which, const QString& name);
87
88public 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
102private:
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
116public:
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
165signals:
166 void whichTrigger(unsigned int which, unsigned int width);
167
168public 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
180private:
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
194public:
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
235signals:
236 void whichTrigger(unsigned int which, Qt::PenStyle);
237
238public 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
246private:
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
260public:
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
319signals:
320 void whichTrigger(unsigned int which, QwtSymbol::Style);
321
322public 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
339private:
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
353public:
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
392signals:
393 void whichTrigger(unsigned int which, unsigned int);
394
395public 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
402private:
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
416public:
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
441signals:
442 void whichTrigger(unsigned int which, const QString& text);
443
444public slots:
445 void getTextDiag() { d_diag->exec(); }
446
447private slots:
448 void getText()
449 {
450 emit whichTrigger(d_which, d_text->text());
451 d_diag->accept();
452 }
453
454private:
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
469public:
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
538signals:
539 void whichTrigger(float alpha);
540
541public 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
552private:
553 QList<QAction*> d_act;
554 QActionGroup* d_grp;
555 float d_off, d_high, d_medium, d_low;
556};
557
558/********************************************************************/
559
560 class FFTAverageMenu : public AverageMenu
561{
562public:
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
578public:
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
624 QAction* getActionFromWindow(gr::fft::window::win_type type)
625 {
626 int which = 0;
627 switch (static_cast<int>(type)) {
628 case ((gr::fft::window::WIN_NONE)):
629 which = 0;
630 break;
631 case ((gr::fft::window::WIN_HAMMING)):
632 which = 1;
633 break;
634 case ((gr::fft::window::WIN_HANN)):
635 which = 2;
636 break;
637 case ((gr::fft::window::WIN_BLACKMAN)):
638 which = 3;
639 break;
640 case ((gr::fft::window::WIN_BLACKMAN_hARRIS)):
641 which = 4;
642 break;
643 case ((gr::fft::window::WIN_RECTANGULAR)):
644 which = 5;
645 break;
646 case ((gr::fft::window::WIN_KAISER)):
647 which = 6;
648 break;
649 case ((gr::fft::window::WIN_FLATTOP)):
650 which = 7;
651 break;
652 }
653 return d_act[which];
654 }
655
656signals:
657 void whichTrigger(const gr::fft::window::win_type type);
658
659public slots:
660 void getNone() { emit whichTrigger(gr::fft::window::WIN_NONE); }
661 void getHamming() { emit whichTrigger(gr::fft::window::WIN_HAMMING); }
662 void getHann() { emit whichTrigger(gr::fft::window::WIN_HANN); }
663 void getBlackman() { emit whichTrigger(gr::fft::window::WIN_BLACKMAN); }
664 void getBlackmanharris() { emit whichTrigger(gr::fft::window::WIN_BLACKMAN_hARRIS); }
665 void getRectangular() { emit whichTrigger(gr::fft::window::WIN_RECTANGULAR); }
666 void getKaiser() { emit whichTrigger(gr::fft::window::WIN_KAISER); }
667 void getFlattop() { emit whichTrigger(gr::fft::window::WIN_FLATTOP); }
668
669private:
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
682public:
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
707signals:
708 void whichTrigger(const int npts);
709
710public slots:
711 void setDiagText(const int npts) { d_text->setText(QString().setNum(npts)); }
712
713 void getTextDiag() { d_diag->show(); }
714
715private slots:
716 void getText()
717 {
718 emit whichTrigger(d_text->text().toInt());
719 d_diag->accept();
720 }
721
722private:
723 QDialog* d_diag;
724 QLineEdit* d_text;
725};
726
727
728/********************************************************************/
729
730
731 class ColorMapMenu : public QMenu
732{
733 Q_OBJECT
734
735public:
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
783signals:
784 void whichTrigger(unsigned int which,
785 const int type,
786 const QColor& min_color = QColor(),
787 const QColor& max_color = QColor());
788
789public slots:
790 void getMultiColor()
791 {
792 emit whichTrigger(d_which, gr::qtgui::INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR);
793 }
794 void getWhiteHot()
795 {
796 emit whichTrigger(d_which, gr::qtgui::INTENSITY_COLOR_MAP_TYPE_WHITE_HOT);
797 }
798 void getBlackHot()
799 {
800 emit whichTrigger(d_which, gr::qtgui::INTENSITY_COLOR_MAP_TYPE_BLACK_HOT);
801 }
802 void getIncandescent()
803 {
804 emit whichTrigger(d_which, gr::qtgui::INTENSITY_COLOR_MAP_TYPE_INCANDESCENT);
805 }
806 void getSunset()
807 {
808 emit whichTrigger(d_which, gr::qtgui::INTENSITY_COLOR_MAP_TYPE_SUNSET);
809 }
810 void getCool()
811 {
812 emit whichTrigger(d_which, gr::qtgui::INTENSITY_COLOR_MAP_TYPE_COOL);
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,
826 gr::qtgui::INTENSITY_COLOR_MAP_TYPE_USER_DEFINED,
827 d_min_value,
828 d_max_value);
829 }
830
831private:
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
846public:
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
881 QAction* getAction(gr::qtgui::trigger_mode mode)
882 {
883 switch (mode) {
884 case gr::qtgui::TRIG_MODE_FREE:
885 return d_act[0];
886 break;
887 case gr::qtgui::TRIG_MODE_AUTO:
888 return d_act[1];
889 break;
890 case gr::qtgui::TRIG_MODE_NORM:
891 return d_act[2];
892 break;
893 case gr::qtgui::TRIG_MODE_TAG:
894 return d_act[3];
895 break;
896 default:
897 throw std::runtime_error("TriggerModeMenu::getAction: unknown trigger mode.");
898 }
899 }
900
901signals:
902 void whichTrigger(gr::qtgui::trigger_mode mode);
903
904public slots:
905 void getFree() { emit whichTrigger(gr::qtgui::TRIG_MODE_FREE); }
906 void getAuto() { emit whichTrigger(gr::qtgui::TRIG_MODE_AUTO); }
907 void getNorm() { emit whichTrigger(gr::qtgui::TRIG_MODE_NORM); }
908 void getTag() { emit whichTrigger(gr::qtgui::TRIG_MODE_TAG); }
909
910private:
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
923public:
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
954 QAction* getAction(gr::qtgui::trigger_slope slope)
955 {
956 switch (slope) {
957 case gr::qtgui::TRIG_SLOPE_POS:
958 return d_act[0];
959 break;
960 case gr::qtgui::TRIG_SLOPE_NEG:
961 return d_act[1];
962 break;
963 default:
964 throw std::runtime_error(
965 "TriggerSlopeMenu::getAction: unknown trigger slope.");
966 }
967 }
968
969signals:
970 void whichTrigger(gr::qtgui::trigger_slope slope);
971
972public slots:
973 void getPos() { emit whichTrigger(gr::qtgui::TRIG_SLOPE_POS); }
974 void getNeg() { emit whichTrigger(gr::qtgui::TRIG_SLOPE_NEG); }
975
976private:
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
989public:
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
1017signals:
1018 void whichTrigger(int n);
1019
1020public slots:
1021 void getChannel()
1022 {
1023 QAction* a = d_grp->checkedAction();
1024 int which = a->text().toInt();
1025 emit whichTrigger(which);
1026 }
1027
1028private:
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
1041public:
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
1074 QAction* getAction(gr::qtgui::graph_t layout)
1075 {
1076 switch (layout) {
1077 case gr::qtgui::NUM_GRAPH_HORIZ:
1078 return d_act[0];
1079 break;
1080 case gr::qtgui::NUM_GRAPH_VERT:
1081 return d_act[1];
1082 break;
1083 case gr::qtgui::NUM_GRAPH_NONE:
1084 return d_act[1];
1085 break;
1086 default:
1087 throw std::runtime_error("NumberLayoutMenu::getAction: unknown layout type.");
1088 }
1089 }
1090
1091signals:
1092 void whichTrigger(gr::qtgui::graph_t layout);
1093
1094public slots:
1095 void getHoriz() { emit whichTrigger(gr::qtgui::NUM_GRAPH_HORIZ); }
1096 void getVert() { emit whichTrigger(gr::qtgui::NUM_GRAPH_VERT); }
1097 void getNone() { emit whichTrigger(gr::qtgui::NUM_GRAPH_NONE); }
1098
1099private:
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
1112public:
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
1156signals:
1157 void
1158 whichTrigger(unsigned int which, const QColor& min_color, const QColor& max_color);
1159
1160public 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
1179private:
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
1194public:
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
1221signals:
1222 void whichTrigger(const QString data);
1223
1224public slots:
1225 void getTextDiag() { d_diag->show(); }
1226
1227private slots:
1228 void getText()
1229 {
1230 emit whichTrigger(d_text->text());
1231 d_diag->accept();
1232 }
1233
1234private:
1235 QDialog* d_diag;
1236 QLineEdit* d_text;
1237};
1238
1239
1240/********************************************************************/
1241
1242
1243 class ItemFloatAct : public QAction
1244{
1245 Q_OBJECT
1246
1247public:
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
1276signals:
1277 void whichTrigger(unsigned int which, float data);
1278
1279public slots:
1280 void getTextDiag() { d_diag->show(); }
1281
1282private slots:
1283 void getText()
1284 {
1285 emit whichTrigger(d_which, d_text->text().toFloat());
1286 d_diag->accept();
1287 }
1288
1289private:
1290 int d_which;
1291 QDialog* d_diag;
1292 QLineEdit* d_text;
1293};
1294
1295
1296/********************************************************************/
1297
1298
1299#endif /* FORM_MENUS_H */
AverageMenu::whichTrigger
void whichTrigger(float alpha)
AverageMenu::getLow
void getLow()
Definition form_menus.h:545
AverageMenu::~AverageMenu
~AverageMenu() override
Definition form_menus.h:506
AverageMenu::getMedium
void getMedium()
Definition form_menus.h:544
AverageMenu::getOff
void getOff()
Definition form_menus.h:542
AverageMenu::AverageMenu
AverageMenu(const std::string &menuTitle, QWidget *parent)
Definition form_menus.h:470
AverageMenu::getActionFromAvg
QAction * getActionFromAvg(float avg)
Definition form_menus.h:518
AverageMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:510
AverageMenu::setHigh
void setHigh(float x)
Definition form_menus.h:532
AverageMenu::setMedium
void setMedium(float x)
Definition form_menus.h:534
AverageMenu::setLow
void setLow(float x)
Definition form_menus.h:536
AverageMenu::getHigh
void getHigh()
Definition form_menus.h:543
AverageMenu::getOther
void getOther(const QString &str)
Definition form_menus.h:546
AverageMenu::getNumActions
int getNumActions() const
Definition form_menus.h:508
ColorMapMenu::getWhiteHot
void getWhiteHot()
Definition form_menus.h:794
ColorMapMenu::getCool
void getCool()
Definition form_menus.h:810
ColorMapMenu::getBlackHot
void getBlackHot()
Definition form_menus.h:798
ColorMapMenu::getOther
void getOther()
Definition form_menus.h:815
ColorMapMenu::~ColorMapMenu
~ColorMapMenu() override
Definition form_menus.h:771
ColorMapMenu::whichTrigger
void whichTrigger(unsigned int which, const int type, const QColor &min_color=QColor(), const QColor &max_color=QColor())
ColorMapMenu::getIncandescent
void getIncandescent()
Definition form_menus.h:802
ColorMapMenu::getNumActions
int getNumActions() const
Definition form_menus.h:773
ColorMapMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:775
ColorMapMenu::getSunset
void getSunset()
Definition form_menus.h:806
ColorMapMenu::ColorMapMenu
ColorMapMenu(unsigned int which, QWidget *parent)
Definition form_menus.h:736
ColorMapMenu::getMultiColor
void getMultiColor()
Definition form_menus.h:790
FFTAverageMenu::~FFTAverageMenu
~FFTAverageMenu() override
Definition form_menus.h:568
FFTAverageMenu::FFTAverageMenu
FFTAverageMenu(QWidget *parent)
Definition form_menus.h:563
FFTWindowMenu::whichTrigger
void whichTrigger(const gr::fft::window::win_type type)
FFTWindowMenu::getActionFromWindow
QAction * getActionFromWindow(gr::fft::window::win_type type)
Definition form_menus.h:624
FFTWindowMenu::getKaiser
void getKaiser()
Definition form_menus.h:666
FFTWindowMenu::getNumActions
int getNumActions() const
Definition form_menus.h:614
FFTWindowMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:616
FFTWindowMenu::getBlackmanharris
void getBlackmanharris()
Definition form_menus.h:664
FFTWindowMenu::getBlackman
void getBlackman()
Definition form_menus.h:663
FFTWindowMenu::getHamming
void getHamming()
Definition form_menus.h:661
FFTWindowMenu::~FFTWindowMenu
~FFTWindowMenu() override
Definition form_menus.h:612
FFTWindowMenu::getRectangular
void getRectangular()
Definition form_menus.h:665
FFTWindowMenu::getFlattop
void getFlattop()
Definition form_menus.h:667
FFTWindowMenu::getHann
void getHann()
Definition form_menus.h:662
FFTWindowMenu::FFTWindowMenu
FFTWindowMenu(QWidget *parent)
Definition form_menus.h:579
FFTWindowMenu::getNone
void getNone()
Definition form_menus.h:660
ItemFloatAct::whichTrigger
void whichTrigger(unsigned int which, float data)
ItemFloatAct::~ItemFloatAct
~ItemFloatAct() override
Definition form_menus.h:1271
ItemFloatAct::getTextDiag
void getTextDiag()
Definition form_menus.h:1280
ItemFloatAct::ItemFloatAct
ItemFloatAct(unsigned int which, QString title, QWidget *parent)
Definition form_menus.h:1248
ItemFloatAct::setText
void setText(float f)
Definition form_menus.h:1273
LineColorMenu::getNumActions
int getNumActions() const
Definition form_menus.h:75
LineColorMenu::getDarkGray
void getDarkGray()
Definition form_menus.h:100
LineColorMenu::getBlue
void getBlue()
Definition form_menus.h:89
LineColorMenu::getGray
void getGray()
Definition form_menus.h:96
LineColorMenu::getGreen
void getGreen()
Definition form_menus.h:91
LineColorMenu::getMagenta
void getMagenta()
Definition form_menus.h:94
LineColorMenu::getRed
void getRed()
Definition form_menus.h:90
LineColorMenu::getBlack
void getBlack()
Definition form_menus.h:92
LineColorMenu::getDarkGreen
void getDarkGreen()
Definition form_menus.h:98
LineColorMenu::getDarkRed
void getDarkRed()
Definition form_menus.h:97
LineColorMenu::LineColorMenu
LineColorMenu(unsigned int which, QWidget *parent)
Definition form_menus.h:33
LineColorMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:77
LineColorMenu::whichTrigger
void whichTrigger(unsigned int which, const QString &name)
LineColorMenu::getDarkBlue
void getDarkBlue()
Definition form_menus.h:99
LineColorMenu::~LineColorMenu
~LineColorMenu() override
Definition form_menus.h:73
LineColorMenu::getYellow
void getYellow()
Definition form_menus.h:95
LineColorMenu::getCyan
void getCyan()
Definition form_menus.h:93
LineMarkerMenu::getStar2
void getStar2()
Definition form_menus.h:336
LineMarkerMenu::~LineMarkerMenu
~LineMarkerMenu() override
Definition form_menus.h:307
LineMarkerMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:311
LineMarkerMenu::getStar1
void getStar1()
Definition form_menus.h:335
LineMarkerMenu::getVLine
void getVLine()
Definition form_menus.h:334
LineMarkerMenu::whichTrigger
void whichTrigger(unsigned int which, QwtSymbol::Style)
LineMarkerMenu::getLTriangle
void getLTriangle()
Definition form_menus.h:329
LineMarkerMenu::getDTriangle
void getDTriangle()
Definition form_menus.h:328
LineMarkerMenu::getTriangle
void getTriangle()
Definition form_menus.h:327
LineMarkerMenu::LineMarkerMenu
LineMarkerMenu(unsigned int which, QWidget *parent)
Definition form_menus.h:261
LineMarkerMenu::getCircle
void getCircle()
Definition form_menus.h:324
LineMarkerMenu::getNumActions
int getNumActions() const
Definition form_menus.h:309
LineMarkerMenu::getRect
void getRect()
Definition form_menus.h:325
LineMarkerMenu::getHLine
void getHLine()
Definition form_menus.h:333
LineMarkerMenu::getRTriangle
void getRTriangle()
Definition form_menus.h:330
LineMarkerMenu::getHexagon
void getHexagon()
Definition form_menus.h:337
LineMarkerMenu::getCross
void getCross()
Definition form_menus.h:331
LineMarkerMenu::getXCross
void getXCross()
Definition form_menus.h:332
LineMarkerMenu::getDiamond
void getDiamond()
Definition form_menus.h:326
LineMarkerMenu::getNone
void getNone()
Definition form_menus.h:323
LineStyleMenu::getSolid
void getSolid()
Definition form_menus.h:240
LineStyleMenu::getNone
void getNone()
Definition form_menus.h:239
LineStyleMenu::getDashDot
void getDashDot()
Definition form_menus.h:243
LineStyleMenu::getDots
void getDots()
Definition form_menus.h:242
LineStyleMenu::getDashDotDot
void getDashDotDot()
Definition form_menus.h:244
LineStyleMenu::getDash
void getDash()
Definition form_menus.h:241
LineStyleMenu::~LineStyleMenu
~LineStyleMenu() override
Definition form_menus.h:223
LineStyleMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:227
LineStyleMenu::getNumActions
int getNumActions() const
Definition form_menus.h:225
LineStyleMenu::LineStyleMenu
LineStyleMenu(unsigned int which, QWidget *parent)
Definition form_menus.h:195
LineStyleMenu::whichTrigger
void whichTrigger(unsigned int which, Qt::PenStyle)
LineTitleAction::getTextDiag
void getTextDiag()
Definition form_menus.h:445
LineTitleAction::LineTitleAction
LineTitleAction(unsigned int which, QWidget *parent)
Definition form_menus.h:417
LineTitleAction::whichTrigger
void whichTrigger(unsigned int which, const QString &text)
LineTitleAction::~LineTitleAction
~LineTitleAction() override
Definition form_menus.h:439
LineWidthMenu::getSix
void getSix()
Definition form_menus.h:174
LineWidthMenu::LineWidthMenu
LineWidthMenu(unsigned int which, QWidget *parent)
Definition form_menus.h:117
LineWidthMenu::~LineWidthMenu
~LineWidthMenu() override
Definition form_menus.h:153
LineWidthMenu::getNine
void getNine()
Definition form_menus.h:177
LineWidthMenu::getOne
void getOne()
Definition form_menus.h:169
LineWidthMenu::whichTrigger
void whichTrigger(unsigned int which, unsigned int width)
LineWidthMenu::getEight
void getEight()
Definition form_menus.h:176
LineWidthMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:157
LineWidthMenu::getTwo
void getTwo()
Definition form_menus.h:170
LineWidthMenu::getFour
void getFour()
Definition form_menus.h:172
LineWidthMenu::getFive
void getFive()
Definition form_menus.h:173
LineWidthMenu::getSeven
void getSeven()
Definition form_menus.h:175
LineWidthMenu::getTen
void getTen()
Definition form_menus.h:178
LineWidthMenu::getNumActions
int getNumActions() const
Definition form_menus.h:155
LineWidthMenu::getThree
void getThree()
Definition form_menus.h:171
MarkerAlphaMenu::getOff
void getOff()
Definition form_menus.h:400
MarkerAlphaMenu::getMedium
void getMedium()
Definition form_menus.h:398
MarkerAlphaMenu::MarkerAlphaMenu
MarkerAlphaMenu(unsigned int which, QWidget *parent)
Definition form_menus.h:354
MarkerAlphaMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:384
MarkerAlphaMenu::~MarkerAlphaMenu
~MarkerAlphaMenu() override
Definition form_menus.h:380
MarkerAlphaMenu::getNumActions
int getNumActions() const
Definition form_menus.h:382
MarkerAlphaMenu::getHigh
void getHigh()
Definition form_menus.h:399
MarkerAlphaMenu::whichTrigger
void whichTrigger(unsigned int which, unsigned int)
MarkerAlphaMenu::getLow
void getLow()
Definition form_menus.h:397
MarkerAlphaMenu::getNone
void getNone()
Definition form_menus.h:396
NPointsMenu::setDiagText
void setDiagText(const int npts)
Definition form_menus.h:711
NPointsMenu::getTextDiag
void getTextDiag()
Definition form_menus.h:713
NPointsMenu::whichTrigger
void whichTrigger(const int npts)
NPointsMenu::~NPointsMenu
~NPointsMenu() override
Definition form_menus.h:705
NPointsMenu::NPointsMenu
NPointsMenu(QWidget *parent)
Definition form_menus.h:683
NumberColorMapMenu::getBlack
void getBlack()
Definition form_menus.h:1161
NumberColorMapMenu::getBlackRed
void getBlackRed()
Definition form_menus.h:1165
NumberColorMapMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:1148
NumberColorMapMenu::NumberColorMapMenu
NumberColorMapMenu(unsigned int which, QWidget *parent)
Definition form_menus.h:1113
NumberColorMapMenu::getWhiteHot
void getWhiteHot()
Definition form_menus.h:1163
NumberColorMapMenu::~NumberColorMapMenu
~NumberColorMapMenu() override
Definition form_menus.h:1144
NumberColorMapMenu::getOther
void getOther()
Definition form_menus.h:1166
NumberColorMapMenu::whichTrigger
void whichTrigger(unsigned int which, const QColor &min_color, const QColor &max_color)
NumberColorMapMenu::getNumActions
int getNumActions() const
Definition form_menus.h:1146
NumberColorMapMenu::getBlueRed
void getBlueRed()
Definition form_menus.h:1162
NumberColorMapMenu::getBlackHot
void getBlackHot()
Definition form_menus.h:1164
NumberLayoutMenu::getAction
QAction * getAction(gr::qtgui::graph_t layout)
Definition form_menus.h:1074
NumberLayoutMenu::getNone
void getNone()
Definition form_menus.h:1097
NumberLayoutMenu::~NumberLayoutMenu
~NumberLayoutMenu() override
Definition form_menus.h:1062
NumberLayoutMenu::whichTrigger
void whichTrigger(gr::qtgui::graph_t layout)
NumberLayoutMenu::getVert
void getVert()
Definition form_menus.h:1096
NumberLayoutMenu::NumberLayoutMenu
NumberLayoutMenu(QWidget *parent)
Definition form_menus.h:1042
NumberLayoutMenu::getNumActions
int getNumActions() const
Definition form_menus.h:1064
NumberLayoutMenu::getHoriz
void getHoriz()
Definition form_menus.h:1095
NumberLayoutMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:1066
PopupMenu::~PopupMenu
~PopupMenu() override
Definition form_menus.h:1217
PopupMenu::PopupMenu
PopupMenu(QString desc, QWidget *parent)
Definition form_menus.h:1195
PopupMenu::whichTrigger
void whichTrigger(const QString data)
PopupMenu::setText
void setText(QString s)
Definition form_menus.h:1219
PopupMenu::getTextDiag
void getTextDiag()
Definition form_menus.h:1225
TriggerChannelMenu::~TriggerChannelMenu
~TriggerChannelMenu() override
Definition form_menus.h:1003
TriggerChannelMenu::TriggerChannelMenu
TriggerChannelMenu(int nchans, QWidget *parent)
Definition form_menus.h:990
TriggerChannelMenu::getNumActions
int getNumActions() const
Definition form_menus.h:1005
TriggerChannelMenu::getChannel
void getChannel()
Definition form_menus.h:1021
TriggerChannelMenu::whichTrigger
void whichTrigger(int n)
TriggerChannelMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:1007
TriggerModeMenu::~TriggerModeMenu
~TriggerModeMenu() override
Definition form_menus.h:869
TriggerModeMenu::getNumActions
int getNumActions() const
Definition form_menus.h:871
TriggerModeMenu::getFree
void getFree()
Definition form_menus.h:905
TriggerModeMenu::getNorm
void getNorm()
Definition form_menus.h:907
TriggerModeMenu::getAction
QAction * getAction(gr::qtgui::trigger_mode mode)
Definition form_menus.h:881
TriggerModeMenu::getAuto
void getAuto()
Definition form_menus.h:906
TriggerModeMenu::TriggerModeMenu
TriggerModeMenu(QWidget *parent)
Definition form_menus.h:847
TriggerModeMenu::whichTrigger
void whichTrigger(gr::qtgui::trigger_mode mode)
TriggerModeMenu::getTag
void getTag()
Definition form_menus.h:908
TriggerModeMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:873
TriggerSlopeMenu::~TriggerSlopeMenu
~TriggerSlopeMenu() override
Definition form_menus.h:942
TriggerSlopeMenu::getNumActions
int getNumActions() const
Definition form_menus.h:944
TriggerSlopeMenu::getPos
void getPos()
Definition form_menus.h:973
TriggerSlopeMenu::getAction
QAction * getAction(unsigned int which)
Definition form_menus.h:946
TriggerSlopeMenu::TriggerSlopeMenu
TriggerSlopeMenu(QWidget *parent)
Definition form_menus.h:924
TriggerSlopeMenu::getNeg
void getNeg()
Definition form_menus.h:974
TriggerSlopeMenu::getAction
QAction * getAction(gr::qtgui::trigger_slope slope)
Definition form_menus.h:954
TriggerSlopeMenu::whichTrigger
void whichTrigger(gr::qtgui::trigger_slope slope)
gr::fft::window::win_type
win_type
Definition window.h:28
gr::fft::window::WIN_HANN
@ WIN_HANN
Hann window; max attenuation 44 dB.
Definition window.h:31
gr::fft::window::WIN_RECTANGULAR
@ WIN_RECTANGULAR
Basic rectangular window; max attenuation 21 dB.
Definition window.h:34
gr::fft::window::WIN_BLACKMAN_hARRIS
@ WIN_BLACKMAN_hARRIS
Blackman-harris window; max attenuation 92 dB.
Definition window.h:36
gr::fft::window::WIN_KAISER
@ WIN_KAISER
Kaiser window; max attenuation see window::max_attenuation.
Definition window.h:35
gr::fft::window::WIN_NONE
@ WIN_NONE
don't use a window
Definition window.h:29
gr::fft::window::WIN_BLACKMAN
@ WIN_BLACKMAN
Blackman window; max attenuation 74 dB.
Definition window.h:33
gr::fft::window::WIN_FLATTOP
@ WIN_FLATTOP
flat top window; useful in FFTs; max attenuation 93 dB
Definition window.h:40
gr::fft::window::WIN_HAMMING
@ WIN_HAMMING
Hamming window; max attenuation 53 dB.
Definition window.h:30
firdes.h
gr::qtgui::INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR
@ INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR
Definition qtgui_types.h:126
gr::qtgui::INTENSITY_COLOR_MAP_TYPE_USER_DEFINED
@ INTENSITY_COLOR_MAP_TYPE_USER_DEFINED
Definition qtgui_types.h:130
gr::qtgui::INTENSITY_COLOR_MAP_TYPE_WHITE_HOT
@ INTENSITY_COLOR_MAP_TYPE_WHITE_HOT
Definition qtgui_types.h:127
gr::qtgui::INTENSITY_COLOR_MAP_TYPE_SUNSET
@ INTENSITY_COLOR_MAP_TYPE_SUNSET
Definition qtgui_types.h:131
gr::qtgui::INTENSITY_COLOR_MAP_TYPE_COOL
@ INTENSITY_COLOR_MAP_TYPE_COOL
Definition qtgui_types.h:132
gr::qtgui::INTENSITY_COLOR_MAP_TYPE_BLACK_HOT
@ INTENSITY_COLOR_MAP_TYPE_BLACK_HOT
Definition qtgui_types.h:128
gr::qtgui::INTENSITY_COLOR_MAP_TYPE_INCANDESCENT
@ INTENSITY_COLOR_MAP_TYPE_INCANDESCENT
Definition qtgui_types.h:129
gr::qtgui::trigger_mode
trigger_mode
Definition trigger_mode.h:17
gr::qtgui::TRIG_MODE_FREE
@ TRIG_MODE_FREE
Definition trigger_mode.h:18
gr::qtgui::TRIG_MODE_NORM
@ TRIG_MODE_NORM
Definition trigger_mode.h:20
gr::qtgui::TRIG_MODE_AUTO
@ TRIG_MODE_AUTO
Definition trigger_mode.h:19
gr::qtgui::TRIG_MODE_TAG
@ TRIG_MODE_TAG
Definition trigger_mode.h:21
gr::qtgui::trigger_slope
trigger_slope
Definition trigger_mode.h:24
gr::qtgui::TRIG_SLOPE_NEG
@ TRIG_SLOPE_NEG
Definition trigger_mode.h:26
gr::qtgui::TRIG_SLOPE_POS
@ TRIG_SLOPE_POS
Definition trigger_mode.h:25
gr::qtgui::graph_t
graph_t
Definition qtgui_types.h:119
gr::qtgui::NUM_GRAPH_VERT
@ NUM_GRAPH_VERT
Definition qtgui_types.h:122
gr::qtgui::NUM_GRAPH_NONE
@ NUM_GRAPH_NONE
Definition qtgui_types.h:120
gr::qtgui::NUM_GRAPH_HORIZ
@ NUM_GRAPH_HORIZ
Definition qtgui_types.h:121
qtgui_types.h
trigger_mode.h