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);
94 tlp::Color defaultColor(tlp::ElementType elem);
95 void setDefaultColor(tlp::ElementType elem, const tlp::Color& color);
97 tlp::Color defaultLabelColor();
98 void setDefaultLabelColor(const tlp::Color& color);
100 tlp::Size defaultSize(tlp::ElementType elem);
101 void setDefaultSize(tlp::ElementType elem, const tlp::Size& size);
103 int defaultShape(tlp::ElementType elem);
104 void setDefaultShape(tlp::ElementType elem,
int shape);
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 isAutomaticRatio() const;
152 void setAutomaticRatio(
bool);
154 bool isViewOrtho() const;
155 void setViewOrtho(
bool);
157 bool isResultPropertyStored() const;
158 void setResultPropertyStored(
bool);
160 bool isRunningTimeComputed() const;
161 void setRunningTimeComputed(
bool);
163 unsigned int seedOfRandomSequence() const;
164 void setSeedOfRandomSequence(
unsigned int);
165 void initSeedOfRandomSequence();
167 bool warnUserAboutGraphicsCard() const;
168 void setWarnUserAboutGraphicsCard(
bool);
170 void treatEvent(const Event &message);
174 static TulipSettings *_instance;
176 void setFavoriteAlgorithms(const QSet<QString> &lst);
179 #endif // TULIPSETTINGS_H