WareshubIssueDialog.hpp
Go to the documentation of this file.
1 /*
2 
3  This file is part of OpenFLUID software
4  Copyright(c) 2007, INRA - Montpellier SupAgro
5 
6 
7  == GNU General Public License Usage ==
8 
9  OpenFLUID is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  OpenFLUID is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21 
22 
23  == Other Usage ==
24 
25  Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26  license, and requires a written agreement between You and INRA.
27  Licensees for Other Usage of OpenFLUID may use this file in accordance
28  with the terms contained in the written agreement between You and INRA.
29 
30  */
31 
32 /**
33  @file WareshubIssueDialog.hpp
34  @brief Header of ...
35 
36  @author Aline LIBRES <aline.libres@gmail.com>
37  */
38 
39 
40 #ifndef __OPENFLUID_UIWARESDEV_WARESHUBISSUEDIALOG_HPP__
41 #define __OPENFLUID_UIWARESDEV_WARESHUBISSUEDIALOG_HPP__
42 
43 
44 #include <QDialog>
45 #include <QDate>
46 
47 #include <openfluid/dllexport.hpp>
48 
49 
50 namespace Ui {
51 class WareshubIssueDialog;
52 }
53 
54 
55 namespace openfluid { namespace ui { namespace waresdev {
56 
57 
58 class OPENFLUID_API WareshubIssueDialog: public QDialog
59 {
60  Q_OBJECT
61 
62 
63  public:
64 
65  struct Issue
66  {
67  QString m_ID;
68  QString m_Title;
69  QString m_Creator;
70  QDate m_Date;
71  QString m_Type;
72  QString m_State;
73  QString m_Description;
74  QString m_Urgency;
75 
76  Issue() :
77  m_Date(QDate::currentDate())
78  {
79  }
80  };
81 
82 
83  private slots:
84 
85  void onChanged();
86 
87 
88  private:
89 
90  Ui::WareshubIssueDialog* ui;
91 
92  QStringList m_IDs;
93 
94  QString m_DefaultMessage;
95 
96  QStringList m_Types = { "", "bug", "feature", "review" };
97 
98  QStringList m_Statuses = { "open", "closed" };
99 
100  QStringList m_Urgencies = { "low", "medium", "high" };
101 
102  void setMessage(const QString& Msg = "");
103 
104 
105  public:
106 
107  WareshubIssueDialog(const QStringList& IDs, QWidget* Parent = nullptr, const Issue& I = Issue());
108 
110 
111  Issue getIssue();
112 
113 };
114 
115 
116 } } } // namespaces
117 
118 
119 #endif /* __OPENFLUID_UIWARESDEV_WARESHUBISSUEDIALOG_HPP__ */
Definition: AboutDialog.hpp:51
Issue()
Definition: WareshubIssueDialog.hpp:76
QString m_Type
Definition: WareshubIssueDialog.hpp:71
QString m_Description
Definition: WareshubIssueDialog.hpp:73
QString m_Urgency
Definition: WareshubIssueDialog.hpp:74
Definition: WareshubIssueDialog.hpp:58
QString m_State
Definition: WareshubIssueDialog.hpp:72
QString m_ID
Definition: WareshubIssueDialog.hpp:67
Definition: ApplicationException.hpp:47
QString m_Creator
Definition: WareshubIssueDialog.hpp:69
Definition: WareshubIssueDialog.hpp:65
QString m_Title
Definition: WareshubIssueDialog.hpp:68
QDate m_Date
Definition: WareshubIssueDialog.hpp:70
#define OPENFLUID_API
Definition: dllexport.hpp:87