|
FFSM++
1.1.0
French Forest Sector Model ++
|
Main GUI interface. More...
#include <MainWindow.h>


Public Slots | |
| void | setUnsavedStatus (bool unsavedStatus_h) |
Signals | |
| void | currentModelFilenameChanged (QString) |
| void | selectedScenarioName (const QString &scenarioName_h) |
| void | resized () |
Public Member Functions | |
| MainWindow () | |
| Constructor. More... | |
| void | setCurrentLogFileName (const QString &fileName) |
| void | setCurrentModelFileName (const QString &fileName) |
| bool | saveLogFile (const QString &logFileName) |
| QString | strippedName (const QString &fullFileName) |
| QString | getModelFileName () |
| void | setModelFileName (const QString curModelFileName_h) |
| void | setOutputDirName (string outputDirName_h) |
| void | addLayer (QString layerName_h, QString layerLabel_h) |
| void | switchToLayer (QString layerName_h) |
| void | updatePixel (QString layerName_h, int x_h, int y_h, QColor color_h) |
| void | updateImage (QString layerName_h, const QImage &image_h) |
| void | switchToLayerFromLayerSelector (int layerIndex_h) |
| void | treeViewerItemChangeValue (string itemID, string newValue) |
| Change value to an existing item in the Status Viewer. More... | |
| void | treeViewerItemRemove (string itemID) |
| void | treeViewerAddItem (string text, string itemID, string parentID) |
| e.g. manager_farmer_manager agents or agent_12345_ownedHa More... | |
| void | processLogArea (const QString &message_h) |
| void | resetGUIForNewSimulation () |
| Reset the graphical elements for a new simulation // Send the request of getting the pixel info to the main thread. More... | |
| void | receiveScenarioOptions (const QVector< QString > &scenarios_h) |
Protected Member Functions | |
| void | closeEvent (QCloseEvent *event) |
| Manage the event of closing the application. More... | |
| void | resizeEvent (QResizeEvent *event) |
| Manage the event of resizing the application. More... | |
Private Types | |
| enum | { MaxRecentFiles = 5 } |
Private Slots | |
| void | open () |
| bool | save () |
| bool | saveAs () |
| void | startModelMainThread () |
| void | stopModelMainThread () |
| void | pauseOrResumeModelMainThread () |
| void | openRecentFile () |
| void | hideDebugMsgs (bool hide) |
| void | about () |
| void | showDocumentation () |
| void | openResults () |
Private Member Functions | |
| void | createStatusBar () |
| bool | okToContinue () |
| void | readSettings () |
| void | writeSettings () |
| void | updateRecentFileActions () |
Private Attributes | |
| ThreadManager | modelMainThread |
| QLabel * | yearSBLabel |
| Status bar current year label. More... | |
| QLabel * | mainSBLabel |
| Status bar main label. More... | |
| bool | unsavedStatus |
| QString | outputDirName |
| QString | curLogFileName |
| QString | curModelFileName |
| QString | curBaseDirectory |
| QStringList | recentFiles |
| QAction * | recentFileActions [MaxRecentFiles] |
| QAction * | separatorAction |
| bool | debugMsgsEnable |
| Allow debug messages to be show in the logArea. More... | |
| ScenarioSelectionWidget * | scenarioWidget |
| map< string, QTreeWidgetItem * > | svIndex |
| Map containing the ID and the pointers to the status viewer. More... | |
Main GUI interface.
MainWindow derive from both the generic Qt QMainWindow and from Ui::MainWindow (the latter being the autmatically generated C++ code from QtDesigner).
It implements code and functionality that can not be done in the QtDesigner.
Definition at line 50 of file MainWindow.h.
|
private |
| MainWindow | ( | ) |
Constructor.
It setup the Gui from the QTDesiger autogenerated code and connect various GUI signal/slots
Definition at line 39 of file MainWindow.cpp.
|
privateslot |
Definition at line 570 of file MainWindow.cpp.
| void addLayer | ( | QString | layerName_h, |
| QString | layerLabel_h | ||
| ) |
Perform all the operation needed when adding a new layer:
Definition at line 440 of file MainWindow.cpp.
|
protected |
|
private |
Definition at line 160 of file MainWindow.cpp.
|
signal |
|
inline |
Definition at line 61 of file MainWindow.h.
|
privateslot |
Definition at line 564 of file MainWindow.cpp.
|
private |
Definition at line 251 of file MainWindow.cpp.
|
privateslot |
Definition at line 289 of file MainWindow.cpp.
|
privateslot |
Definition at line 319 of file MainWindow.cpp.
|
privateslot |
Definition at line 680 of file MainWindow.cpp.
|
privateslot |
Definition at line 416 of file MainWindow.cpp.
| void processLogArea | ( | const QString & | message_h | ) |
Definition at line 552 of file MainWindow.cpp.
|
private |
Definition at line 312 of file MainWindow.cpp.
| void receiveScenarioOptions | ( | const QVector< QString > & | scenarios_h | ) |
Definition at line 664 of file MainWindow.cpp.
| void resetGUIForNewSimulation | ( | ) |
Reset the graphical elements for a new simulation // Send the request of getting the pixel info to the main thread.
Definition at line 607 of file MainWindow.cpp.
|
signal |
|
protected |
Manage the event of resizing the application.
Definition at line 193 of file MainWindow.cpp.
|
privateslot |
Definition at line 337 of file MainWindow.cpp.
|
privateslot |
Definition at line 350 of file MainWindow.cpp.
| bool saveLogFile | ( | const QString & | logFileName | ) |
Definition at line 365 of file MainWindow.cpp.
|
signal |
| void setCurrentLogFileName | ( | const QString & | fileName | ) |
Definition at line 201 of file MainWindow.cpp.
| void setCurrentModelFileName | ( | const QString & | fileName | ) |
Definition at line 206 of file MainWindow.cpp.
|
inline |
Definition at line 62 of file MainWindow.h.
|
inline |
|
inlineslot |
Definition at line 65 of file MainWindow.h.
|
privateslot |
Definition at line 585 of file MainWindow.cpp.
|
privateslot |
Definition at line 394 of file MainWindow.cpp.
|
privateslot |
Definition at line 406 of file MainWindow.cpp.
| QString strippedName | ( | const QString & | fullFileName | ) |
Definition at line 222 of file MainWindow.cpp.
| void switchToLayer | ( | QString | layerName_h | ) |
Perform all the operation needed when switching layer:
Definition at line 457 of file MainWindow.cpp.
| void switchToLayerFromLayerSelector | ( | int | layerIndex_h | ) |
Definition at line 465 of file MainWindow.cpp.
| void treeViewerAddItem | ( | string | text, |
| string | itemID, | ||
| string | parentID | ||
| ) |
e.g. manager_farmer_manager agents or agent_12345_ownedHa
Definition at line 528 of file MainWindow.cpp.
| void treeViewerItemChangeValue | ( | string | itemID, |
| string | newValue | ||
| ) |
Change value to an existing item in the Status Viewer.
Definition at line 485 of file MainWindow.cpp.
| void treeViewerItemRemove | ( | string | itemID | ) |
Definition at line 502 of file MainWindow.cpp.
| void updateImage | ( | QString | layerName_h, |
| const QImage & | image_h | ||
| ) |
Definition at line 478 of file MainWindow.cpp.
| void updatePixel | ( | QString | layerName_h, |
| int | x_h, | ||
| int | y_h, | ||
| QColor | color_h | ||
| ) |
Definition at line 472 of file MainWindow.cpp.
|
private |
Definition at line 227 of file MainWindow.cpp.

|
private |
Definition at line 386 of file MainWindow.cpp.
|
private |
Definition at line 114 of file MainWindow.h.
|
private |
Definition at line 112 of file MainWindow.h.
|
private |
Definition at line 113 of file MainWindow.h.
|
private |
Allow debug messages to be show in the logArea.
Definition at line 119 of file MainWindow.h.
|
private |
Status bar main label.
Definition at line 109 of file MainWindow.h.
|
private |
Definition at line 107 of file MainWindow.h.
|
private |
Definition at line 111 of file MainWindow.h.
|
private |
Definition at line 117 of file MainWindow.h.
|
private |
Definition at line 115 of file MainWindow.h.
|
private |
Definition at line 120 of file MainWindow.h.
|
private |
Definition at line 118 of file MainWindow.h.
|
private |
Map containing the ID and the pointers to the status viewer.
Ids are based on the name of the item:
Definition at line 132 of file MainWindow.h.
|
private |
Definition at line 110 of file MainWindow.h.
|
private |
Status bar current year label.
Definition at line 108 of file MainWindow.h.