-
Notifications
You must be signed in to change notification settings - Fork 8
/
mainwindow.h
141 lines (123 loc) · 3.53 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
/*
* CLASS
* Copyright (c) 2010-2013 Meteorology and Air Quality section, Wageningen University and Research centre
* Copyright (c) 2011-2013 Jordi Vila-Guerau de Arellano
* Copyright (c) 2011-2013 Chiel van Heerwaarden
* Copyright (c) 2011-2013 Bart van Stratum
* Copyright (c) 2011-2013 Kees van den Dries
*
* This file is part of CLASS
*
* CLASS 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.
* CLASS 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 CLASS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QModelIndex>
#include "modelrun.h"
#include "landsoil.h"
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
#include <QtGui/QMainWindow>
#else
#include <QtWidgets/QMainWindow>
#endif
class plotwindow;
namespace Ui
{
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
QMap<int, modelrun> *modelrunlist; // List containing objects with model output
QList<int> *selectedruns;
QList<plotwindow*> plotwindowList;
//void updateRunList();
void createrun();
void showGraph(QMap<int, modelrun> *, QList<int> *);
plotwindow *graph;
modelinput defaultinput; // Store default model input settings
modelinput formvalues;
Reaction defaultreactions[28];
void loadfieldslots();
//int numgraphs;
public slots:
void newrun();
void clonerun();
void deleteRun();
void runTreeChanged(); // Disable input field when selection runs > 1
void runTreePressed(QModelIndex);
void updateRunName(QString);
void startrun();
void canceledit();
void startGraph();
void saveRuns();
void loadRuns();
void exportRuns();
void resetInterface();
void updateSurfacetype(int);
void updateSoiltype(int);
void tabChanged(int);
void speciesselectionchanged();
void setNoReactions();
void setSimpleReactions();
void setComplexReactions();
void graphClosed(plotwindow*);
void showAbout();
void closeWarning();
void setLandSoil(int);
// Switches
void switch_wind(int);
void switch_sl(int);
void switch_ls(int);
void switch_sea(int);
void switch_rad(int);
void switch_ml(int);
void switch_cu(int);
void switch_curad(int);
void switch_wtheta(int);
void switch_wq(int);
void switch_soil_advanced(int);
void switch_surface_advanced(int);
void switch_chem(int);
void switch_chem_constant(int);
void switch_photolysis(int);
signals:
void rundeleted(int);
void runadded(int);
private:
Ui::MainWindow *ui;
QString casename;
QString defaultname;
void readdefaultinput();
void updateSelectedRuns();
void storeFormData();
void loadFormData();
QString bool2string(const bool);
void updateStatusBar();
bool CheckState2bool(Qt::CheckState);
Qt::CheckState Bool2CheckState(bool);
int Bool2Int(bool);
void setReactions(int);
bool closeCheck;
void initLandSoil();
void closeEvent(QCloseEvent *event);
void blockInput(bool);
surfacetype surfacetypes[4];
soiltype soiltypes[3];
int activerun;
int activetab;
int activespecies;
};
#endif // MAINWINDOW_H