40 #ifndef __OPENFLUID_UICOMMON_PREFERENCESDIALOG_HPP__ 41 #define __OPENFLUID_UICOMMON_PREFERENCESDIALOG_HPP__ 45 #include <QToolButton> 53 class PreferencesDialog;
57 class QTreeWidgetItem;
58 class WaresSearchPathsWidget;
61 namespace openfluid {
namespace ui {
namespace common {
78 enum PagesIndexes { ENVIRONMENT_PAGE = 0,
88 void changePage(QTreeWidgetItem* Current, QTreeWidgetItem* Previous);
90 void updateLanguage(
int Index);
92 void clearRecentsList();
94 void updateRecentsMax(
int Val);
96 void confirmItemRemoval(
bool Confirm);
98 void confirmParamRemoval(
bool Confirm);
100 void confirmUnitsRemoval(
bool Confirm);
102 void confirmConnectionsRemoval(
bool Confirm);
104 void confirmAttributesRemoval(
bool Confirm);
106 void enableWatchers(
bool Active);
108 void enableAutoSaveBeforeRun(
bool AutoSave);
110 void updateDeltaT(
int Val);
112 void updatePeriodBegin(
const QDateTime& DT);
114 void updatePeriodEnd(
const QDateTime& DT);
116 void enableSyntaxHighlighting(
bool Enable);
118 void changeSyntaxElementDecoration(
int ElementRow);
120 void enableCurrentLineHighlighting(
bool Enable);
122 void changeCurrentLineColor();
124 void changeCurrentFont(
const QFont& Font);
126 void enableLineWrapping(
bool Enable);
128 void changeIndentSpaceNumber(
int SpaceNb);
130 void changeSyntaxElementColor(
int ElementRow);
132 void addMarketPlace();
134 void editMarketPlace();
136 void removeMarketPlace();
138 void processSimUserPathsUpdate();
140 void processObsUserPathsUpdate();
142 void processBextUserPathsUpdate();
144 void processWorkspacesPathsUpdate();
146 void processExtToolsUpdate();
148 void enableAutosaveBeforeBuild(
bool Enabled);
150 void updateDevConfigPATH();
152 void updateDevConfigGenerator();
154 void updateDevConfigOptions();
156 void updateDevBuildPATH();
158 void updateDevShowPATH(
bool Enabled);
160 void updateDevSslNoVerify(
bool NoVerify);
162 void detectQtDevToolsMinGW();
164 void applyTextEditorSettings();
166 void restoreDefaultsTextEditorSettings();
171 Ui::PreferencesDialog *ui;
173 bool m_RecentsChanged;
175 bool m_SimPathsChanged;
177 bool m_ObsPathsChanged;
179 bool m_WaresWatchingChanged;
181 bool m_TextEditorSettingsChanged;
183 bool m_RestartRequired;
185 int m_OriginalLangIndex;
187 QString m_OriginalActiveWorkspace;
191 QStringList m_Formats {
"bold",
"italic",
"underline",
"strike-through"};
195 void updateMarketplacesList();
197 void intializeTextEditorSettings();
199 void updateSyntaxElementLabel(QLabel* Label,
const QStringList& Decorations,
const QString& ColorName);
201 void updateSyntaxElementColorButton(QToolButton* Button,
const QString& ColorName);
203 void updateRestartStatus();
205 static QString getLanguageAsPrettyString(
const QString& LangCode);
210 void applyTextEditorSettingsAsked();
220 {
return m_RecentsChanged; }
223 {
return m_SimPathsChanged; }
226 {
return m_ObsPathsChanged; }
229 {
return m_WaresWatchingChanged; }
232 {
return m_TextEditorSettingsChanged; }
235 {
return m_RestartRequired; }
Definition: ApplicationException.hpp:47
DisplayMode
Definition: PreferencesDialog.hpp:70
bool isTextEditorSettingsChanged() const
Definition: PreferencesDialog.hpp:231
bool isObsPathsChanged() const
Definition: PreferencesDialog.hpp:225
Definition: PreferencesDialog.hpp:70
Definition: AboutDialog.hpp:50
bool isWaresWatchingChanged() const
Definition: PreferencesDialog.hpp:228
bool isSimPathsChanged() const
Definition: PreferencesDialog.hpp:222
bool isRecentsChanged() const
Definition: PreferencesDialog.hpp:219
bool isRestartRequired()
Definition: PreferencesDialog.hpp:234
#define OPENFLUID_API
Definition: dllexport.hpp:86
Definition: MessageDialog.hpp:55
Definition: PreferencesDialog.hpp:64
Definition: PreferencesDialog.hpp:71