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 
00032 namespace KABC {
00033 class AddressBook;
00034 class Resource;
00035 }
00036 
00037 class QWidget;
00038 
00039 class KActionCollection;
00040 class KConfig;
00041 class KURL;
00042 
00043 namespace KAB {
00044 
00045 class SearchManager;
00046 
00047 class Core : public QObject
00048 {
00049   Q_OBJECT
00050 
00051   public:
00052     Core( KXMLGUIClient *client, QObject *parent, const char *name = 0 );
00053 
00057     virtual KABC::AddressBook *addressBook() const = 0;
00058 
00062     virtual KConfig *config() const = 0;
00063 
00068     virtual KActionCollection *actionCollection() const = 0;
00069 
00073     virtual KXMLGUIClient *guiClient() const { return mGUIClient; }
00074 
00078     virtual KABC::Field *currentSortField() const = 0;
00079 
00083     virtual QStringList selectedUIDs() const = 0;
00084 
00090     virtual KABC::Resource *requestResource( QWidget *parent ) = 0;
00091 
00095     virtual QWidget *widget() const = 0;
00096 
00102     virtual void deleteContacts( const QStringList &uids ) = 0;
00103 
00104     virtual SearchManager *searchManager() const = 0;
00105 
00106   public slots:
00110     virtual void setContactSelected( const QString &uid ) = 0;
00111 
00115     virtual void addEmail( const QString& addr ) = 0;
00116 
00120     virtual void importVCard( const KURL& url ) = 0;
00121 
00125     virtual void importVCard( const QString& vCard ) = 0;
00126 
00130     virtual void newContact() = 0;
00131 
00136     virtual QString getNameByPhone( const QString& phone ) = 0;
00137 
00141     virtual void editContact( const QString &uid = QString::null ) = 0;
00142 
00143   private:
00144     KXMLGUIClient *mGUIClient;
00145 };
00146 
00147 }
00148 
00149 #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 Mar 23 22:42:46 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003