kaddressbook Library API Documentation

kaddressbookiconview.h

00001 #ifndef KADDRESSBOOKICONVIEW_H
00002 #define KADDRESSBOOKICONVIEW_H
00003 
00004 /*                                                                      
00005     This file is part of KAddressBook.                                  
00006     Copyright (c) 2002 Mike Pilone <mpilone@slac.com>                   
00007                                                                         
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or   
00011     (at your option) any later version.                                 
00012                                                                         
00013     This program is distributed in the hope that it will be useful,     
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of      
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the        
00016     GNU General Public License for more details.                        
00017                                                                         
00018     You should have received a copy of the GNU General Public License   
00019     along with this program; if not, write to the Free Software         
00020     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.           
00021                                                                         
00022     As a special exception, permission is given to link this program    
00023     with any edition of Qt, and distribute the resulting executable,    
00024     without including the source code for Qt in the source distribution.
00025 */                                                                      
00026 
00027 #include <qstring.h>
00028 #include <kiconview.h>
00029 #include "kaddressbookview.h"
00030 
00031 class QIconViewItem;
00032 class KConfig;
00033 class AddresseeIconView;
00034 class AddresseeIconViewItem;
00035 
00036 namespace KABC { class AddressBook; }
00037 
00042 class KAddressBookIconView : public KAddressBookView
00043 {
00044   Q_OBJECT
00045     
00046   public:
00047     KAddressBookIconView(KABC::AddressBook *doc, QWidget *parent,
00048                          const char *name);
00049     virtual ~KAddressBookIconView();
00050     
00051     virtual QStringList selectedUids();
00052     virtual QString type() const { return "Icon"; }
00053     
00054     virtual void readConfig(KConfig *config);
00055     
00056     virtual void incrementalSearch(const QString &value,KABC::Field *field );
00057     
00058   public slots:
00059     void refresh(QString uid = QString::null);
00060     void setSelected(QString uid = QString::null, bool selected = true);
00061   
00062   protected slots:
00063     void addresseeExecuted(QIconViewItem *item);
00064     void addresseeSelected();
00065   
00066   private:
00067     AddresseeIconView *mIconView;
00068     QPtrList<AddresseeIconViewItem> mIconList;
00069 };
00070 
00071 
00072 class AddresseeIconView : public KIconView
00073 {
00074   Q_OBJECT
00075   
00076   public:
00077     AddresseeIconView(QWidget *parent, const char *name);
00078     ~AddresseeIconView();
00079     
00080   signals:
00081     void addresseeDropped(QDropEvent *);
00082     void startAddresseeDrag();
00083   
00084   protected:
00085     virtual QDragObject *dragObject();
00086     
00087   protected slots:
00088     void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &);
00089 };
00090 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:37 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001