28 #include <QtGui/QtGui>
29 #include <QtGui/QIntValidator>
30 #include <QtGui/QDoubleValidator>
31 #include <qwt_symbol.h>
42 : QMenu(
"Line Color", parent), d_which(which)
44 d_grp =
new QActionGroup(
this);
46 d_act.push_back(
new QAction(
"Blue",
this));
47 d_act.push_back(
new QAction(
"Red",
this));
48 d_act.push_back(
new QAction(
"Green",
this));
49 d_act.push_back(
new QAction(
"Black",
this));
50 d_act.push_back(
new QAction(
"Cyan",
this));
51 d_act.push_back(
new QAction(
"Magenta",
this));
52 d_act.push_back(
new QAction(
"Yellow",
this));
53 d_act.push_back(
new QAction(
"Gray",
this));
54 d_act.push_back(
new QAction(
"Dark Red",
this));
55 d_act.push_back(
new QAction(
"Dark Green",
this));
56 d_act.push_back(
new QAction(
"Dark Blue",
this));
57 d_act.push_back(
new QAction(
"Dark Gray",
this));
59 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getBlue()));
60 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getRed()));
61 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getGreen()));
62 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getBlack()));
63 connect(d_act[4], SIGNAL(triggered()),
this, SLOT(
getCyan()));
64 connect(d_act[5], SIGNAL(triggered()),
this, SLOT(
getMagenta()));
65 connect(d_act[6], SIGNAL(triggered()),
this, SLOT(
getYellow()));
66 connect(d_act[7], SIGNAL(triggered()),
this, SLOT(
getGray()));
67 connect(d_act[8], SIGNAL(triggered()),
this, SLOT(
getDarkRed()));
68 connect(d_act[9], SIGNAL(triggered()),
this, SLOT(
getDarkGreen()));
69 connect(d_act[10], SIGNAL(triggered()),
this, SLOT(
getDarkBlue()));
70 connect(d_act[11], SIGNAL(triggered()),
this, SLOT(
getDarkGray()));
72 QListIterator<QAction*> i(d_act);
74 QAction *a = i.next();
75 a->setCheckable(
true);
76 a->setActionGroup(d_grp);
91 if(which < d_act.size())
94 throw std::runtime_error(
"LineColorMenu::getAction: which out of range.\n");
116 QList<QAction *> d_act;
130 : QMenu(
"Line Width", parent), d_which(which)
132 d_grp =
new QActionGroup(
this);
134 d_act.push_back(
new QAction(
"1",
this));
135 d_act.push_back(
new QAction(
"2",
this));
136 d_act.push_back(
new QAction(
"3",
this));
137 d_act.push_back(
new QAction(
"4",
this));
138 d_act.push_back(
new QAction(
"5",
this));
139 d_act.push_back(
new QAction(
"6",
this));
140 d_act.push_back(
new QAction(
"7",
this));
141 d_act.push_back(
new QAction(
"8",
this));
142 d_act.push_back(
new QAction(
"9",
this));
143 d_act.push_back(
new QAction(
"10",
this));
145 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getOne()));
146 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getTwo()));
147 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getThree()));
148 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getFour()));
149 connect(d_act[4], SIGNAL(triggered()),
this, SLOT(
getFive()));
150 connect(d_act[5], SIGNAL(triggered()),
this, SLOT(
getSix()));
151 connect(d_act[6], SIGNAL(triggered()),
this, SLOT(
getSeven()));
152 connect(d_act[7], SIGNAL(triggered()),
this, SLOT(
getEight()));
153 connect(d_act[8], SIGNAL(triggered()),
this, SLOT(
getNine()));
154 connect(d_act[9], SIGNAL(triggered()),
this, SLOT(
getTen()));
156 QListIterator<QAction*> i(d_act);
158 QAction *a = i.next();
159 a->setCheckable(
true);
160 a->setActionGroup(d_grp);
175 if(which < d_act.size())
178 throw std::runtime_error(
"LineWidthMenu::getAction: which out of range.\n");
198 QList<QAction *> d_act;
212 : QMenu(
"Line Style", parent), d_which(which)
214 d_grp =
new QActionGroup(
this);
216 d_act.push_back(
new QAction(
"None",
this));
217 d_act.push_back(
new QAction(
"Solid",
this));
218 d_act.push_back(
new QAction(
"Dash",
this));
219 d_act.push_back(
new QAction(
"Dots",
this));
220 d_act.push_back(
new QAction(
"Dash-Dot",
this));
221 d_act.push_back(
new QAction(
"Dash-Dot-Dot",
this));
223 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getNone()));
224 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getSolid()));
225 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getDash()));
226 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getDots()));
227 connect(d_act[4], SIGNAL(triggered()),
this, SLOT(
getDashDot()));
228 connect(d_act[5], SIGNAL(triggered()),
this, SLOT(
getDashDotDot()));
230 QListIterator<QAction*> i(d_act);
232 QAction *a = i.next();
233 a->setCheckable(
true);
234 a->setActionGroup(d_grp);
249 if(which < d_act.size())
252 throw std::runtime_error(
"LineStyleMenu::getAction: which out of range.\n");
268 QList<QAction *> d_act;
282 : QMenu(
"Line Marker", parent), d_which(which)
284 d_grp =
new QActionGroup(
this);
286 d_act.push_back(
new QAction(
"None",
this));
287 d_act.push_back(
new QAction(
"Circle",
this));
288 d_act.push_back(
new QAction(
"Rectangle",
this));
289 d_act.push_back(
new QAction(
"Diamond",
this));
290 d_act.push_back(
new QAction(
"Triangle",
this));
291 d_act.push_back(
new QAction(
"Down Triangle",
this));
292 d_act.push_back(
new QAction(
"Left Triangle",
this));
293 d_act.push_back(
new QAction(
"Right Triangle",
this));
294 d_act.push_back(
new QAction(
"Cross",
this));
295 d_act.push_back(
new QAction(
"X-Cross",
this));
296 d_act.push_back(
new QAction(
"Horiz. Line",
this));
297 d_act.push_back(
new QAction(
"Vert. Line",
this));
298 d_act.push_back(
new QAction(
"Star 1",
this));
299 d_act.push_back(
new QAction(
"Star 2",
this));
300 d_act.push_back(
new QAction(
"Hexagon",
this));
302 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getNone()));
303 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getCircle()));
304 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getRect()));
305 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getDiamond()));
306 connect(d_act[4], SIGNAL(triggered()),
this, SLOT(
getTriangle()));
307 connect(d_act[5], SIGNAL(triggered()),
this, SLOT(
getDTriangle()));
308 connect(d_act[6], SIGNAL(triggered()),
this, SLOT(
getLTriangle()));
309 connect(d_act[7], SIGNAL(triggered()),
this, SLOT(
getRTriangle()));
310 connect(d_act[8], SIGNAL(triggered()),
this, SLOT(
getCross()));
311 connect(d_act[9], SIGNAL(triggered()),
this, SLOT(
getXCross()));
312 connect(d_act[10], SIGNAL(triggered()),
this, SLOT(
getHLine()));
313 connect(d_act[11], SIGNAL(triggered()),
this, SLOT(
getVLine()));
314 connect(d_act[12], SIGNAL(triggered()),
this, SLOT(
getStar1()));
315 connect(d_act[13], SIGNAL(triggered()),
this, SLOT(
getStar2()));
316 connect(d_act[14], SIGNAL(triggered()),
this, SLOT(
getHexagon()));
318 QListIterator<QAction*> i(d_act);
320 QAction *a = i.next();
321 a->setCheckable(
true);
322 a->setActionGroup(d_grp);
337 if(which < d_act.size())
340 throw std::runtime_error(
"LineMarkerMenu::getAction: which out of range.\n");
365 QList<QAction *> d_act;
379 : QMenu(
"Line Transparency", parent), d_which(which)
381 d_grp =
new QActionGroup(
this);
383 d_act.push_back(
new QAction(
"None",
this));
384 d_act.push_back(
new QAction(
"Low",
this));
385 d_act.push_back(
new QAction(
"Medium",
this));
386 d_act.push_back(
new QAction(
"High",
this));
387 d_act.push_back(
new QAction(
"Off",
this));
389 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getNone()));
390 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getLow()));
391 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getMedium()));
392 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getHigh()));
393 connect(d_act[4], SIGNAL(triggered()),
this, SLOT(
getOff()));
395 QListIterator<QAction*> i(d_act);
397 QAction *a = i.next();
398 a->setCheckable(
true);
399 a->setActionGroup(d_grp);
414 if(which < d_act.size())
417 throw std::runtime_error(
"MarkerAlphaMenu::getAction: which out of range.\n");
432 QList<QAction *> d_act;
446 : QAction(
"Line Title", parent), d_which(which)
448 d_diag =
new QDialog(parent);
449 d_diag->setModal(
true);
451 d_text =
new QLineEdit();
453 QGridLayout *layout =
new QGridLayout(d_diag);
454 QPushButton *btn_ok =
new QPushButton(tr(
"OK"));
455 QPushButton *btn_cancel =
new QPushButton(tr(
"Cancel"));
457 layout->addWidget(d_text, 0, 0, 1, 2);
458 layout->addWidget(btn_ok, 1, 0);
459 layout->addWidget(btn_cancel, 1, 1);
461 connect(btn_ok, SIGNAL(clicked()),
this, SLOT(getText()));
462 connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
464 connect(
this, SIGNAL(triggered()),
this, SLOT(
getTextDiag()));
503 : QAction(
"Other", parent)
505 d_diag =
new QDialog(parent);
506 d_diag->setWindowTitle(
"Other");
507 d_diag->setModal(
true);
509 d_text =
new QLineEdit();
511 QGridLayout *layout =
new QGridLayout(d_diag);
512 QPushButton *btn_ok =
new QPushButton(tr(
"OK"));
513 QPushButton *btn_cancel =
new QPushButton(tr(
"Cancel"));
515 layout->addWidget(d_text, 0, 0, 1, 2);
516 layout->addWidget(btn_ok, 1, 0);
517 layout->addWidget(btn_cancel, 1, 1);
519 connect(btn_ok, SIGNAL(clicked()),
this, SLOT(getText()));
520 connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
522 connect(
this, SIGNAL(triggered()),
this, SLOT(
getTextDiag()));
530 d_text->setValidator(v);
535 d_text->setText(text);
568 : QAction(
"Other", parent)
570 d_diag =
new QDialog(parent);
571 d_diag->setWindowTitle(
"Other");
572 d_diag->setModal(
true);
574 d_text0 =
new QLineEdit();
575 d_text1 =
new QLineEdit();
577 QLabel *_label0 =
new QLabel(label0);
578 QLabel *_label1 =
new QLabel(label1);
580 QGridLayout *layout =
new QGridLayout(d_diag);
581 QPushButton *btn_ok =
new QPushButton(tr(
"OK"));
582 QPushButton *btn_cancel =
new QPushButton(tr(
"Cancel"));
584 layout->addWidget(_label0, 0, 0, 1, 2);
585 layout->addWidget(_label1, 1, 0, 1, 2);
587 layout->addWidget(d_text0, 0, 1, 1, 2);
588 layout->addWidget(d_text1, 1, 1, 1, 2);
589 layout->addWidget(btn_ok, 2, 0);
590 layout->addWidget(btn_cancel, 2, 1);
592 connect(btn_ok, SIGNAL(clicked()),
this, SLOT(getText()));
593 connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
595 connect(
this, SIGNAL(triggered()),
this, SLOT(
getTextDiag()));
602 void whichTrigger(
const QString &text0,
const QString &text1);
633 : QMenu(
"FFT Size", parent)
635 d_grp =
new QActionGroup(
this);
637 d_act.push_back(
new QAction(
"32",
this));
638 d_act.push_back(
new QAction(
"64",
this));
639 d_act.push_back(
new QAction(
"128",
this));
640 d_act.push_back(
new QAction(
"256",
this));
641 d_act.push_back(
new QAction(
"512",
this));
642 d_act.push_back(
new QAction(
"1024",
this));
643 d_act.push_back(
new QAction(
"2048",
this));
644 d_act.push_back(
new QAction(
"4096",
this));
650 d_grp =
new QActionGroup(
this);
651 for(
int t = 0; t < d_act.size(); t++) {
652 d_act[t]->setCheckable(
true);
653 d_act[t]->setActionGroup(d_grp);
656 QIntValidator *valid =
new QIntValidator(32, 4096,
this);
657 ((
OtherAction*)d_act[d_act.size()-1])->setValidator(valid);
659 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
get05()));
660 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
get06()));
661 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
get07()));
662 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
get08()));
663 connect(d_act[4], SIGNAL(triggered()),
this, SLOT(
get09()));
664 connect(d_act[5], SIGNAL(triggered()),
this, SLOT(
get10()));
665 connect(d_act[6], SIGNAL(triggered()),
this, SLOT(
get11()));
666 connect(d_act[7], SIGNAL(triggered()),
this, SLOT(
get12()));
671 this, SLOT(
getOther(
const QString&)));
673 QListIterator<QAction*> i(d_act);
675 QAction *a = i.next();
676 a->setCheckable(
true);
677 a->setActionGroup(d_grp);
692 if(which < d_act.size())
695 throw std::runtime_error(
"FFTSizeMenu::getAction: which out of range.\n");
701 float which = logf(static_cast<float>(size))/logf(2.0) - 5;
703 if(modff(which,&ipt) == 0) {
704 if(which < d_act.size()-1)
705 return d_act[static_cast<int>(which)];
707 throw std::runtime_error(
"FFTSizeMenu::getActionFromString: which out of range.\n");
711 ((
OtherAction*)d_act[d_act.size()-1])->setDiagText(QString().setNum(size));
712 return d_act[d_act.size()-1];
733 int value = str.toInt();
738 QList<QAction *> d_act;
753 : QMenu(
"FFT Average", parent)
755 d_grp =
new QActionGroup(
this);
762 d_act.push_back(
new QAction(
"Off",
this));
763 d_act.push_back(
new QAction(
"High",
this));
764 d_act.push_back(
new QAction(
"Medium",
this));
765 d_act.push_back(
new QAction(
"Low",
this));
768 d_grp =
new QActionGroup(
this);
769 for(
int t = 0; t < d_act.size(); t++) {
770 d_act[t]->setCheckable(
true);
771 d_act[t]->setActionGroup(d_grp);
773 d_act[0]->setChecked(
true);
775 QDoubleValidator *valid =
new QDoubleValidator(0.0, 1.0, 3,
this);
776 ((
OtherAction*)d_act[d_act.size()-1])->setValidator(valid);
778 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getOff()));
779 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getHigh()));
780 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getMedium()));
781 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getLow()));
783 this, SLOT(
getOther(
const QString&)));
785 QListIterator<QAction*> i(d_act);
787 QAction *a = i.next();
788 a->setCheckable(
true);
789 a->setActionGroup(d_grp);
804 if(which < d_act.size())
807 throw std::runtime_error(
"FFTSizeMenu::getAction: which out of range.\n");
815 else if(avg == d_high)
817 else if(avg == d_medium)
819 else if(avg == d_low)
822 ((
OtherAction*)d_act[d_act.size()-1])->setDiagText(QString().setNum(avg));
825 return d_act[
static_cast<int>(which)];
853 float value = str.toFloat();
858 QList<QAction *> d_act;
861 float d_off, d_high, d_medium, d_low;
874 : QMenu(
"FFT Window", parent)
876 d_act.push_back(
new QAction(
"None",
this));
877 d_act.push_back(
new QAction(
"Hamming",
this));
878 d_act.push_back(
new QAction(
"Hann",
this));
879 d_act.push_back(
new QAction(
"Blackman",
this));
880 d_act.push_back(
new QAction(
"Blackman-harris",
this));
881 d_act.push_back(
new QAction(
"Rectangular",
this));
882 d_act.push_back(
new QAction(
"Kaiser",
this));
883 d_act.push_back(
new QAction(
"Flat-top",
this));
885 d_grp =
new QActionGroup(
this);
886 for(
int t = 0; t < d_act.size(); t++) {
887 d_act[t]->setCheckable(
true);
888 d_act[t]->setActionGroup(d_grp);
891 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getNone()));
892 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getHamming()));
893 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getHann()));
894 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getBlackman()));
896 connect(d_act[5], SIGNAL(triggered()),
this, SLOT(
getRectangular()));
897 connect(d_act[6], SIGNAL(triggered()),
this, SLOT(
getKaiser()));
898 connect(d_act[7], SIGNAL(triggered()),
this, SLOT(
getFlattop()));
900 QListIterator<QAction*> i(d_act);
902 QAction *a = i.next();
917 if(which < d_act.size())
920 throw std::runtime_error(
"FFTWindowMenu::getAction: which out of range.\n");
926 switch(static_cast<int>(type)) {
953 QList<QAction *> d_act;
968 : QAction(
"Number of Points", parent)
970 d_diag =
new QDialog(parent);
971 d_diag->setWindowTitle(
"Number of Points");
972 d_diag->setModal(
true);
974 d_text =
new QLineEdit();
976 QGridLayout *layout =
new QGridLayout(d_diag);
977 QPushButton *btn_ok =
new QPushButton(tr(
"OK"));
978 QPushButton *btn_cancel =
new QPushButton(tr(
"Cancel"));
980 layout->addWidget(d_text, 0, 0, 1, 2);
981 layout->addWidget(btn_ok, 1, 0);
982 layout->addWidget(btn_cancel, 1, 1);
984 connect(btn_ok, SIGNAL(clicked()),
this, SLOT(getText()));
985 connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
987 connect(
this, SIGNAL(triggered()),
this, SLOT(
getTextDiag()));
995 d_text->setText(QString().setNum(npts));
1029 : QMenu(
"Color Map", parent), d_which(which)
1031 d_grp =
new QActionGroup(
this);
1033 d_act.push_back(
new QAction(
"Multi-Color",
this));
1034 d_act.push_back(
new QAction(
"White Hot",
this));
1035 d_act.push_back(
new QAction(
"Black Hot",
this));
1036 d_act.push_back(
new QAction(
"Incandescent",
this));
1037 d_act.push_back(
new QAction(
"Sunset",
this));
1038 d_act.push_back(
new QAction(
"Cool",
this));
1039 d_act.push_back(
new QAction(
"Other",
this));
1042 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getMultiColor()));
1043 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getWhiteHot()));
1044 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getBlackHot()));
1045 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getIncandescent()));
1046 connect(d_act[4], SIGNAL(triggered()),
this, SLOT(
getSunset()));
1047 connect(d_act[5], SIGNAL(triggered()),
this, SLOT(
getCool()));
1048 connect(d_act[6], SIGNAL(triggered()),
this, SLOT(
getOther()));
1050 QListIterator<QAction*> i(d_act);
1051 while(i.hasNext()) {
1052 QAction *a = i.next();
1053 a->setCheckable(
true);
1054 a->setActionGroup(d_grp);
1058 d_max_value = QColor(
"white");
1059 d_min_value = QColor(
"white");
1067 return d_act.size();
1072 if(which < d_act.size())
1073 return d_act[which];
1075 throw std::runtime_error(
"ColorMapMenu::getAction: which out of range.\n");
1080 const QColor &min_color=QColor(),
1081 const QColor &max_color=QColor());
1093 QMessageBox::information(
this,
"Set low and high intensities",
1094 "In the next windows, select the low and then the high intensity colors.",
1096 d_min_value = QColorDialog::getColor(d_min_value,
this);
1097 d_max_value = QColorDialog::getColor(d_max_value,
this);
1100 d_min_value, d_max_value);
1104 QActionGroup *d_grp;
1105 QList<QAction *> d_act;
1107 QColor d_max_value, d_min_value;
1121 : QMenu(
"Mode", parent)
1123 d_grp =
new QActionGroup(
this);
1124 d_act.push_back(
new QAction(
"Free",
this));
1125 d_act.push_back(
new QAction(
"Auto",
this));
1126 d_act.push_back(
new QAction(
"Normal",
this));
1127 d_act.push_back(
new QAction(
"Tag",
this));
1129 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getFree()));
1130 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getAuto()));
1131 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getNorm()));
1132 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getTag()));
1134 QListIterator<QAction*> i(d_act);
1135 while(i.hasNext()) {
1136 QAction *a = i.next();
1137 a->setCheckable(
true);
1138 a->setActionGroup(d_grp);
1148 return d_act.size();
1153 if(which < d_act.size())
1154 return d_act[which];
1156 throw std::runtime_error(
"TriggerModeMenu::getAction: which out of range.\n");
1175 throw std::runtime_error(
"TriggerModeMenu::getAction: unknown trigger mode.\n");
1189 QList<QAction *> d_act;
1190 QActionGroup *d_grp;
1203 : QMenu(
"Slope", parent)
1205 d_grp =
new QActionGroup(
this);
1206 d_act.push_back(
new QAction(
"Positive",
this));
1207 d_act.push_back(
new QAction(
"Negative",
this));
1209 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getPos()));
1210 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getNeg()));
1212 QListIterator<QAction*> i(d_act);
1213 while(i.hasNext()) {
1214 QAction *a = i.next();
1215 a->setCheckable(
true);
1216 a->setActionGroup(d_grp);
1226 return d_act.size();
1231 if(which < d_act.size())
1232 return d_act[which];
1234 throw std::runtime_error(
"TriggerSlopeMenu::getAction: which out of range.\n");
1247 throw std::runtime_error(
"TriggerSlopeMenu::getAction: unknown trigger slope.\n");
1259 QList<QAction *> d_act;
1260 QActionGroup *d_grp;
1273 : QMenu(
"Channel", parent)
1275 d_grp =
new QActionGroup(
this);
1276 for(
int i = 0; i < nchans; i++) {
1277 d_act.push_back(
new QAction(QString().setNum(i),
this));
1278 d_act[i]->setCheckable(
true);
1279 d_act[i]->setActionGroup(d_grp);
1281 addAction(d_act[i]);
1282 connect(d_act[i], SIGNAL(triggered()),
this, SLOT(
getChannel()));
1291 return d_act.size();
1296 if(which < d_act.size())
1297 return d_act[which];
1299 throw std::runtime_error(
"TriggerChannelMenu::getAction: which out of range.\n");
1309 QAction *a = d_grp->checkedAction();
1310 int which = a->text().toInt();
1315 QList<QAction *> d_act;
1316 QActionGroup *d_grp;
1329 : QMenu(
"Layout", parent)
1331 d_grp =
new QActionGroup(
this);
1332 d_act.push_back(
new QAction(
"Horizontal",
this));
1333 d_act.push_back(
new QAction(
"Vertical",
this));
1334 d_act.push_back(
new QAction(
"None",
this));
1336 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getHoriz()));
1337 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getVert()));
1338 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getNone()));
1340 QListIterator<QAction*> i(d_act);
1341 while(i.hasNext()) {
1342 QAction *a = i.next();
1343 a->setCheckable(
true);
1344 a->setActionGroup(d_grp);
1354 return d_act.size();
1359 if(which < d_act.size())
1360 return d_act[which];
1362 throw std::runtime_error(
"NumberLayoutMenu::getAction: which out of range.\n");
1378 throw std::runtime_error(
"NumberLayoutMenu::getAction: unknown layout type.\n");
1391 QList<QAction *> d_act;
1392 QActionGroup *d_grp;
1405 : QMenu(
"Color Map", parent), d_which(which)
1407 d_grp =
new QActionGroup(
this);
1409 d_act.push_back(
new QAction(
"Black",
this));
1410 d_act.push_back(
new QAction(
"Blue-Red",
this));
1411 d_act.push_back(
new QAction(
"White Hot",
this));
1412 d_act.push_back(
new QAction(
"Black Hot",
this));
1413 d_act.push_back(
new QAction(
"Black-Red",
this));
1414 d_act.push_back(
new QAction(
"Other",
this));
1416 connect(d_act[0], SIGNAL(triggered()),
this, SLOT(
getBlack()));
1417 connect(d_act[1], SIGNAL(triggered()),
this, SLOT(
getBlueRed()));
1418 connect(d_act[2], SIGNAL(triggered()),
this, SLOT(
getWhiteHot()));
1419 connect(d_act[3], SIGNAL(triggered()),
this, SLOT(
getBlackHot()));
1420 connect(d_act[4], SIGNAL(triggered()),
this, SLOT(
getBlackRed()));
1421 connect(d_act[5], SIGNAL(triggered()),
this, SLOT(
getOther()));
1423 QListIterator<QAction*> i(d_act);
1424 while(i.hasNext()) {
1425 QAction *a = i.next();
1426 a->setCheckable(
true);
1427 a->setActionGroup(d_grp);
1431 d_max_value = QColor(
"black");
1432 d_min_value = QColor(
"black");
1440 return d_act.size();
1445 if(which < d_act.size())
1446 return d_act[which];
1448 throw std::runtime_error(
"ColorMapMenu::getAction: which out of range.\n");
1453 const QColor &min_color,
1454 const QColor &max_color);
1464 QMessageBox::information(
this,
"Set low and high intensities",
1465 "In the next windows, select the low and then the high intensity colors.",
1467 d_min_value = QColorDialog::getColor(d_min_value,
this);
1468 d_max_value = QColorDialog::getColor(d_max_value,
this);
1474 QActionGroup *d_grp;
1475 QList<QAction *> d_act;
1476 QColor d_max_value, d_min_value;
1490 : QAction(desc, parent)
1492 d_diag =
new QDialog(parent);
1493 d_diag->setWindowTitle(desc);
1494 d_diag->setModal(
true);
1496 d_text =
new QLineEdit();
1498 QGridLayout *layout =
new QGridLayout(d_diag);
1499 QPushButton *btn_ok =
new QPushButton(tr(
"OK"));
1500 QPushButton *btn_cancel =
new QPushButton(tr(
"Cancel"));
1502 layout->addWidget(d_text, 0, 0, 1, 2);
1503 layout->addWidget(btn_ok, 1, 0);
1504 layout->addWidget(btn_cancel, 1, 1);
1506 connect(btn_ok, SIGNAL(clicked()),
this, SLOT(getText()));
1507 connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
1509 connect(
this, SIGNAL(triggered()),
this, SLOT(
getTextDiag()));
OtherAction(QWidget *parent)
Definition: form_menus.h:502
Definition: qtgui_types.h:144
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:38
Hann window; max attenuation 44 dB.
Definition: firdes.h:48
Hamming window; max attenuation 53 dB.
Definition: firdes.h:47
~OtherAction()
Definition: form_menus.h:525
void getTextDiag()
Definition: form_menus.h:605
Definition: qtgui_types.h:158
Definition: form_menus.h:440
Basic rectangular window.
Definition: firdes.h:50
~LineTitleAction()
Definition: form_menus.h:467
Definition: form_menus.h:497
Definition: qtgui_types.h:155
void setValidator(QValidator *v)
Definition: form_menus.h:528
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:37
Kaiser window; max attenuation a function of beta, google it.
Definition: firdes.h:51
graph_t
Definition: qtgui_types.h:142
Definition: form_menus.h:562
void getTextDiag()
Definition: form_menus.h:542
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:31
Definition: cc_common.h:45
Definition: qtgui_types.h:157
don't use a window
Definition: firdes.h:46
OtherDualAction(QString label0, QString label1, QWidget *parent)
Definition: form_menus.h:567
Definition: qtgui_types.h:159
void setDiagText(QString text)
Definition: form_menus.h:533
flat top window; useful in FFTs
Definition: firdes.h:55
Definition: qtgui_types.h:154
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:30
void whichTrigger(const QString &text0, const QString &text1)
Definition: qtgui_types.h:156
trigger_slope
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:36
trigger_mode
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:29
void whichTrigger(const QString &text)
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:33
Definition: qtgui_types.h:145
Blackman window; max attenuation 74 dB.
Definition: firdes.h:49
void whichTrigger(int which, const QString &text)
~OtherDualAction()
Definition: form_menus.h:598
LineTitleAction(int which, QWidget *parent)
Definition: form_menus.h:445
VOLK_API $kern pname $kern name
A function pointer to the dispatcher implementation.
Definition: qtgui_types.h:153
Blackman-harris window.
Definition: firdes.h:52
Definition: gr-qtgui/include/gnuradio/qtgui/trigger_mode.h:32
void getTextDiag()
Definition: form_menus.h:474
win_type
Definition: firdes.h:45
Definition: qtgui_types.h:143