All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PreferencesDialog.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 /**
34  \file PreferencesDialog.hpp
35  \brief Header of ...
36 
37  \author Jean-Christophe FABRE <fabrejc@supagro.inra.fr>
38  */
39 
40 
41 #ifndef __PREFERENCESDIALOG_HPP__
42 #define __PREFERENCESDIALOG_HPP__
43 
44 #include <openfluid/dllexport.hpp>
46 
47 #include <QDateTime>
48 
49 
50 namespace Ui
51 {
52  class PreferencesDialog;
53 }
54 
55 
56 class QTreeWidgetItem;
57 class WaresSearchPathsWidget;
58 
59 
60 namespace openfluid { namespace ui { namespace common {
61 
62 
64 {
65  Q_OBJECT;
66 
67  private:
68 
69  enum PagesIndexes { INTERFACE_PAGE = 0,
70  WORKSPACES_PAGE = 1,
71  WARESPATHS_PAGE = 2,
72  SIMULATION_PAGE = 3,
73  MARKET_PAGE = 4
74  };
75 
76  private slots:
77 
78  void changePage(QTreeWidgetItem* Current, QTreeWidgetItem* Previous);
79 
80  void updateLanguage(const QString& Lang);
81 
82  void clearRecentsList();
83 
84  void updateRecentsMax(int Val);
85 
86  void confirmItemRemoval(bool Confirm);
87 
88  void confirmParamRemoval(bool Confirm);
89 
90  void confirmUnitsRemoval(bool Confirm);
91 
92  void confirmConnectionsRemoval(bool Confirm);
93 
94  void confirmAttributesRemoval(bool Confirm);
95 
96  void enableWatchers(bool Active);
97 
98  void enableAutoSaveBeforeRun(bool AutoSave);
99 
100  void updateDeltaT(int Val);
101 
102  void updatePeriodBegin(const QDateTime& DT);
103 
104  void updatePeriodEnd(const QDateTime& DT);
105 
106  void addMarketPlace();
107 
108  void editMarketPlace();
109 
110  void removeMarketPlace();
111 
112  void processSimUserPathsUpdate();
113 
114  void processObsUserPathsUpdate();
115 
116  void processBextUserPathsUpdate();
117 
118  void processWorkspacesPathsUpdate();
119 
120 
121  private:
122 
123  Ui::PreferencesDialog *ui;
124 
125  bool m_RecentsChanged;
126 
127  bool m_SimPathsChanged;
128 
129  bool m_ObsPathsChanged;
130 
131  bool m_WaresWatchingChanged;
132 
133  void initialize();
134 
135  void updateMarketplacesList();
136 
137 
138  public:
139 
140  PreferencesDialog(QWidget *Parent, bool WithBuilderPrefs = false);
141 
142  virtual ~PreferencesDialog();
143 
144  void initializeBuilderPrefs(const QStringList& ExtsPaths);
145 
146  bool isRecentsChanged() const { return m_RecentsChanged; }
147 
148  bool isSimPathsChanged() const { return m_SimPathsChanged; }
149 
150  bool isObsPathsChanged() const { return m_ObsPathsChanged; }
151 
152  bool isWaresWatchingChanged() const { return m_WaresWatchingChanged; }
153 
154 
155 };
156 
157 
158 } } } // namespaces
159 
160 
161 #endif /* __PREFERENCESDIALOG_HPP__ */
Definition: PreferencesDialog.hpp:63
Definition: OpenFLUIDDialog.hpp:51
bool isRecentsChanged() const
Definition: PreferencesDialog.hpp:146
bool isSimPathsChanged() const
Definition: PreferencesDialog.hpp:148
bool isWaresWatchingChanged() const
Definition: PreferencesDialog.hpp:152
Header of ...
bool isObsPathsChanged() const
Definition: PreferencesDialog.hpp:150
#define DLLEXPORT
Definition: dllexport.hpp:51