21 #ifndef TULIPSETTINGS_H 22 #define TULIPSETTINGS_H 25 #include <QNetworkProxy> 28 #include <tulip/GlGraphRenderingParameters.h> 29 #include <tulip/Size.h> 30 #include <tulip/Graph.h> 42 class TLP_QT_SCOPE TulipSettings :
public QSettings, GlDefaultSelectionColorManager, Observable {
44 Q_ENUMS(DisplayProperty)
47 static TulipSettings &instance();
49 static QString elementKey(
const QString &configEntry,
tlp::ElementType elem);
51 void synchronizeViewSettings();
56 QStringList recentDocuments()
const;
62 void addToRecentDocuments(
const QString &);
67 void checkRecentDocuments();
75 void addRemoteLocation(
const QString &remoteLocation);
83 void removeRemoteLocation(
const QString &remoteLocation);
90 const QStringList remoteLocations()
const;
91 const QStringList pluginsToRemove()
const;
93 void markPluginForRemoval(
const QString &pluginLibrary);
94 void unmarkPluginForRemoval(
const QString &pluginLibrary);
99 tlp::Color defaultLabelColor(
bool tulipDefault =
false);
100 void setDefaultLabelColor(
const tlp::Color &color);
109 tlp::Color defaultSelectionColor(
bool tulipDefault =
false)
override;
111 void setDefaultSelectionColor(
const tlp::Color &color);
113 QSet<QString> favoriteAlgorithms()
const;
114 void addFavoriteAlgorithm(
const QString &name);
115 void removeFavoriteAlgorithm(
const QString &name);
118 bool isProxyEnabled()
const;
119 void setProxyEnabled(
bool);
121 QNetworkProxy::ProxyType proxyType()
const;
122 void setProxyType(QNetworkProxy::ProxyType);
124 QString proxyHost()
const;
125 void setProxyHost(
const QString &);
127 unsigned int proxyPort()
const;
128 void setProxyPort(
unsigned int);
130 bool isUseProxyAuthentification()
const;
131 void setUseProxyAuthentification(
bool);
133 QString proxyUsername()
const;
134 void setProxyUsername(
const QString &);
136 QString proxyPassword()
const;
137 void setProxyPassword(
const QString &);
139 void applyProxySettings();
141 bool isFirstRun()
const;
142 void setFirstRun(
bool);
144 bool isFirstTulipMMRun()
const;
145 void setFirstTulipMMRun(
bool);
147 bool displayDefaultViews()
const;
148 void setDisplayDefaultViews(
bool);
150 bool isAutomaticMapMetric()
const;
151 void setAutomaticMapMetric(
bool);
153 bool isAutomaticCentering()
const;
154 void setAutomaticCentering(
bool);
156 bool isAutomaticRatio()
const;
157 void setAutomaticRatio(
bool);
159 bool isViewOrtho()
const;
160 void setViewOrtho(
bool);
162 bool isResultPropertyStored()
const;
163 void setResultPropertyStored(
bool);
165 _DEPRECATED
bool isRunningTimeComputed()
const;
166 _DEPRECATED
void setRunningTimeComputed(
bool);
168 enum LogPluginCall { NoLog = 0, LogCall = 1, LogCallWithExecutionTime = 2 };
169 unsigned int logPluginCall()
const;
170 void setLogPluginCall(
unsigned int);
172 bool isUseTlpbFileFormat()
const;
173 void setUseTlpFileFormat(
bool);
175 unsigned int seedOfRandomSequence()
const;
177 void initSeedOfRandomSequence();
179 bool warnUserAboutGraphicsCard()
const;
180 void setWarnUserAboutGraphicsCard(
bool);
182 bool showStatusBar()
const;
183 void setShowStatusBar(
bool);
185 bool loggerAnchored()
const;
186 void setLoggerAnchored(
bool);
188 void treatEvent(
const Event &message)
override;
192 static TulipSettings *_instance;
194 void setFavoriteAlgorithms(
const QSet<QString> &lst);
197 #endif // TULIPSETTINGS_H
void setSeedOfRandomSequence(unsigned int seed=UINT_MAX)
Gives the value of the seed used for further initialization of a random sequence (with further calls ...