kpilot/kpilot
addressWidget.h00001
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
00030 #ifndef _KPILOT_ADDRESSWIDGET_H
00031 #define _KPILOT_ADDRESSWIDGET_H
00032
00033 class QMultiLineEdit;
00034 class QListBox;
00035 class QComboBox;
00036 class QTextView;
00037
00038 class PilotDatabase;
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
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 void slotExport();
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 PilotAddressInfo *fAddressAppInfo;
00129 QPtrList<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 #endif
|