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 PilotDatabase;
00038 
00039 
00040 
00041 #include "pilotComponent.h"
00042 #include "pilotAddress.h"
00043 
00044 class AddressWidget : public PilotComponent
00045 {
00046 Q_OBJECT
00047 
00048 public:
00049     AddressWidget(QWidget* parent,const QString& dbpath);
00050     ~AddressWidget();
00051 
00052     // Pilot Component Methods:
00053     virtual void showComponent();
00054     virtual void hideComponent();
00055     virtual bool preHotSync(QString &);
00056     virtual void postHotSync();
00057 
00058 public slots:
00063     void slotShowAddress(int);
00064     void slotEditRecord();
00065     void slotCreateNewRecord();
00066     void slotDeleteRecord();
00067     void slotEditCancelled();
00068 
00069     void slotUpdateButtons();   // Enable/disable buttons
00070 
00071 signals:
00072     void recordChanged(PilotAddress *);
00073 
00074 protected slots:
00079     void slotUpdateRecord(PilotAddress*);
00080 
00084     void slotAddRecord(PilotAddress*);
00085 
00090     void slotSetCategory(int);
00091 
00092 private:
00093     void setupWidget();
00094     void updateWidget(); // Called with the lists have changed..
00095     void writeAddress(PilotAddress* which,PilotDatabase *db=0L);
00096 
00103     int getAllAddresses(PilotDatabase *addressDB);
00104 
00109     QString createTitle(PilotAddress *,int displayMode);
00110 
00125     QComboBox            *fCatList;
00126     QTextView            *fAddrInfo;
00127     struct AddressAppInfo fAddressAppInfo;
00128     QPtrList<PilotAddress>   fAddressList;
00129     QListBox             *fListBox;
00130     QPushButton      *fEditButton,*fDeleteButton;
00131 
00132 protected:
00137     int fPendingAddresses;
00138 
00139 public:
00140     typedef enum { PhoneNumberLength=16 } Constants ;
00141 };
00142 
00143 #else
00144 #ifdef DEBUG
00145 #warning "File doubly included"
00146 #endif
00147 #endif
KDE Logo
This file is part of the documentation for kpilot Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:46 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003