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> 39 class TLP_QT_SCOPE TulipSettings:
public QSettings, GlDefaultSelectionColorManager, Observable {
41 Q_ENUMS(DisplayProperty)
45 static TulipSettings &instance();
47 static QString elementKey(const QString& configEntry,
tlp::
ElementType elem);
49 void synchronizeViewSettings();
54 QStringList recentDocuments() const;
60 void addToRecentDocuments(const QString &);
65 void checkRecentDocuments();
73 void addRemoteLocation(const QString& remoteLocation);
81 void removeRemoteLocation(const QString& remoteLocation);
88 const QStringList remoteLocations() const;
89 const QStringList pluginsToRemove() const;
91 void markPluginForRemoval(const QString& pluginLibrary);
92 void unmarkPluginForRemoval(const QString& pluginLibrary);
97 tlp::Color defaultLabelColor(
bool tulipDefault = false);
98 void setDefaultLabelColor(const
tlp::Color& color);
103 int defaultShape(
tlp::
ElementType elem,
bool tulipDefault = false);
107 tlp::Color defaultSelectionColor(
bool tulipDefault = false);
109 void setDefaultSelectionColor(const
tlp::Color& color);
111 QSet<QString> favoriteAlgorithms() const;
112 void addFavoriteAlgorithm(const QString&name);
113 void removeFavoriteAlgorithm(const QString&name);
116 bool isProxyEnabled() const;
117 void setProxyEnabled(
bool);
119 QNetworkProxy::ProxyType proxyType() const;
120 void setProxyType(QNetworkProxy::ProxyType);
122 QString proxyHost() const;
123 void setProxyHost(const QString&);
125 unsigned int proxyPort() const;
126 void setProxyPort(
unsigned int);
128 bool isUseProxyAuthentification() const;
129 void setUseProxyAuthentification(
bool);
131 QString proxyUsername() const;
132 void setProxyUsername(const QString&);
134 QString proxyPassword() const;
135 void setProxyPassword(const QString&);
137 void applyProxySettings();
139 bool isFirstRun() const;
140 void setFirstRun(
bool);
142 bool isFirstTulipMMRun() const;
143 void setFirstTulipMMRun(
bool);
145 bool displayDefaultViews() const;
146 void setDisplayDefaultViews(
bool);
148 bool isAutomaticMapMetric() const;
149 void setAutomaticMapMetric(
bool);
151 bool isAutomaticCentering() const;
152 void setAutomaticCentering(
bool);
154 bool isAutomaticRatio() const;
155 void setAutomaticRatio(
bool);
157 bool isViewOrtho() const;
158 void setViewOrtho(
bool);
160 bool isResultPropertyStored() const;
161 void setResultPropertyStored(
bool);
163 _DEPRECATED
bool isRunningTimeComputed() const;
164 _DEPRECATED
void setRunningTimeComputed(
bool);
169 LogCallWithExecutionTime = 2
171 unsigned int logPluginCall()
const;
172 void setLogPluginCall(
unsigned int);
174 bool isUseTlpbFileFormat()
const;
175 void setUseTlpFileFormat(
bool);
177 unsigned int seedOfRandomSequence()
const;
179 void initSeedOfRandomSequence();
181 bool warnUserAboutGraphicsCard()
const;
182 void setWarnUserAboutGraphicsCard(
bool);
184 bool showStatusBar()
const;
185 void setShowStatusBar(
bool);
187 bool loggerAnchored()
const;
188 void setLoggerAnchored(
bool);
190 void treatEvent(
const Event &message);
194 static TulipSettings *_instance;
196 void setFavoriteAlgorithms(
const QSet<QString> &lst);
199 #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 ...