kaddressbook Library API Documentation

cardviewwrapper.h

00001 #ifndef CARDVIEWWRAPPER_H
00002 #define CARDVIEWWRAPPER_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 <klocale.h>
00029 #include "kaddressbookcardview.h"
00030 #include "configurecardviewdialog.h"
00031 #include "viewwrapper.h"
00032 
00033 namespace KABC { class AddressBook; }
00034 
00035 class CardViewWrapper : public ViewWrapper
00036 {
00037   public:
00038     CardViewWrapper() : ViewWrapper() {}
00039     virtual ~CardViewWrapper() {}
00040     
00041     virtual QString type() const { return "Card"; };
00042     
00043     virtual QString description() const
00044     {
00045       // Needs a better description.
00046       QString desc = i18n("Rolodex style cards represent contacts.");
00047       
00048       return desc;
00049     }
00050     
00051     virtual KAddressBookView *createView(KABC::AddressBook *doc,
00052                                          QWidget *parent, 
00053                                          const char *name)
00054     {
00055       return new KAddressBookCardView(doc, parent, name);
00056     }
00057     
00058     virtual ConfigureViewDialog *createConfigureViewDialog(
00059                                                      const QString &viewName,
00060                                                      KABC::AddressBook *doc,
00061                                                      QWidget *parent,
00062                                                      const char *name)
00063     {
00064       return new ConfigureCardViewDialog(viewName, doc, parent, name);
00065     }
00066 
00067 };
00068 
00069 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:09 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001