30 #include <QMainWindow> 37 #include <QMapControl/Point.h> 52 class PointWorldCoord;
80 static constexpr
int MAX_MODELS = 5;
83 static constexpr
int ModelIdxEditor = MAX_MODELS-1;
84 static constexpr
int ModelIdxSimulator = 0;
92 void simulatorLogging(QString);
93 void simulationEnded(
int exitcode);
94 void simulatorProcessStateChanged (QProcess::ProcessState oldstate, QProcess::ProcessState newstate);
95 void simulatorProcessStepChanged (
int step);
96 void simulatorNodeStatsUpdate(QString);
97 void simulatorDebugMemoryStats(
long,
long);
98 void simulatorCaptureLine(QString);
100 void vesselMoved (
int step,
int idx,
float x,
float y,
float course,
float fuel,
int state);
101 void shipMoved (
int step,
int idx,
float x,
float y,
float course);
102 void updateModelState();
103 void updateOutputFile (QString,
int);
104 void outputUpdated();
105 void mapFocusPointChanged(PointWorldCoord);
106 void mapMousePress(QMouseEvent*,PointWorldCoord);
107 void mapMouseRelease(QMouseEvent*,PointWorldCoord,PointWorldCoord);
108 void mapMouseMove(QMouseEvent*,PointWorldCoord,PointWorldCoord);
109 void showMessage(
const QString &);
110 void abortMouseMode ();
111 void completeMouseMode();
112 void simulatorSqlStorageChanged(QString path);
114 void showWarningMessageBox(QString,QString);
115 void edgeSelectionsChanged(
int);
116 void treeViewContextMenuRequested(QPoint);
118 void errorImportingStatsFile(QString);
120 void playTimerTimeout();
121 void memoryTimerTimeout();
126 void editorAddNode(QPointF);
127 void editorAddEdge(
int from,
int to);
131 void on_action_Load_triggered();
132 void on_modelSelector_currentIndexChanged(
int index);
133 void on_cmdStart_clicked();
134 void on_cmdStop_clicked();
135 void on_actionScenario_triggered();
136 void on_treeView_doubleClicked(
const QModelIndex &index);
137 void on_saveConsoleButton_clicked();
138 void on_cmdSetup_clicked();
139 void on_actionLoad_results_triggered();
140 void on_play_step_valueChanged(
int step);
141 void on_play_fwd_clicked();
142 void on_play_bk_clicked();
143 void on_play_fbk_clicked();
144 void on_play_ffwd_clicked();
145 void on_play_first_clicked();
146 void on_play_last_clicked();
147 void on_play_auto_clicked();
148 void on_actionPalettes_triggered();
149 void on_actionPalettes0to1_triggered();
150 void on_popStatSelector_currentIndexChanged(
int index);
151 void on_nationsStatsSelector_currentIndexChanged(
int index);
152 void on_vesselsStatsSelector_currentIndexChanged(
int index);
153 void on_harbStatSelector_currentIndexChanged(
int index);
154 void on_actionPopulations_triggered();
155 void on_actionTariffs_triggered();
156 void on_actionBathymetry_triggered();
157 void on_actionShippingDensity_triggered();
158 void on_actionSiltFraction_triggered();
159 void on_actionSalinity_triggered();
160 void on_actionSST_triggered();
161 void on_actionWind_triggered();
162 void on_actionNitrogen_triggered();
163 void on_actionPhosphorus_triggered();
164 void on_actionOxygen_triggered();
165 void on_actionDissolvedCarbon_triggered();
166 void on_actionConfiguration_triggered();
167 void on_play_params_clicked();
168 void on_actionQuit_triggered();
169 void on_actionImport_Shapefile_triggered();
170 void on_actionGraph_toggled(
bool arg1);
171 void on_actionEdge_Edit_toggled(
bool arg1);
172 void on_actionDelete_triggered();
173 void on_actionNode_Editor_toggled(
bool arg1);
174 void on_actionClear_Graph_triggered();
175 void on_actionCreate_Graph_triggered();
176 void on_actionExport_Graph_triggered();
177 void on_actionLoad_Harbours_triggered();
178 void on_actionLink_Shortest_Path_Folder_triggered();
179 void on_actionCreate_Shortest_Path_triggered();
180 void on_actionAdd_Penalty_on_Polygon_triggered();
181 void on_actionAdd_Penalty_from_File_triggered();
182 void on_actionLoad_Graph_triggered();
183 void on_actionSave_Graph_triggered();
184 void on_actionLink_Harbours_to_Graph_triggered();
185 void on_actionAdd_triggered();
186 void on_actionAbort_Operation_triggered();
187 void on_actionAbout_displace_triggered();
188 void on_cmdProfileEnable_toggled(
bool checked);
189 void on_cmdProfileSave_clicked();
190 void on_actionCSV_Editor_triggered();
191 void on_actionMergeWeights_triggered();
192 void on_actionMergePings_triggered();
193 void on_actionExport_Map_triggered();
194 void on_actionExport_Harbours_triggered();
195 void on_actionExport_Populations_triggered();
196 void on_actionExport_Nations_triggered();
197 void on_actionAssign_Landscape_codes_triggered();
198 void on_actionAssign_Wind_triggered();
199 void on_actionAssign_SST_triggered();
200 void on_actionAssign_Salinity_triggered();
201 void on_actionAssign_Nitrogen_triggered();
202 void on_actionAssign_Phosphorus_triggered();
203 void on_actionAssign_Oxygen_triggered();
204 void on_actionAssign_DissolvedCarbon_triggered();
205 void on_actionAssign_Total_benthos_biomass_triggered();
206 void on_actionAssign_Total_benthos_number_triggered();
207 void on_actionAssign_Area_codes_triggered();
208 void on_actionCalcPopDistribution_triggered();
209 void on_actionLoadStockNames_triggered();
210 void on_actionDecision_Trees_Editor_triggered();
211 void on_actionCheck_for_isolated_subgraphs_triggered();
212 void on_actionRemove_isolated_subgraphs_triggered();
214 void on_actionR_Console_triggered();
216 void on_actionTime_Series_Editor_triggered();
217 void on_actionVessel_Creation_Editor_triggered();
219 void on_actionScheduler_Editor_triggered();
221 void on_actionExportAllGraphics_triggered();
223 void on_metierStatSelector_currentIndexChanged(
int index);
225 void on_actionShortest_Path_to_Binary_triggered();
227 void on_action_Record_Current_Map_Position_triggered();
229 void on_actionClear_configuration_triggered();
231 void on_actionSet_Node_Symbol_Size_triggered();
233 void on_benthosStatSelector_currentIndexChanged(
int index);
235 void on_fishfarmsStatSelector_currentIndexChanged(
int index);
237 void on_windfarmsStatSelector_currentIndexChanged(
int index);
239 void on_shipsStatSelector_currentIndexChanged(
int index);
242 void end_ShortestPathCreated(
bool);
245 void modelStateChanged();
248 bool loadLiveModel(QString path, QString *error,
int model_idx = 0);
250 void graphCreated(
const QList<GraphBuilder::Node> &
nodes);
251 void addPenaltyPolygon (
const QList<QPointF> &points);
254 void updateModelList();
255 void updateAllDisplayObjects();
256 void updateCalendarDisplay(
int tstep);
257 void closeEvent ( QCloseEvent * event );
259 void centerMap(
const qmapcontrol::PointWorldCoord &pt);
260 void centerMapOnHarbourId (
int id);
261 void centerMapOnNodeId (
int id);
262 void centerMapOnVesselId (
int id);
263 void centerMapOnFirmId (
int id);
264 void centerMapOnShipId (
int id);
265 void centerMapOnFishfarmId(
int id);
266 void centerMapOnWindmillId(
int id);
270 int newEditorModel(QString name);
274 QProcess *prepareAppExecutableStart(QString exename);
276 void endMouseMode (
bool success =
true);
278 bool isEditorModel();
280 void openScenarioDialog(QString suggestedPath,
bool askForReload,
bool forceRename);
281 void exportGraphics(QString label, QWidget *widget);
284 void assignCodesFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
285 void assignWindFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
286 void assignSSTFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
287 void assignSalinityFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
288 void assignNitrogenFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
289 void assignPhosphorusFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
290 void assignOxygenFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
291 void assignDissolvedCarbonFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
292 void assignBenthosBiomassFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
293 void assignBenthosNumberFromShapefileGen(QString title, QString shp,
const char *
const fieldname, std::function<
void(OGRGeometry *,
int)> func);
300 std::shared_ptr<DisplaceModel> models[MAX_MODELS];
301 std::shared_ptr<DisplaceModel> currentModel;
308 qmapcontrol::QMapControl *map;
314 int mPlayTimerInterval;
315 QTimer mMemoryWatchTimer;
317 QLabel *mMemInfoLabel;
318 QLabel *mMouseModeInfoLabel;
319 QLabel *mCoordinatesInfoLabel;
320 QLabel *mStatusInfoLabel;
322 QString mLastRunSimulationName;
323 QString mLastRunDatabase;
330 static const QString dbSuffix;
331 static const QString dbFilter;
332 static const QString dbLastDirKey;
333 static const int maxModels;
334 static const int playTimerDefault;
335 static const int playTimerRates[];
338 #endif // MAINWINDOW_H Definition: graphexportproperties.h:10
Definition: datamerger.h:16
PaletteRole
Definition: palettemanager.h:54
Definition: decisiontreemanager.h:13
Definition: dteditorwindow.h:32
vector< Node * > nodes
Definition: main.cpp:270
Definition: mousemode.h:48
int tstep
Definition: main.cpp:205
An ongoing simulation process.
Definition: simulator.h:57
The MouseMode class.
Definition: mousemode.h:61
Definition: statscontroller.h:45
Definition: backgroundworker.h:82
Definition: objecttreemodel.h:39
Definition: displacemodel.h:71
Definition: mainwindow.h:56
StatType
Definition: statscontroller.h:63
Definition: waitdialog.h:56
Definition: mapobjectscontroller.h:91
Definition: memoryinfo.h:30
Definition: ui_mainwindow.h:1357
Definition: mainwindow.h:75
Definition: backgroundworker.h:49
Definition: csvspecspage.h:20