kaddressbook Library API Documentation

ldapsearchdialog.h

00001 /* ldapsearchdialogimpl.h - LDAP access
00002  *      Copyright (C) 2002 Klarälvdalens Datakonsult AB
00003  *
00004  *      Author: Steffen Hansen <hansen@kde.org>
00005  *
00006  * This file is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This file is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
00019  */
00020 
00021 #ifndef LDAPSEARCHDIALOG_H
00022 #define LDAPSEARCHDIALOG_H
00023 
00024 #include <qptrlist.h>
00025 
00026 #include <kabc/addressbook.h>
00027 #include <kabc/ldapclient.h>
00028 #include <kdialogbase.h>
00029 
00030 class KAddressBookTableView;
00031 class KComboBox;
00032 class KLineEdit;
00033 
00034 class QCheckBox;
00035 class QListView;
00036 class QPushButton;
00037 
00038 class LDAPSearchDialog : public KDialogBase
00039 { 
00040   Q_OBJECT
00041 
00042   public:
00043     LDAPSearchDialog( KABC::AddressBook *ab, QWidget* parent, const char* name = 0 );
00044     ~LDAPSearchDialog();
00045 
00046     bool isOK() const { return mIsOK; }
00047 
00048     void restoreSettings();
00049 
00050   signals:
00051     void addresseesAdded();
00052 
00053   protected slots:
00054     void slotAddResult( const KABC::LdapObject& obj );
00055     void slotSetScope( bool rec );
00056     void slotStartSearch();
00057     void slotStopSearch();
00058     void slotSearchDone();
00059     void slotError( const QString& );
00060     void slotHelp();
00061     virtual void slotUser1();
00062     virtual void slotUser2();
00063     virtual void slotUser3();
00064 
00065   protected:
00066     QString selectedEMails() const;
00067 
00068     virtual void closeEvent( QCloseEvent* );
00069 
00070   private:
00071     QString makeFilter( const QString& query, const QString& attr );
00072 
00073     void cancelQuery();
00074 
00075     int mNumHosts;
00076     QPtrList<KABC::LdapClient> mLdapClientList;
00077     bool mIsOK;
00078     KABC::AddressBook *mAddressBook;
00079 
00080     KComboBox* mFilterCombo;
00081     KLineEdit* mSearchEdit;
00082 
00083     QCheckBox* mRecursiveCheckbox;
00084     QListView* mResultListView;
00085     QPushButton* mSearchButton;
00086 };
00087 
00088 #endif
KDE Logo
This file is part of the documentation for kaddressbook Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:52 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003