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 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
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();
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();
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