00001
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 <tqmap.h>
00025 #include <tqradiobutton.h>
00026 #include <tqcombobox.h>
00027 #include <tqdict.h>
00028
00029 #include <kdialogbase.h>
00030 #include <tderesources/configwidget.h>
00031 #include <tdeabc/ldif.h>
00032 #include <tdeabc/ldapconfigwidget.h>
00033
00034
00035 class TQCheckBox;
00036 class TQPushButton;
00037 class TQSpinBox;
00038 class TQString;
00039
00040 class KComboBox;
00041 class KLineEdit;
00042
00043 namespace TDEABC {
00044
00045 class KABC_EXPORT ResourceLDAPTDEIOConfig : public KRES::ConfigWidget
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 ResourceLDAPTDEIOConfig( TQWidget* 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 TQPushButton *mEditButton, *mCacheButton;
00061 LdapConfigWidget *cfg;
00062 TQCheckBox *mSubTree;
00063 TQMap<TQString, TQString> mAttributes;
00064 int mRDNPrefix, mCachePolicy;
00065 bool mAutoCache;
00066 TQString mCacheDst;
00067 };
00068
00069 class AttributesDialog : public KDialogBase
00070 {
00071 Q_OBJECT
00072
00073 public:
00074 AttributesDialog( const TQMap<TQString, TQString> &attributes, int rdnprefix,
00075 TQWidget *parent, const char *name = 0 );
00076 ~AttributesDialog();
00077
00078 TQMap<TQString, TQString> 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 TQValueList< TQMap<TQString, TQString> > mMapList;
00089 TQMap<TQString, TQString> mDefaultMap;
00090 TQDict<KLineEdit> mLineEditDict;
00091 TQDict<TQString> 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 TQString &dst, TQWidget *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 TQString mDst;
00112 TQButtonGroup *mCacheGroup;
00113 TQCheckBox *mAutoCache;
00114 };
00115
00116 }
00117
00118 #endif