addressWidget.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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
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();
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();
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
This file is part of the documentation for kdelibs Version 3.1.4.