kaddressbook Library API Documentation

core.h

00001 /*
00002     This file is part of KAddressbook.
00003     Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of Qt, and distribute the resulting executable,
00021     without including the source code for Qt in the source distribution.
00022 */
00023 
00024 #ifndef KAB_CORE_H
00025 #define KAB_CORE_H
00026 
00027 #include <qobject.h>
00028 
00029 #include <kabc/field.h>
00030 #include <kxmlguiclient.h>
00031 #include <libkdepim/distributionlist.h>
00032 
00033 namespace KABC {
00034 class AddressBook;
00035 class Resource;
00036 }
00037 
00038 class QWidget;
00039 
00040 class KActionCollection;
00041 class KConfig;
00042 class KURL;
00043 
00044 namespace KAB {
00045 
00046 class SearchManager;
00047 
00048 class Core : public QObject
00049 {
00050   Q_OBJECT
00051 
00052   public:
00053     Core( KXMLGUIClient *client, QObject *parent, const char *name = 0 );
00054 
00058     virtual KABC::AddressBook *addressBook() const = 0;
00059 
00063     virtual KConfig *config() const = 0;
00064 
00069     virtual KActionCollection *actionCollection() const = 0;
00070 
00074     virtual KXMLGUIClient *guiClient() const { return mGUIClient; }
00075 
00079     virtual KABC::Field *currentSortField() const = 0;
00080 
00084     virtual QStringList selectedUIDs() const = 0;
00085 
00091     virtual KABC::Resource *requestResource( QWidget *parent ) = 0;
00092 
00096     virtual QWidget *widget() const = 0;
00097 
00103     virtual void deleteContacts( const QStringList &uids ) = 0;
00104 
00108     virtual KPIM::DistributionList::List distributionLists() const = 0;
00109 
00113     virtual QStringList distributionListNames() const = 0;
00114 
00115 
00117     virtual SearchManager *searchManager() const = 0;
00118 
00119   public slots:
00123     virtual void setContactSelected( const QString &uid ) = 0;
00124 
00128     virtual void addEmail( const QString& addr ) = 0;
00129 
00133     virtual void importVCard( const KURL& url ) = 0;
00134 
00138     virtual void importVCard( const QString& vCard ) = 0;
00139 
00143     virtual void newContact() = 0;
00144 
00149     virtual QString getNameByPhone( const QString& phone ) = 0;
00150 
00154     virtual void editContact( const QString &uid = QString::null ) = 0;
00155 
00156   signals:
00161     void contactsUpdated();
00162 
00163   private:
00164     KXMLGUIClient *mGUIClient;
00165 };
00166 
00167 }
00168 
00169 #endif
KDE Logo
This file is part of the documentation for kaddressbook Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 17 09:54:49 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003