-
Notifications
You must be signed in to change notification settings - Fork 15
/
mainwindow.h
382 lines (351 loc) · 12.2 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <map>
namespace Ui {
class MainWindow;
}
namespace spectral {
struct array;
}
class QAction;
class QMenu;
class File; //GammaRay API
class Attribute; //GammaRay API
class CartesianGrid;
class PointSet;
class VariogramModel;
class UnivariateCategoryClassification;
class SVDFactor;
class IJAbstractCartesianGrid;
class GeoGrid;
class DataFile;
class VerticalTransiogramModel;
class VerticalProportionCurve;
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();
void openTransiography();
void openTransiographyBayesian();
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 a right clicked 2nd file (set in onProjectContextMenu() slot)
File *_right_clicked_file2;
//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;
//saves the right clicked attribute in the last call to onSVD() slot.
Attribute *_right_clicked_attribute_onSVD;
//pointer to right clicked GeoGrid (set in onProjectContextMenu() slot)
GeoGrid* _right_clicked_geo_grid;
//pointer to right clicked DataFile (set in onProjectContextMenu() slot)
DataFile* _right_clicked_data_file;
//pointer to right clicked VerticalProportionCurve (set in onProjectContextMenu() slot)
VerticalProportionCurve* _right_clicked_VPC;
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 onDisplayObject();
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 onFilterBy();
void onMapAs();
void onSoftIndicatorCalib();
void onFreeLoadedData();
void onFFT();
void onNDVEstimation();
void onResampleGrid();
void onAddRandomPhaseForFFT();
void onMultiVariogram();
void onHistpltsim();
void onRFFT();
void onUpdateStatusBar();
void onRunStuffInUnattendedMode();
void onMachineLearning();
void onDeleteVariable();
void onPreviewRFFTImageJockey(CartesianGrid *cgWithFFT,
int indexOfVariableWithAmplitudes,
int indexOfVariableWithPhases);
void onSavePreviewRFFTImageJockey( const SVDFactor* previewGrid );
void onSVD();
void onSumOfFactorsWasComputed(spectral::array *sumOfFactors); //called to save the sum of SVD factors in the dialog called in onSVD()
void onCalculator();
void onNewAttribute();
void onQuickView();
void onProjectGrids();
void onQuickViewerClosed( SVDFactor* factor, bool wasChanged );
void onCovarianceMap();
void onVarigraphicDecomposition();
void onInfo( QString message );
void onWarning( QString message );
void onError( QString message );
void onSaveArrayAsNewVariableInCartesianGrid(spectral::array* array,
IJAbstractCartesianGrid* gridWithGridSpecs );
void onFactorialKriging();
void onCreateGeoGridFromBaseAndTop();
void onUnfold();
void onSISIMContinuous();
void onSISIMCategorical();
void onGeoGridCellVolumes();
void onEMD();
void onGabor();
void onWavelet();
void onSaveDWTTransform(const QString name,
const spectral::array& DWTtransform,
const spectral::array &scaleField,
const spectral::array &orientationField );
void onRequestGrid( const QString name, IJAbstractCartesianGrid*& pointer );
void onAutoVarFit();
void onConvertFaciesNamesToCodes();
void onCategorize();
void onAddFaciesTransitionMatrix();
void onSetCategoryDefinitionOfAFasciesTransitionMatrix();
void onEntropyCyclicityAnalysis();
void onFaciesRelationShipDiagram();
void onCreateGeoGridMultiZone();
void onTransferProperty();
void onMCRFSim();
void onDataImputationWithMCMC();
void onSegmentLengths();
void onLVADataSet();
void onFlipEastWest();
void onFlipNorthSouth();
void onFlipTopBottom();
void onExtractMidPoints();
void onMakeFaciesTransitionMatrix();
void onCreateVerticalProportionCurve();
void onFilterMean();
void onFilterMedian();
void onFilterGaussian();
void onAddSection();
void onExtractSectionCentroids();
void onPopulateGridWithProportions();
void onGeoGridExportAsGRDECL();
void onExtractRegularSteps();
void onCreateGridSameGridSpecs();
void onMakeSummationTo1();
void onDuplicateFile();
void onNDVEstimationShepard();
void onNDVEstimationThinPlateSpline();
void onMapRidgesOrValleys();
void onSkeletonize();
void onExtractSubgrid();
void onExportToGRD();
void onMCRFBayesianSim();
void onReviewTransiogramBand();
void onRepositionGrid();
void onPerformContactAnaysis();
void onPerformDriftAnalysis();
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 "Filter by" of the project tree context menu.
*/
QMenu* m_subMenuFilterBy;
/**
* Creates the dynamic items of sub-menu "Filter by".
*/
void makeMenuFilterBy();
/**
* The pointer to the dynamic sub-menu "Make categorical as" of the project tree context menu.
*/
QMenu* m_subMenuCategorize;
/**
* Creates the dynamic items of sub-menu "Make categorical as".
*/
void makeMenuCategorize();
/**
* The pointer to the dynamic sub-menu "Map as" of the project tree context menu.
*/
QMenu* m_subMenuMapAs;
/**
* The pointer to the sub-menu "Flip Data" of the project tree context menu.
*/
QMenu* m_subMenuFlipData;
/**
* Creates the items of sub-menu "Flip data".
*/
void makeMenuFlipData();
/**
* The pointer to the sub-menu "Moving window filters" of the project tree context menu.
*/
QMenu* m_subMenuMovingWindowFilters;
/**
* Creates the items of sub-menu "Moving window filters".
*/
void makeMenuMovingWindowFilters();
/**
* The pointer to the sub-menu "Data transforms" of the project tree context menu.
*/
QMenu* m_subMenuDataTransforms;
/**
* Creates the items of sub-menu "Data transforms".
*/
void makeMenuDataTransforms();
/**
* The pointer to the sub-menu "NDV estimation" of the project tree context menu.
*/
QMenu* m_subMenuNDVestimation;
/**
* Creates the items of sub-menu "NDV estimation".
*/
void makeMenuNDVestimation();
/**
* Lists the attributes currently being viewed in the quick view dialog.
*/
std::map< SVDFactor*, Attribute* > m_attributesCurrentlyBeingViewed;
/**
* Creates the dynamic items of sub-menu "Map as".
*/
void makeMenuMapAs();
/**
* This method is used to create (vtm == nullptr) or review (vtm != nullptr)
* an existing vertical transiogram model.
*/
void createOrReviewVerticalTransiogramModel( VerticalTransiogramModel* vtm );
/**
* This method is used to create (vtm1/2 == nullptr) or review (vtm1/2 != nullptr)
* two existing vertical transiogram models as a band of uncertainty.
*/
void createOrReviewVerticalTransiogramModelBand( VerticalTransiogramModel* vtm1,
VerticalTransiogramModel* vtm2 );
/**
* This method is used to create (vtm == nullptr) or review (vtm != nullptr)
* an existing vertical proportion curve.
*/
void createOrReviewVerticalProportionCurve( VerticalProportionCurve* vpc );
};
#endif // MAINWINDOW_H