40 #ifndef __OPENFLUID_UICOMMON_PREFERENCESDIALOG_HPP__
41 #define __OPENFLUID_UICOMMON_PREFERENCESDIALOG_HPP__
47 #include <QToolButton>
52 class PreferencesDialog;
56 class QTreeWidgetItem;
57 class WaresSearchPathsWidget;
60 namespace openfluid {
namespace ui {
namespace common {
77 enum PagesIndexes { ENVIRONMENT_PAGE = 0,
87 void changePage(QTreeWidgetItem* Current, QTreeWidgetItem* Previous);
89 void updateLanguage(
const QString& Lang);
91 void clearRecentsList();
93 void updateRecentsMax(
int Val);
95 void confirmItemRemoval(
bool Confirm);
97 void confirmParamRemoval(
bool Confirm);
99 void confirmUnitsRemoval(
bool Confirm);
101 void confirmConnectionsRemoval(
bool Confirm);
103 void confirmAttributesRemoval(
bool Confirm);
105 void enableWatchers(
bool Active);
107 void enableAutoSaveBeforeRun(
bool AutoSave);
109 void updateDeltaT(
int Val);
111 void updatePeriodBegin(
const QDateTime& DT);
113 void updatePeriodEnd(
const QDateTime& DT);
115 void enableSyntaxHighlighting(
bool Enable);
117 void changeSyntaxElementDecoration(
int ElementRow);
119 void enableCurrentLineHighlighting(
bool Enable);
121 void changeCurrentLineColor();
123 void changeCurrentFont(
const QFont& Font);
125 void enableLineWrapping(
bool Enable);
127 void changeIndentSpaceNumber(
int SpaceNb);
129 void changeSyntaxElementColor(
int ElementRow);
131 void addMarketPlace();
133 void editMarketPlace();
135 void removeMarketPlace();
137 void processSimUserPathsUpdate();
139 void processObsUserPathsUpdate();
141 void processBextUserPathsUpdate();
143 void processWorkspacesPathsUpdate();
145 void updateDevConfigPATH();
147 void updateDevConfigGenerator();
149 void updateDevConfigOptions();
151 void updateDevBuildPATH();
153 void updateDevShowPATH(
bool Enabled);
155 void updateDevSslNoVerify(
bool NoVerify);
157 void detectQtDevToolsMinGW();
159 void applyTextEditorSettings();
161 void restoreDefaultsTextEditorSettings();
166 Ui::PreferencesDialog *ui;
168 bool m_RecentsChanged;
170 bool m_SimPathsChanged;
172 bool m_ObsPathsChanged;
174 bool m_WaresWatchingChanged;
176 bool m_TextEditorSettingsChanged;
178 int m_OriginalLangIndex;
182 QStringList m_Formats {
"bold",
"italic",
"underline",
"strike-through"};
186 void updateMarketplacesList();
188 void intializeTextEditorSettings();
190 void updateSyntaxElementLabel(QLabel* Label,
const QStringList& Decorations,
const QString& ColorName);
192 void updateSyntaxElementColorButton(QToolButton* Button,
const QString& ColorName);
197 PreferencesDialog(QWidget *Parent, DisplayMode Mode = MODE_FULL);
199 virtual ~PreferencesDialog();
202 {
return m_RecentsChanged; }
205 {
return m_SimPathsChanged; }
208 {
return m_ObsPathsChanged; }
211 {
return m_WaresWatchingChanged; }
214 {
return m_TextEditorSettingsChanged; }
219 void applyTextEditorSettingsAsked();
Definition: PreferencesDialog.hpp:69
bool isSimPathsChanged() const
Definition: PreferencesDialog.hpp:204
bool isTextEditorSettingsChanged() const
Definition: PreferencesDialog.hpp:213
Definition: PreferencesDialog.hpp:70
Definition: OpenFLUIDDialog.hpp:50
DisplayMode
Definition: PreferencesDialog.hpp:69
#define OPENFLUID_API
Definition: dllexport.hpp:87
Definition: PreferencesDialog.hpp:63
bool isWaresWatchingChanged() const
Definition: PreferencesDialog.hpp:210
bool isObsPathsChanged() const
Definition: PreferencesDialog.hpp:207
bool isRecentsChanged() const
Definition: PreferencesDialog.hpp:201