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(QComboBox *p=0L) const; \
00068 void set##a(QComboBox *); \
00069 void set##a(int); \
00070
00071 #define BoolProperty(a) \
00072 bool get##a(QCheckBox *p=0L) const; \
00073 void set##a(QCheckBox *); \
00074 void set##a(bool);
00075
00076 #define StringProperty(a) \
00077 QString get##a(QLineEdit *p=0L) const; \
00078 void set##a(QLineEdit *); \
00079 void set##a(const QString &);
00080
00081 IntProperty(Version)
00082 IntProperty(Debug)
00083
00084
00085 IntProperty(PilotType)
00086 IntProperty(PilotSpeed)
00087 StringProperty(PilotDevice)
00088 StringProperty(User)
00089
00090 StringProperty(Encoding)
00091 IntProperty(EncodingDD)
00092
00093
00094 BoolProperty(StartDaemonAtLogin)
00095 BoolProperty(KillDaemonOnExit)
00096 BoolProperty(DockDaemon)
00097
00098 BoolProperty(ShowSecrets)
00099 BoolProperty(SyncFiles)
00100 BoolProperty(SyncWithKMail)
00101 StringProperty(BackupOnly)
00102 StringProperty(Skip)
00103
00104
00105
00106
00107 KPilotConfigSettings &setAddressGroup();
00108
00109 BoolProperty(UseKeyField)
00110 IntProperty(AddressDisplayMode)
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 KPilotConfigSettings &setDatabaseGroup();
00127 void setDatabaseConduit(const QString &database,const QString &conduit);
00128
00129 public:
00130
00131
00132
00133 void sync() { KSimpleConfig::sync(); } ;
00134 KPilotConfigSettings & resetGroup()
00135 { setGroup(QString::null); return *this; } ;
00136 } ;
00137
00138 class KPilotConfig
00139 {
00140 public:
00152 static KPilotConfigSettings& getConfig();
00153
00158 static QString getDefaultDBPath();
00159
00160
00167 static const int ConfigurationVersion;
00168
00173 static int getConfigVersion(KConfig *);
00174 static int getConfigVersion(KConfig&);
00175
00181 static void updateConfigVersion();
00182
00194 static int getDebugLevel(bool useDebugId=true);
00195
00196
00201 static const QFont& fixed() ;
00202
00203 protected:
00204 static int getDebugLevel(KPilotConfigSettings &);
00205 } ;
00206
00207
00208
00209 #endif
This file is part of the documentation for kdelibs Version 3.1.4.