DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
waitdialog.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 WAITDIALOG_H
42 #define WAITDIALOG_H
43 
44 #include <QDialog>
45 
46 namespace Ui {
47 class WaitDialog;
48 }
49 
52 public:
53  virtual void abortIssued() = 0;
54 };
55 
56 class WaitDialog : public QDialog
57 {
58  Q_OBJECT
59 
60 public:
61  explicit WaitDialog(QWidget *parent = 0);
62  ~WaitDialog();
63 
65  mAbortListener = listener;
66  }
67 
68 public slots:
69  void setFormat(QString format);
70  void setText(QString text);
71  void setProgress(bool shown, int max);
72  void setProgress(int pos, int max);
73  void setTotal(int max);
74  void enableAbort(bool enable);
75  void setProgression (int level);
76  void setEta(QString txt);
77 
78 signals:
79  void aborted();
80  void self_set_progression(int);
81 
82 private slots:
83  void on_cmdAbort_clicked();
84 
85 private:
86  Ui::WaitDialog *ui;
87 
88  AbortListener *mAbortListener;
89 };
90 
91 #endif // WAITDIALOG_H
Definition: dteditorwindow.h:32
void setTotal(int max)
Definition: waitdialog.cpp:74
~WaitDialog()
Definition: waitdialog.cpp:45
virtual void abortIssued()=0
void setFormat(QString format)
Definition: waitdialog.cpp:50
void setProgress(bool shown, int max)
Definition: waitdialog.cpp:60
void setProgression(int level)
Definition: waitdialog.cpp:90
void setOnAbortListener(AbortListener *listener)
Definition: waitdialog.h:64
void aborted()
Definition: moc_waitdialog.cpp:185
Definition: ui_waitdialog.h:104
void enableAbort(bool enable)
Definition: waitdialog.cpp:82
void setText(QString text)
Definition: waitdialog.cpp:55
Definition: waitdialog.h:56
A workaround class for allowing calling the client.
Definition: waitdialog.h:51
void self_set_progression(int)
Definition: moc_waitdialog.cpp:191
WaitDialog(QWidget *parent=0)
Definition: waitdialog.cpp:28
void setEta(QString txt)
Definition: waitdialog.cpp:98