DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
pathpenaltydialog.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 PATHPENALTYDIALOG_H
42 #define PATHPENALTYDIALOG_H
43 
44 #include <QDialog>
45 
46 QT_BEGIN_NAMESPACE
47 class QGridLayout;
48 class QCheckBox;
49 QT_END_NAMESPACE
50 
51 namespace Ui {
52 class PathPenaltyDialog;
53 }
54 
55 class PathPenaltyDialog : public QDialog
56 {
57  Q_OBJECT
58 
59 public:
60  explicit PathPenaltyDialog(QWidget *parent = 0);
62 
63  void showShapefileOptions(bool show);
64  void setShapefileList(QStringList files);
65  void setMetierNumber(int num);
66  QStringList selectedShapefile() const;
67  double nbOfDaysClosedPerMonth() const;
68  bool isPenaltyQ1();
69  bool isPenaltyQ2();
70  bool isPenaltyQ3();
71  bool isPenaltyQ4();
72  double weight() const;
73 
74  std::vector<bool> getCheckedMonths() const;
75  std::vector<int> getBannedMetiers() const;
76  std::vector<int> getVesSizeSelection() const;
77 
78 private slots:
79  void on_ok_clicked();
80  void cbToggled(bool);
81  void metierEnableToggled(bool);
82 
83  void on_enableSizes_toggled(bool checked);
84 
85 private:
87 
88  QGridLayout *mShapefileGrid, *mMetierGrid;
89  std::vector<QCheckBox *> mShapefileCheckboxes;
90  std::vector<QCheckBox *> mMetierCheckboxes;
91  std::vector<QCheckBox *> mMonthsCheckboxes;
92 
93  int clickCount = 0;
94 };
95 
96 #endif // PATHPENALTYDIALOG_H
Definition: dteditorwindow.h:32
QStringList selectedShapefile() const
Definition: pathpenaltydialog.cpp:100
std::vector< int > getBannedMetiers() const
Definition: pathpenaltydialog.cpp:150
bool isPenaltyQ3()
Definition: pathpenaltydialog.cpp:122
Definition: pathpenaltydialog.h:55
bool isPenaltyQ2()
Definition: pathpenaltydialog.cpp:117
bool isPenaltyQ1()
Definition: pathpenaltydialog.cpp:112
void setShapefileList(QStringList files)
Definition: pathpenaltydialog.cpp:78
~PathPenaltyDialog()
Definition: pathpenaltydialog.cpp:67
Definition: ui_pathpenaltydialog.h:256
std::vector< bool > getCheckedMonths() const
Definition: pathpenaltydialog.cpp:142
PathPenaltyDialog(QWidget *parent=0)
Definition: pathpenaltydialog.cpp:38
bool isPenaltyQ4()
Definition: pathpenaltydialog.cpp:127
std::vector< int > getVesSizeSelection() const
Definition: pathpenaltydialog.cpp:166
double nbOfDaysClosedPerMonth() const
Definition: pathpenaltydialog.cpp:137
double weight() const
Definition: pathpenaltydialog.cpp:132
void showShapefileOptions(bool show)
Definition: pathpenaltydialog.cpp:72
void setMetierNumber(int num)
Definition: pathpenaltydialog.cpp:89