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 detectQtDevToolsMinGW();
157 void applyTextEditorSettings();
159 void restoreDefaultsTextEditorSettings();
164 Ui::PreferencesDialog *ui;
166 bool m_RecentsChanged;
168 bool m_SimPathsChanged;
170 bool m_ObsPathsChanged;
172 bool m_WaresWatchingChanged;
174 bool m_TextEditorSettingsChanged;
176 int m_OriginalLangIndex;
180 QStringList m_Formats {
"bold",
"italic",
"underline",
"strike-through"};
184 void updateMarketplacesList();
186 void intializeTextEditorSettings();
188 void updateSyntaxElementLabel(QLabel* Label,
const QStringList& Decorations,
const QString& ColorName);
190 void updateSyntaxElementColorButton(QToolButton* Button,
const QString& ColorName);
194 PreferencesDialog(QWidget *Parent, DisplayMode Mode = MODE_FULL);
196 virtual ~PreferencesDialog();
199 {
return m_RecentsChanged; }
202 {
return m_SimPathsChanged; }
205 {
return m_ObsPathsChanged; }
208 {
return m_WaresWatchingChanged; }
211 {
return m_TextEditorSettingsChanged; }
215 void applyTextEditorSettingsAsked();
bool isSimPathsChanged() const
Definition: PreferencesDialog.hpp:201
Definition: PreferencesDialog.hpp:69
bool isRecentsChanged() const
Definition: PreferencesDialog.hpp:198
Definition: PreferencesDialog.hpp:70
#define OPENFLUID_API
Definition: dllexport.hpp:87
DisplayMode
Definition: PreferencesDialog.hpp:69
bool isTextEditorSettingsChanged() const
Definition: PreferencesDialog.hpp:210
bool isObsPathsChanged() const
Definition: PreferencesDialog.hpp:204
bool isWaresWatchingChanged() const
Definition: PreferencesDialog.hpp:207
Definition: OpenFLUIDDialog.hpp:50
Definition: PreferencesDialog.hpp:63