forked from TUW-VieVS/VieSchedppGUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
702 lines (412 loc) · 19.4 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
/*
* VieSched++ Very Long Baseline Interferometry (VLBI) Scheduling Software
* Copyright (C) 2018 Matthias Schartner
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GIT_COMMIT_HASH
#define GIT_COMMIT_HASH "unknown"
#endif
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtCore>
#include <QtGui>
#include <QFileDialog>
#include <QListWidget>
#include <QWhatsThis>
#include <QDialogButtonBox>
#include <QMessageBox>
#include <QTableWidgetItem>
#include <QTreeWidgetItem>
#include <QCloseEvent>
#include <QVBoxLayout>
#include <QComboBox>
#include <QDateTimeEdit>
#include <QDesktopServices>
#include <QDockWidget>
//#include <QTextBrowser>
#include <Utility/mytextbrowser.h>
#include <QRegularExpression>
#include <QFontDatabase>
#include <QInputDialog>
#include <QSlider>
#include <QtCharts/QChart>
#include <QtCharts/QBarSeries>
#include <QtCharts/QBarSet>
#include <QtCharts/QBarCategoryAxis>
#include <QtCharts/QLineSeries>
#include <QtCharts/QScatterSeries>
#include <QtCharts/QValueAxis>
#include <QtCharts/QDateTimeAxis>
#include <QtCharts/QPolarChart>
#include <QtCharts/QAreaSeries>
#include "Utility/chartview.h"
#include "Utility/callout.h"
#include "secondaryGUIs/addgroupdialog.h"
#include "Parameters/baselineparametersdialog.h"
#include "Parameters/stationparametersdialog.h"
#include "Parameters/sourceparametersdialog.h"
#include "secondaryGUIs/addbanddialog.h"
#include "secondaryGUIs/savetosettingsdialog.h"
#include "../VieSchedpp/VieSchedpp.h"
#include "secondaryGUIs/textfileviewer.h"
#include "secondaryGUIs/vieschedpp_analyser.h"
#include "../VieSchedpp/Input/SkdParser.h"
#include "Utility/qtutil.h"
#include "secondaryGUIs/skedcataloginfo.h"
#include "Utility/multicolumnsortfilterproxymodel.h"
#include "secondaryGUIs/obsmodedialog.h"
#include "Utility/statistics.h"
#include "secondaryGUIs/mastersessionviewer.h"
#include "secondaryGUIs/parsedowntimes.h"
#include "Widgets/simulatorwidget.h"
#include "Widgets/solverwidget.h"
#include "Widgets/priorities.h"
#include "Widgets/mulitschedulingwidget.h"
#include "Utility/downloadmanager.h"
QT_CHARTS_USE_NAMESPACE
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void closeEvent(QCloseEvent *event);
QString writeXML();
void loadXML(QString path);
void readSettings();
void on_actionMode_triggered();
void on_actionWelcome_triggered();
void on_actionGeneral_triggered();
void on_actionStation_triggered();
void on_actionSource_triggered();
void on_actionBaseline_triggered();
void on_actionRules_triggered();
void on_actionOutput_triggered();
void on_actionSettings_triggered();
void on_actionWeight_factors_triggered();
void on_actionMulti_Scheduling_triggered();
void on_pushButton_browseAntenna_clicked();
void on_pushButton_browseEquip_clicked();
void on_pushButton_browsePosition_clicked();
void on_pushButton_browseMask_clicked();
void on_pushButton_browseSource_clicked();
void on_pushButton_browseFlux_clicked();
void on_pushButton_browsModes_clicked();
void on_pushButton_browseFreq_clicked();
void on_pushButton_browseTracks_clicked();
void on_pushButton_browseLoif_clicked();
void on_pushButton_browseRec_clicked();
void on_pushButton_browseRx_clicked();
void on_pushButton_browseHdpos_clicked();
void on_treeView_allSelectedStations_clicked(const QModelIndex &index);
void on_groupBox_modeSked_toggled(bool arg1);
void on_groupBox_modeCustom_toggled(bool arg1);
void on_lineEdit_allStationsFilter_textChanged(const QString &arg1);
void on_treeView_allAvailabeStations_clicked(const QModelIndex &index);
void on_actionInput_triggered();
void on_doubleSpinBox_weightLowDecStart_valueChanged(double arg1);
void on_doubleSpinBox_weightLowDecEnd_valueChanged(double arg1);
void on_doubleSpinBox_weightLowElStart_valueChanged(double arg1);
void on_doubleSpinBox_weightLowElEnd_valueChanged(double arg1);
void on_spinBox_scanSequenceCadence_valueChanged(int arg1);
void on_doubleSpinBox_calibratorLowElStart_valueChanged(double arg1);
void on_doubleSpinBox_calibratorLowElEnd_valueChanged(double arg1);
void on_doubleSpinBox_calibratorHighElStart_valueChanged(double arg1);
void on_doubleSpinBox_calibratorHighElEnd_valueChanged(double arg1);
void createModesPolicyTable();
void addModesPolicyTable(QString name);
void createModesCustonBandTable();
void addModesCustomTable(QString name, double freq, int nChannel);
void deleteModesCustomLine(QString name);
void on_actionWhat_is_this_triggered();
void on_spinBox_fontSize_valueChanged(int arg1);
void on_fontComboBox_font_currentFontChanged(const QFont &f);
void on_treeView_allAvailabeStations_entered(const QModelIndex &index);
void worldmap_hovered(QPointF point, bool state);
void skymap_hovered(QPointF point, bool state);
void on_treeView_allSelectedStations_entered(const QModelIndex &index);
void on_actionSky_Coverage_triggered();
void on_actionExit_triggered();
void on_iconSizeSpinBox_valueChanged(int arg1);
void on_treeWidget_2_itemChanged(QTreeWidgetItem *item, int column);
void addGroupStation();
void addGroupSource();
void addGroupBaseline();
void on_pushButton_stationParameter_clicked();
void on_dateTimeEdit_sessionStart_dateTimeChanged(const QDateTime &dateTime);
void on_doubleSpinBox_sessionDuration_valueChanged(double arg1);
void on_DateTimeEdit_startParameterStation_dateTimeChanged(const QDateTime &dateTime);
void on_DateTimeEdit_endParameterStation_dateTimeChanged(const QDateTime &dateTime);
void on_pushButton_3_clicked();
void addSetup(QTreeWidget *targetTreeWidget, QDateTimeEdit *paraStart, QDateTimeEdit *paraEnd,
QComboBox *transition, QComboBox *member, QComboBox *parameter, VieVS::ParameterSetup ¶Setup,
QChartView *setupChartView, QComboBox *targetStationPlot);
void drawTable(const VieVS::ParameterSetup ¶Setup, QTreeWidgetItem *c, const std::map<std::string, std::vector<std::string>> &groups, VieVS::ParameterSettings::Type type);
void on_pushButton_4_clicked();
void deleteSetupSelection(VieVS::ParameterSetup &setup, QChartView *setupChartView, QComboBox *setupCB, QTreeWidget *setupTW);
void on_treeWidget_setupStation_itemEntered(QTreeWidgetItem *item, int column);
void prepareSetupPlot(QChartView *figure, QVBoxLayout *container);
void drawSetupPlot(QChartView *cv, QComboBox *cb, QTreeWidget *tw);
void setBackgroundColorOfChildrenWhite(QTreeWidgetItem *item);
void on_comboBox_stationSettingMember_currentTextChanged(const QString &arg1);
void on_ComboBox_parameterStation_currentTextChanged(const QString &arg1);
void displayStationSetupParameterFromPlot(QPointF,bool);
void displaySourceSetupParameterFromPlot(QPointF,bool);
void displayBaselineSetupParameterFromPlot(QPointF,bool);
void on_comboBox_setupStation_currentTextChanged(const QString &arg1);
void on_pushButton_sourceParameter_clicked();
void on_comboBox_setupSource_currentTextChanged(const QString &arg1);
void on_treeWidget_setupSource_itemEntered(QTreeWidgetItem *item, int column);
void on_pushButton_removeSetupSource_clicked();
void on_pushButton_addSetupSource_clicked();
void on_DateTimeEdit_startParameterSource_dateTimeChanged(const QDateTime &dateTime);
void on_DateTimeEdit_endParameterSource_dateTimeChanged(const QDateTime &dateTime);
void createBaselineModel();
void on_pushButton__baselineParameter_clicked();
void on_DateTimeEdit_startParameterBaseline_dateTimeChanged(const QDateTime &dateTime);
void on_DateTimeEdit_endParameterBaseline_dateTimeChanged(const QDateTime &dateTime);
void on_pushButton_addSetupBaseline_clicked();
void on_pushButton_removeSetupBaseline_clicked();
void on_treeWidget_setupBaseline_itemEntered(QTreeWidgetItem *item, int column);
void on_comboBox_setupBaseline_currentTextChanged(const QString &arg1);
void setupStationAxisBufferAddRow();
void on_pushButton_16_clicked();
void on_treeView_allAvailabeSources_clicked(const QModelIndex &index);
void on_treeView_allSelectedSources_clicked(const QModelIndex &index);
void on_pushButton_13_clicked();
void on_pushButton_15_clicked();
void on_treeView_allAvailabeSources_entered(const QModelIndex &index);
void on_treeView_allSelectedSources_entered(const QModelIndex &index);
void on_pushButton_18_clicked();
void on_pushButton_19_clicked();
void on_actionNew_triggered();
void on_comboBox_sourceSettingMember_currentTextChanged(const QString &arg1);
void on_comboBox_baselineSettingMember_currentTextChanged(const QString &arg1);
void on_ComboBox_parameterSource_currentTextChanged(const QString &arg1);
void on_ComboBox_parameterBaseline_currentTextChanged(const QString &arg1);
QString on_actionSave_triggered();
void on_pushButton_5_clicked();
void on_pushButton_6_clicked();
void on_pushButton_17_clicked();
void on_pushButton_saveCatalogPathes_clicked();
void on_pushButton_26_clicked();
void changeDefaultSettings(QStringList path, QStringList value, QString name);
void on_pushButton_23_clicked();
void on_pushButton_22_clicked();
void createDefaultParameterSettings();
void on_pushButton_saveNetwork_clicked();
void on_pushButton_loadNetwork_clicked();
void on_pushButton_saveSourceList_clicked();
void on_pushButton_loadSourceList_clicked();
void on_pushButton_saveMode_clicked();
void on_pushButton_loadMode_clicked();
void clearGroup(bool sta, bool src, bool bl, QString name);
void clearSetup(bool sta, bool src, bool bl);
void splitterMoved();
void faqSearch();
void on_actionFAQ_triggered();
void on_actionRun_triggered();
void processFinished();
void networkSizeChanged();
void sourceListChanged();
void baselineListChanged();
void on_actionsummary_triggered();
void setupSkyCoverageTemplatePlot();
void skyCoverageTemplate();
void on_pushButton_skyCoverageTemplateRandom_clicked();
void on_influenceTimeSpinBox_valueChanged(int arg1);
void on_actionConditions_triggered();
void on_pushButton_addCondition_clicked();
void on_pushButton_removeCondition_clicked();
void on_lineEdit_allStationsFilter_3_textChanged(const QString &arg1);
void on_actionNetwork_triggered();
void on_actionSource_List_triggered();
void on_dateTimeEdit_sessionStart_dateChanged(const QDate &date);
void on_spinBox_doy_valueChanged(int arg1);
void on_pushButton_clicked();
void markerWorldmap();
void markerSkymap();
void on_radioButton_imageSkymap_toggled(bool checked);
void on_radioButton_imageWorldmap_toggled(bool checked);
void on_checkBox_showEcliptic_clicked(bool checked);
void baselineHovered(QPointF point ,bool flag);
void on_treeView_allSelectedBaselines_entered(const QModelIndex &index);
void on_checkBox_showBaselines_clicked(bool checked);
void on_pushButton_7_clicked();
void on_pushButton_8_clicked();
void on_pushButton_9_clicked();
void on_pushButton_10_clicked();
void on_pushButton_12_clicked();
void on_pushButton_parameterStation_edit_clicked();
void on_pushButton_parameterSource_edit_clicked();
void on_pushButton_parameterBaseline_edit_clicked();
void on_spinBox_maxNumberOfIterations_valueChanged(int arg1);
void on_experimentNameLineEdit_textChanged(const QString &arg1);
void on_pushButton_41_clicked();
void on_pushButton_addHighImpactAzEl_clicked();
void on_pushButton_removeHighImpactAzEl_clicked();
void on_pushButton_readLogFile_read_clicked();
void on_pushButton_readSkdFile_read_clicked();
void on_actionLog_parser_triggered();
void on_actionSkd_Parser_triggered();
void on_actionAbout_Qt_triggered();
void on_pushButton_sessionBrowse_clicked();
void on_pushButton_sessionAnalyser_clicked();
void on_comboBox_log_file_currentIndexChanged(const QString &arg1);
void on_comboBox_log_console_currentIndexChanged(const QString &arg1);
void on_pushButton_stations_clicked();
void on_pushButton_reloadsources_clicked();
void on_pushButton_reloadcatalogs_clicked();
void on_actionOpen_triggered();
void addSetup(QTreeWidget *tree, const boost::property_tree::ptree &ptree, QComboBox *cmember,
QComboBox *cpara, QDateTimeEdit *dte_start, QDateTimeEdit *dte_end, QComboBox *trans,
QPushButton *add);
void gbps();
void on_pushButton_modeCustomAddBAnd_clicked();
void on_pushButton_browseExecutable_clicked();
void on_pushButton_howAreSkedCatalogsLinked_clicked();
void on_actionCurrent_Release_triggered();
void on_actionAbout_triggered();
void on_pushButton_2_clicked();
void on_groupBox_modeAdvanced_toggled(bool arg1);
void on_pushButton_startAdvancedMode_clicked();
void changeObservingModeSelection(int idx);
void on_pushButton_loadAdvancedMode_clicked();
void on_pushButton_saveAdvancedMode_clicked();
void on_pushButton_changeCurrentAdvancedMode_clicked();
void on_pushButton_20_clicked();
void on_checkBox_outputNGSFile_stateChanged(int arg1);
void on_pushButton_parse_clicked();
void on_pushButton_outputNgsFild_clicked();
void on_pushButton_outputSnrTable_2_clicked();
void on_pushButton_outputSnrTable_clicked();
void on_pushButton_contact_add_clicked();
void on_pushButton_contact_save_clicked();
void on_pushButton_contactlist_save_clicked();
void on_pushButton_21_clicked();
void on_pushButton_contact_load_clicked();
void on_pushButton_autoSetupIntensive_weightFactor_clicked();
void on_pushButton_autoSetupIntensive_minStations_clicked();
void on_pushButton_autoSetupIntensive_maxScan120_clicked();
void on_pushButton_autoSetupIntensive_masScan200_clicked();
void on_pushButton_minTimeBetweenScans_clicked();
void on_pushButton_mulitScheduling_clicked();
void on_groupBox_34_toggled(bool arg1);
void on_groupBox_35_toggled(bool arg1);
void on_groupBox_scanSequence_toggled(bool arg1);
void on_groupBox_CalibratorBlock_toggled(bool arg1);
void on_pushButton_autoSetupIntensive_masScan300_clicked();
void masterDownloadFinished();
void downloadFinished();
void on_sampleBitsSpinBox_valueChanged(int arg1);
void on_pushButton_viewNext_clicked();
void on_pushButton_24_clicked();
void on_pushButton_parseDownTime_clicked();
void on_groupBox_highImpactAzEl_toggled(bool arg1);
void on_checkBox_calibration_sessionStart_toggled(bool checked);
void on_checkBox_calibration_sessionEnd_toggled(bool checked);
void on_checkBox_calibration_sessionMid_toggled(bool checked);
void on_spinBox_NCalibrationBlocks_valueChanged(int arg1);
void on_pushButton_11_clicked();
void on_actionadvanced_triggered();
void updateWeightFactorSliders();
void updateWeightFactorValue();
void on_actionSimulator_triggered();
void on_pushButton_simulator_save_clicked();
void on_pushButton_simulator_load_clicked();
void saveMultiCoreSetup();
private:
Ui::MainWindow *ui;
QString mainPath;
boost::property_tree::ptree settings_;
boost::optional<VieVS::ObservingMode> advancedObservingMode_;
VieVS::ParameterSettings para;
QStandardItemModel *allStationModel;
QStandardItemModel *allSourceModel;
MultiColumnSortFilterProxyModel *allStationProxyModel;
MultiColumnSortFilterProxyModel *allSourceProxyModel;
QStandardItemModel *selectedStationModel;
QStandardItemModel *selectedSourceModel;
QStandardItemModel *selectedBaselineModel;
bool createBaselines;
QStandardItemModel *allSourcePlusGroupModel;
QStandardItemModel *allStationPlusGroupModel;
QStandardItemModel *allBaselinePlusGroupModel;
QStringListModel *allSkedModesModel;
VieVS::SkdCatalogReader skdCatalogReader;
ChartView *worldmap;
ChartView *skymap;
QChartView *setupStation;
QChartView *setupSource;
QChartView *setupBaseline;
QChartView *skyCoverageTemplateView;
bool plotSkyCoverageTemplate;
QScatterSeries *availableStations;
QScatterSeries *selectedStations;
QScatterSeries *availableSources;
QScatterSeries *selectedSources;
Callout *worldMapCallout;
Callout *skyMapCallout;
Callout *stationSetupCallout;
Callout *sourceSetupCallout;
Callout *baselineSetupCallout;
QVector<double> obsAz;
QVector<double> obsEl;
QVector<int> obsTime;
QSignalMapper *deleteModeMapper;
bool setupChanged;
boost::property_tree::ptree setupStation_;
boost::property_tree::ptree setupSource_;
boost::property_tree::ptree setupBaseline_;
VieVS::ParameterSetup setupStationTree;
VieVS::ParameterSetup setupSourceTree;
VieVS::ParameterSetup setupBaselineTree;
std::map<std::string, std::vector<std::string>> *groupSta = new std::map<std::string, std::vector<std::string>>();
std::map<std::string, std::vector<std::string>> *groupSrc = new std::map<std::string, std::vector<std::string>>();
std::map<std::string, std::vector<std::string>> *groupBl = new std::map<std::string, std::vector<std::string>>();
std::map<std::string, VieVS::ParameterSettings::ParametersStations> paraSta;
std::map<std::string, VieVS::ParameterSettings::ParametersSources> paraSrc;
std::map<std::string, VieVS::ParameterSettings::ParametersBaselines> paraBl;
Statistics *statistics;
boost::optional<VieVS::Scheduler> parsedSchedule;
std::map<std::string, std::vector<double>> parsedFreq;
void readSkedCatalogs();
void readStations();
void readSources();
void readAllSkedObsModes();
void plotWorldMap();
void plotSkyMap();
void defaultParameters();
bool eventFilter(QObject *watched, QEvent *event);
void displayStationSetupMember(QString name);
void displaySourceSetupMember(QString name);
void displayBaselineSetupMember(QString name);
void displayStationSetupParameter(QString name);
void displaySourceSetupParameter(QString name);
void displayBaselineSetupParameter(QString name);
void displaySetupCallout(QPointF,bool);
int plotParameter(QChart* targetChart, QTreeWidgetItem *item, int level, int plot, QString target, const std::map<std::string, std::vector<std::string> > &map);
double interpolate( QVector<double> &xData, QVector<double> &yData, double x, bool extrapolate=false );
void updateAdvancedObservingMode();
DownloadManager *downloadManager = new DownloadManager();
void download();
// void searchSessionCodeInMasterFile(QString code);
};
#endif // MAINWINDOW_H