kpilotConfig.h
00001 #ifndef _KPILOT_KPILOTCONFIG_H
00002 #define _KPILOT_KPILOTCONFIG_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include <ksimpleconfig.h>
00034
00035 class KCmdLineArgs;
00036 class QLineEdit;
00037 class QComboBox;
00038 class QCheckBox;
00039
00040 class KPilotConfigSettings : public KSimpleConfig
00041 {
00042 public:
00043 KPilotConfigSettings(const QString &filename,bool readonly=false);
00044 virtual ~KPilotConfigSettings();
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 #define IntProperty(a) \
00067 int get##a() const; \
00068 void set##a(int); \
00069
00070 #define BoolProperty(a) \
00071 bool get##a() const; \
00072 void set##a(bool);
00073
00074 #define StringProperty(a) \
00075 QString get##a() const; \
00076 void set##a(const QString &);
00077
00078 IntProperty(Version)
00079 IntProperty(Debug)
00080
00081
00082 StringProperty(PilotDevice)
00083 IntProperty(PilotSpeed)
00084 StringProperty(Encoding)
00085 StringProperty(User)
00086 BoolProperty(StartDaemonAtLogin)
00087 BoolProperty(DockDaemon)
00088 BoolProperty(KillDaemonOnExit)
00089 BoolProperty(QuitAfterSync)
00090
00091
00092 IntProperty(SyncType)
00093 BoolProperty(FullSyncOnPCChange)
00094 IntProperty(ConflictResolution)
00095
00096
00097
00098
00099 BoolProperty(InternalEditors)
00100 BoolProperty(ShowSecrets)
00101
00102
00103 KPilotConfigSettings &setAddressGroup();
00104 IntProperty(AddressDisplayMode)
00105 BoolProperty(UseKeyField)
00106
00107
00108 StringProperty(BackupOnly)
00109 StringProperty(Skip)
00110
00111
00112
00113
00114 #undef StringProperty
00115 #undef BoolProperty
00116 #undef IntProperty
00117
00118
00119
00120
00121 KPilotConfigSettings &setConduitGroup();
00122
00123 QStringList getInstalledConduits();
00124 void setInstalledConduits(const QStringList &);
00125
00126 QStringList getDirtyDatabases();
00127 void setDirtyDatabases(const QStringList &);
00128 void addDirtyDatabase(QString db);
00129
00130 QStringList getNoBackupDatabases();
00131
00132 QStringList getAppBlockChangedDatabases();
00133 void setAppBlockChangedDatabases(const QStringList &);
00134 void addAppBlockChangedDatabase(QString db);
00135
00136 QStringList getFlagsChangedDatabases();
00137 void setFlagsChangedDatabases(const QStringList &);
00138 void addFlagsChangedDatabase(QString db);
00139
00140 KPilotConfigSettings &setDatabaseGroup();
00141 void setDatabaseConduit(const QString &database,const QString &conduit);
00142
00143 public:
00144
00145
00146
00147 void sync() { KSimpleConfig::sync(); } ;
00148 KPilotConfigSettings & resetGroup()
00149 { setGroup(QString::null); return *this; } ;
00150
00151 } ;
00152
00153 class KPilotConfig
00154 {
00155 public:
00167 static KPilotConfigSettings& getConfig();
00168
00173 static QString getDefaultDBPath();
00174
00175
00182 static const int ConfigurationVersion;
00183
00188 static int getConfigVersion(KConfig *);
00189 static int getConfigVersion(KConfig&);
00190
00196 static void updateConfigVersion();
00197
00204 static QString versionDetails(int fileversion, bool run);
00205 static void sorryVersionOutdated(int fileversion);
00206 static void interactiveUpdate();
00207
00212 static int getDebugLevel(KCmdLineArgs *p);
00213
00218 static const QFont& fixed() ;
00219 } ;
00220
00221
00222
00223 #endif
This file is part of the documentation for kpilot Library Version 3.2.2.