21 #ifndef LDAPSEARCHDIALOG_H
22 #define LDAPSEARCHDIALOG_H
26 #include <tqptrlist.h>
28 #include <kabc/addressbook.h>
29 #include <ldapclient.h>
30 #include <kdialogbase.h>
32 #ifdef KDEPIM_NEW_DISTRLISTS
33 #include <libkdepim/distributionlist.h>
44 class ContactListItem;
50 class LDAPSearchDialog : public KDialogBase
56 LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, TQWidget* parent, const char* name = 0 );
59 bool isOK() const { return mIsOK; }
61 void restoreSettings();
64 void addresseesAdded();
67 void slotAddResult( const KPIM::LdapObject& obj );
68 void slotSetScope( bool rec );
69 void slotStartSearch();
70 void slotStopSearch();
71 void slotSearchDone();
72 void slotError( const TQString& );
73 virtual void slotHelp();
74 virtual void slotUser1();
75 virtual void slotUser2();
77 void slotUnselectAll();
83 KABC::Addressee::List importContactsUnlessTheyExist( const TQValueList<ContactListItem*>& items, KABC::Resource * const resource );
86 TQString selectedEMails() const;
88 virtual void closeEvent( TQCloseEvent* );
92 static KABC::Addressee convertLdapAttributesToAddressee( const KPIM::LdapAttrMap& attrs );
93 #ifdef KDEPIM_NEW_DISTRLISTS
94 KPIM::DistributionList selectDistributionList();
97 TQString makeFilter( const TQString& query, const TQString& attr, bool startsWith );
102 TQPtrList<KPIM::LdapClient> mLdapClientList;
104 KABC::AddressBook *mAddressBook;
107 KComboBox* mFilterCombo;
108 KComboBox* mSearchType;
109 KLineEdit* mSearchEdit;
111 TQCheckBox* mRecursiveCheckbox;
112 TQListView* mResultListView;
113 TQPushButton* mSearchButton;
|