forked from PauloCarvalhoRJ/gammaray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
203 lines (184 loc) · 6.05 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class QAction;
class QMenu;
class File; //GammaRay API
class Attribute; //GammaRay API
class CartesianGrid;
class PointSet;
class VariogramModel;
class UnivariateCategoryClassification;
class MainWindow : public QMainWindow
{
Q_OBJECT
friend class Application;
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
/** Updates UI with current application state. */
void displayApplicationInfo();
/** Prints messages with the given style to the message text box.
* Supported styles: information, warning, error. A wrong or empty style alias defaults to error.
*/
void log_message( const QString message, const QString style );
/**
* Adds the data file given its path to the project.
* Assumes there is an open project.
*/
void doAddDataFile( const QString filePath );
//QMainWindow interface
public:
void dragEnterEvent( QDragEnterEvent *e );
void dropEvent( QDropEvent *e );
public slots:
void showAbout();
void showSetup();
void newProject();
void closeProject();
void openRecentProject();
void openKriging();
void openIKContinuous();
void openIKCategorical();
void showMessagesConsoleCustomContextMenu(const QPoint &pt);
void openIKPostProcessing();
void openCokriging();
void openImageJockey();
void openSGSIM();
void openCokrigingNewcokb3d();
private:
Ui::MainWindow *ui;
//this is called upon quiting.
void closeEvent(QCloseEvent *);
//the most recently used project actions
//to make MRU menu in File menu
enum { MaxRecentProjects = 10};
QAction *_MRUactions[ MaxRecentProjects ];
//opens the given project (directory path)
void openProject( const QString path );
//updates the MRU project list. The given project is the most recently opened.
void setCurrentMRU( const QString path );
//returns the directory name (without the path)
//the directory name is considered the project name
QString strippedName(const QString &fullDirPath);
//update MRU menus according to the saved list
//of recently opened projects in OS registry
void updateRecentProjectActions();
//saves project tree UI state
void saveProjectTreeUIState();
//restores project tree UI state
void restoreProjectTreeUIState();
//restores project tree UI state
void restoreProjectTreeUIState2();
//updates project tree style sheet (updates visualization)
//must be called upon changes in project objects hierarchy
void refreshTreeStyle();
//project tree context menu
QMenu *_projectContextMenu;
//project header context menu
QMenu *_projectHeaderContextMenu;
//pointer to right clicked file (set in onProjectContextMenu() slot)
File *_right_clicked_file;
//pointer to right clicked attribute (set in onProjectContextMenu() slot)
Attribute *_right_clicked_attribute;
//pointer to the second right clicked attribute (set in onProjectContextMenu() slot)
Attribute *_right_clicked_attribute2;
//pointer to right clicked Cartesian Grid (set in onProjectContextMenu() slot)
CartesianGrid* _right_clicked_cartesian_grid;
//pointer to right clicked Point Set (set in onProjectContextMenu() slot)
PointSet* _right_clicked_point_set;
private slots:
void onProjectContextMenu(const QPoint &mouse_location);
void onProjectHeaderContextMenu(const QPoint &mouse_location);
void onAddDataFile();
void onRemoveFile();
void onRemoveAndDeleteFile();
void onSeeMetadata();
void onHistogram();
void onLocMap();
void onXPlot();
void onPixelPlt();
void onProbPlt();
void onQpplt();
void onSeeProjectPath();
void onOpenProjectPath();
void onVariogramAnalysis();
void onDecluster();
void onSetNDV();
void onGetPoints( );
void onNScore();
void onDisplayPlot();
void onDisplayExperimentalVariogram();
void onFitVModelToExperimentalVariogram();
void onDisplayVariogramModel();
void onCreateVariogramModel();
void onCreateGrid();
void onCleanTmpFiles();
void onAddCoord();
void onDistrModel();
void onBidistrModel();
void onCreateThresholdCDF();
void onEdit();
void onCreateCategoryPDF();
void onCreateCategoryDefinition();
void onClassifyInto();
void onPerformClassifyInto();
void onLookForDuplicates();
void onEditWithExternalProgram();
void onClearMessages();
void onClassifyWith();
void onMapAs();
void onSoftIndicatorCalib();
void onFreeLoadedData();
void onFFT();
void onNDVEstimation();
void onResampleGrid();
void onMultiVariogram();
void onHistpltsim();
void onRFFT();
void onUpdateStatusBar();
void onMachineLearning();
private:
/**
* This method is used to create (vm == nullptr) or review (vm != nullptr)
* an existing variogram model.
*/
void createOrReviewVariogramModel( VariogramModel* vm );
/**
* Returns a list of attributes selected by the user.
* If none was selected, returns an empty list.
*/
QList<Attribute*> getSelectedAttributes();
/**
* The pointer to the dynamic sub-menu "Classify into" of the project tree context menu.
*/
QMenu* m_subMenuClassifyInto;
/**
* Creates the dynamic items of sub-menu "Classify into".
*/
void makeMenuClassifyInto();
/**
* The pointer to the categorical classification defined by the user upon calling onClassifyInto().
*/
UnivariateCategoryClassification *m_ucc;
/**
* The pointer to the dynamic sub-menu "Classify with" of the project tree context menu.
*/
QMenu* m_subMenuClassifyWith;
/**
* Creates the dynamic items of sub-menu "Classify with".
*/
void makeMenuClassifyWith();
/**
* The pointer to the dynamic sub-menu "Map as" of the project tree context menu.
*/
QMenu* m_subMenuMapAs;
/**
* Creates the dynamic items of sub-menu "Map as".
*/
void makeMenuMapAs();
};
#endif // MAINWINDOW_H