/usr/include/tulip/TulipSettings.h is in libtulip-dev 4.6.0dfsg-2+b5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | /*
*
* This file is part of Tulip (www.tulip-software.org)
*
* Authors: David Auber and the Tulip development Team
* from LaBRI, University of Bordeaux
*
* Tulip is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* Tulip is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
*/
///@cond DOXYGEN_HIDDEN
#ifndef TULIPSETTINGS_H
#define TULIPSETTINGS_H
#include <QSettings>
#include <QNetworkProxy>
#include <QString>
#include <tulip/GlGraphRenderingParameters.h>
#include <tulip/Size.h>
#include <tulip/Graph.h>
namespace tlp {
/**
* @brief This class provides convenience functions to access the Tulip settings file (using QSettings)
* TulipSettings is a wrapper for QSettings providing quick access to common keys provided in the tulip configuration file.
* This object does not mask any method from the QSettings class, which mean that the user can still access custom keys by invoking the QSettings::value method.
*/
class TLP_QT_SCOPE TulipSettings: public QSettings, GlDefaultSelectionColorManager, Observable {
Q_OBJECT
Q_ENUMS(DisplayProperty)
public:
static const QString RemoteLocationsConfigEntry;
static const QString RecentDocumentsConfigEntry;
static const QString PluginsToRemoveConfigEntry;
static const QString DefaultColorConfigEntry;
static const QString DefaultLabelColorConfigEntry;
static const QString DefaultSizeConfigEntry;
static const QString DefaultShapeConfigEntry;
static const QString DefaultSelectionColorEntry;
static const QString FavoriteAlgorithmsEntry;
static const QString FirstRunEntry;
static const QString ProxyEnabledEntry;
static const QString ProxyTypeEntry;
static const QString ProxyHostEntry;
static const QString ProxyPortEntry;
static const QString ProxyUseAuthEntry;
static const QString ProxyUsernameEntry;
static const QString ProxyPasswordEntry;
static const QString AutomaticDisplayDefaultViews;
static const QString AutomaticPerfectAspectRatioEntry;
static const QString ViewOrthoEntry;
static const QString AutomaticMapMetricEntry;
static const QString ResultPropertyStoredEntry;
static const QString RunningTimeComputedEntry;
static const QString SeedForRandomSequenceEntry;
static const QString WarnUserAboutGraphicsCardEntry;
static TulipSettings &instance();
static QString elementKey(const QString& configEntry, tlp::ElementType elem);
void synchronizeViewSettings();
/**
@brief Retrieves the list of documents recently opened with tulip.
*/
QStringList recentDocuments() const;
/**
@brief Registers a file in the list of recently opened documents.
If the list already contains 5 elements, the last one (in chronological order) will be removed.
*/
void addToRecentDocuments(const QString &);
/**
@brief Check recently opened documents list and remove non-existing ones
*/
void checkRecentDocuments();
/**
* @brief Adds a remote location from which to list plugins.
*
* @param remoteLocation The URL of the plugin server.
* @return void
**/
void addRemoteLocation(const QString& remoteLocation);
/**
* @brief Removes a location from which to list plugins.
*
* @param remoteLocation The URL of the plugin server.
* @return void
**/
void removeRemoteLocation(const QString& remoteLocation);
/**
* @brief Retrieves the list of locations from which to list plugins.
*
* @return const QStringList
**/
const QStringList remoteLocations() const;
const QStringList pluginsToRemove() const;
void markPluginForRemoval(const QString& pluginLibrary);
void unmarkPluginForRemoval(const QString& pluginLibrary);
tlp::Color defaultColor(tlp::ElementType elem);
void setDefaultColor(tlp::ElementType elem, const tlp::Color& color);
tlp::Color defaultLabelColor();
void setDefaultLabelColor(const tlp::Color& color);
tlp::Size defaultSize(tlp::ElementType elem);
void setDefaultSize(tlp::ElementType elem, const tlp::Size& size);
int defaultShape(tlp::ElementType elem);
void setDefaultShape(tlp::ElementType elem, int shape);
// in GlDefaultSelectionColorManager interface
tlp::Color defaultSelectionColor();
void setDefaultSelectionColor(const tlp::Color& color);
QSet<QString> favoriteAlgorithms() const;
void addFavoriteAlgorithm(const QString&name);
void removeFavoriteAlgorithm(const QString&name);
// Proxy settings
bool isProxyEnabled() const;
void setProxyEnabled(bool);
QNetworkProxy::ProxyType proxyType() const;
void setProxyType(QNetworkProxy::ProxyType);
QString proxyHost() const;
void setProxyHost(const QString&);
unsigned int proxyPort() const;
void setProxyPort(unsigned int);
bool isUseProxyAuthentification() const;
void setUseProxyAuthentification(bool);
QString proxyUsername() const;
void setProxyUsername(const QString&);
QString proxyPassword() const;
void setProxyPassword(const QString&);
void applyProxySettings();
bool isFirstRun() const;
void setFirstRun(bool);
bool displayDefaultViews() const;
void setDisplayDefaultViews(bool);
bool isAutomaticMapMetric() const;
void setAutomaticMapMetric(bool);
bool isAutomaticRatio() const;
void setAutomaticRatio(bool);
bool isViewOrtho() const;
void setViewOrtho(bool);
bool isResultPropertyStored() const;
void setResultPropertyStored(bool);
bool isRunningTimeComputed() const;
void setRunningTimeComputed(bool);
unsigned int seedOfRandomSequence() const;
void setSeedOfRandomSequence(unsigned int);
void initSeedOfRandomSequence();
bool warnUserAboutGraphicsCard() const;
void setWarnUserAboutGraphicsCard(bool);
void treatEvent(const Event &message);
private:
TulipSettings();
static TulipSettings *_instance;
void setFavoriteAlgorithms(const QSet<QString> &lst);
};
}
#endif // TULIPSETTINGS_H
///@endcond
|