resourceldapkioconfig.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef RESOURCELDAPCONFIG_H
00022 #define RESOURCELDAPCONFIG_H
00023
00024 #include <qmap.h>
00025 #include <qradiobutton.h>
00026 #include <qcombobox.h>
00027 #include <qdict.h>
00028
00029 #include <kdialogbase.h>
00030 #include <kresources/configwidget.h>
00031 #include <kabc/ldif.h>
00032 #include <kabc/ldapconfigwidget.h>
00033
00034
00035 class QCheckBox;
00036 class QPushButton;
00037 class QSpinBox;
00038 class QString;
00039
00040 class KComboBox;
00041 class KLineEdit;
00042
00043 namespace KABC {
00044
00045 class KABC_EXPORT ResourceLDAPKIOConfig : public KRES::ConfigWidget
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 ResourceLDAPKIOConfig( QWidget* parent = 0, const char* name = 0 );
00051
00052 public slots:
00053 void loadSettings( KRES::Resource* );
00054 void saveSettings( KRES::Resource* );
00055
00056 private slots:
00057 void editAttributes();
00058 void editCache();
00059 private:
00060 QPushButton *mEditButton, *mCacheButton;
00061 LdapConfigWidget *cfg;
00062 QCheckBox *mSubTree;
00063 QMap<QString, QString> mAttributes;
00064 int mRDNPrefix, mCachePolicy;
00065 bool mAutoCache;
00066 QString mCacheDst;
00067 };
00068
00069 class AttributesDialog : public KDialogBase
00070 {
00071 Q_OBJECT
00072
00073 public:
00074 AttributesDialog( const QMap<QString, QString> &attributes, int rdnprefix,
00075 QWidget *parent, const char *name = 0 );
00076 ~AttributesDialog();
00077
00078 QMap<QString, QString> attributes() const;
00079 int rdnprefix() const;
00080
00081 private slots:
00082 void mapChanged( int pos );
00083
00084 private:
00085 enum { UserMap, KolabMap, NetscapeMap, EvolutionMap, OutlookMap };
00086
00087 KComboBox *mMapCombo, *mRDNCombo;
00088 QValueList< QMap<QString, QString> > mMapList;
00089 QMap<QString, QString> mDefaultMap;
00090 QDict<KLineEdit> mLineEditDict;
00091 QDict<QString> mNameDict;
00092 };
00093
00094 class OfflineDialog : public KDialogBase
00095 {
00096 Q_OBJECT
00097
00098 public:
00099 OfflineDialog( bool autoCache, int cachePolicy, const KURL &src,
00100 const QString &dst, QWidget *parent, const char *name = 0 );
00101 ~OfflineDialog();
00102
00103 int cachePolicy() const;
00104 bool autoCache() const;
00105
00106 private slots:
00107 void loadCache();
00108
00109 private:
00110 KURL mSrc;
00111 QString mDst;
00112 QButtonGroup *mCacheGroup;
00113 QCheckBox *mAutoCache;
00114 };
00115
00116 }
00117
00118 #endif
|