kpilot Library API Documentation

addressWidget.h

00001 /* addressWidget.h                      KPilot
00002 **
00003 ** Copyright (C) 1998-2001 by Dan Pilone
00004 **
00005 ** This file defines the address-viewing widget used in KPilot
00006 ** to display the Pilot's address records.
00007 */
00008 
00009 /*
00010 ** This program is free software; you can redistribute it and/or modify
00011 ** it under the terms of the GNU General Public License as published by
00012 ** the Free Software Foundation; either version 2 of the License, or
00013 ** (at your option) any later version.
00014 **
00015 ** This program is distributed in the hope that it will be useful,
00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018 ** GNU General Public License for more details.
00019 **
00020 ** You should have received a copy of the GNU General Public License
00021 ** along with this program in a file called COPYING; if not, write to
00022 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
00023 ** MA 02111-1307, USA.
00024 */
00025 
00026 /*
00027 ** Bug reports and questions can be sent to kde-pim@kde.org
00028 */
00029 #ifndef _KPILOT_ADDRESSWIDGET_H
00030 #define _KPILOT_ADDRESSWIDGET_H
00031 
00032 class QMultiLineEdit;
00033 class QListBox;
00034 class QComboBox;
00035 class QTextView;
00036 
00037 class KConfig;
00038 
00039 class PilotDatabase;
00040 
00041 
00042 
00043 #include "pilotComponent.h"
00044 #include "pilotAddress.h"
00045 
00046 class AddressWidget : public PilotComponent
00047 {
00048 Q_OBJECT
00049 
00050 public:
00051         AddressWidget(QWidget* parent,const QString& dbpath);
00052         ~AddressWidget();
00053 
00054         // Pilot Component Methods:
00055         void initialize();
00056         virtual bool preHotSync(QString &);
00057         virtual void postHotSync();
00058 
00059 public slots:
00064         void slotShowAddress(int);
00065         void slotEditRecord();
00066         void slotCreateNewRecord();
00067         void slotDeleteRecord();
00068         void slotEditCancelled();
00069 
00070         void slotUpdateButtons();       // Enable/disable buttons
00071 
00072 signals:
00073         void recordChanged(PilotAddress *);
00074 
00075 protected slots:
00080         void slotUpdateRecord(PilotAddress*);
00081 
00085         void slotAddRecord(PilotAddress*);
00086 
00091         void slotSetCategory(int);
00092 
00093 private:
00094         void setupWidget();
00095         void updateWidget(); // Called with the lists have changed..
00096         void writeAddress(PilotAddress* which,PilotDatabase *db=0L);
00097 
00104         int getAllAddresses(PilotDatabase *addressDB);
00105 
00110         QString createTitle(PilotAddress *,int displayMode);
00111 
00126         QComboBox            *fCatList;
00127         QTextView            *fAddrInfo;
00128         struct AddressAppInfo fAddressAppInfo;
00129         QList<PilotAddress>   fAddressList;
00130         QListBox             *fListBox;
00131         QPushButton          *fEditButton,*fDeleteButton;
00132 
00133 protected:
00138         int fPendingAddresses;
00139 
00140 public:
00141         typedef enum { PhoneNumberLength=16 } Constants ;
00142 };
00143 
00144 #else
00145 #ifdef DEBUG
00146 #warning "File doubly included"
00147 #endif
00148 #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:14 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001