DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
scenariodialog.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
3 // AND EFFORT DISPLACEMENT
4 // Copyright (c) 2012-2019 Francois Bastardie <fba@aqua.dtu.dk>
5 
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // --------------------------------------------------------------------------
20 
21 /* --------------------------------------------------------------------------
22  * DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
23  * AND EFFORT DISPLACEMENT
24  * Copyright (c) 2012, 2013, 2014 Francois Bastardie <fba@aqua.dtu.dk>
25  *
26  * This program is free software; you can redistribute it and/or modify
27  * it under the terms of the GNU General Public License as published by
28  * the Free Software Foundation; either version 2 of the License, or
29  * (at your option) any later version.
30  *
31  * This program is distributed in the hope that it will be useful,
32  * but WITHOUT ANY WARRANTY; without even the implied warranty of
33  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34  * GNU General Public License for more details.
35  *
36  * You should have received a copy of the GNU General Public License along
37  * with this program; if not, write to the Free Software Foundation, Inc.,
38  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
39  * --------------------------------------------------------------------------
40  */
41 #ifndef SCENARIODIALOG_H
42 #define SCENARIODIALOG_H
43 
44 #include <QDialog>
45 #include <scenario.h>
46 
47 namespace Ui {
48 class ScenarioDialog;
49 }
50 
51 QT_BEGIN_NAMESPACE
52 class QCheckBox;
53 class QLineEdit;
54 QT_END_NAMESPACE
55 
56 class ScenarioDialog : public QDialog
57 {
58  Q_OBJECT
59 public:
60  explicit ScenarioDialog(const Scenario & scenario, QWidget *parent = 0);
62 
63  const Scenario &getScenario() const { return mScen; }
64 
65  QString getScenarioPath() const;
66  void setScenarioPath(const QString &value);
67  bool isRenamed() const { return mRenamed; }
68 
69  void setForceRename() { mForceRenamed = true; }
70 private slots:
71  void on_ScenarioDialog_accepted();
72  void on_rename_clicked();
73  void on_apply_clicked();
74  void on_graphBrowse_clicked();
75  void on_dt_enable_go_fishing_toggled(bool checked);
76  void on_dt_enable_choose_ground_toggled(bool checked);
77  void on_dt_enable_start_fishing_toggled(bool checked);
78  void on_dt_enable_change_ground_toggled(bool checked);
79  void on_dt_enable_stop_fishing_toggled(bool checked);
80  void on_dt_enable_change_port_toggled(bool checked);
81  void on_dt_browse_go_fishing_clicked();
82  void on_dt_browse_choose_ground_clicked();
83  void on_dt_browse_start_fishing_clicked();
84  void on_dt_browse_change_ground_clicked();
85  void on_dt_browse_stop_fishing_clicked();
86  void on_dt_browse_change_port_clicked();
87 
88 private:
89  void setDynPop(const QStringList &text);
90  void setDynAlloc(const QStringList &options);
91  void setGraphRes(const QStringList &xy);
92 
93 private:
95 
96  Scenario mScen;
97  QList<QCheckBox *> optPop;
98  QList<QCheckBox *> optAll;
99  QString mScenarioPath;
100  bool mRenamed, mForceRenamed;
101  void browse(QString title, QLineEdit *ed);
102 };
103 
104 #endif // SCENARIODIALOG_H
const Scenario & getScenario() const
Definition: scenariodialog.h:63
Definition: ui_scenariodialog.h:422
Definition: dteditorwindow.h:32
ScenarioDialog(const Scenario &scenario, QWidget *parent=0)
Definition: scenariodialog.cpp:74
void setForceRename()
Definition: scenariodialog.h:69
Definition: scenariodialog.h:56
std::pair< box, unsigned > value
Definition: diffusion.cpp:30
void setScenarioPath(const QString &value)
Definition: scenariodialog.cpp:165
bool isRenamed() const
Definition: scenariodialog.h:67
~ScenarioDialog()
Definition: scenariodialog.cpp:123
QString getScenarioPath() const
Definition: scenariodialog.cpp:160
displace::commons::Scenario scenario
Definition: main.cpp:247
Definition: scenario.h:51