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();
98 void setDefaultLabelColor(const
tlp::Color& color);
107 tlp::Color defaultSelectionColor();
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 bool isRunningTimeComputed() const;
164 void setRunningTimeComputed(
bool);
166 bool isUseTlpbFileFormat() const;
167 void setUseTlpFileFormat(
bool);
169 unsigned int seedOfRandomSequence() const;
171 void initSeedOfRandomSequence();
173 bool warnUserAboutGraphicsCard() const;
174 void setWarnUserAboutGraphicsCard(
bool);
176 void treatEvent(const Event &message);
180 static TulipSettings *_instance;
182 void setFavoriteAlgorithms(const QSet<QString> &lst);
185 #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 ...