kpilot

addressEditor.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /* addressEditor.h      KPilot
00003 **
00004 ** Copyright (C) 1998-2000 by Dan Pilone
00005 **
00006 ** This is a dialog window that is used to edit a single address record.
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., 51 Franklin Street, Fifth Floor, Boston,
00023 ** MA 02110-1301, USA.
00024 */
00025 
00026 /*
00027 ** Bug reports and questions can be sent to kde-pim@kde.org
00028 */
00029 
00030 #ifndef _KPILOT_ADDRESSEDITOR_H
00031 #define _KPILOT_ADDRESSEDITOR_H
00032 
00033 #include <kdialogbase.h>
00034 
00035 #include "pilotAddress.h"
00036 
00037 class QLineEdit;
00038 
00039 class AddressEditor : public KDialogBase
00040 {
00041     Q_OBJECT
00042 
00043 
00044 public:
00045     AddressEditor(PilotAddress *address,
00046         PilotAddressInfo *appInfo,
00047         QWidget *parent, const char *name=0L);
00048     ~AddressEditor();
00049 
00050 
00051 signals:
00052     void recordChangeComplete ( PilotAddress* );
00053 
00054 public slots:
00055     void slotOk();
00056     void slotCancel();
00057     void updateRecord(PilotAddress *);
00058 
00059 private:
00060     bool fDeleteOnCancel;
00061 
00062     PilotAddress* fAddress;
00063     PilotAddressInfo *fAppInfo;
00064     // entry fields
00065     QLineEdit *fCustom4Field;
00066     QLineEdit *fCustom3Field;
00067     QLineEdit *fCustom2Field;
00068     QLineEdit *fCustom1Field;
00069     QLineEdit *fCountryField;
00070     QLineEdit *fZipField;
00071     QLineEdit *fStateField;
00072     QLineEdit *fCityField;
00073     QLineEdit *fAddressField;
00074     QLineEdit *fPhoneField[5];
00075     QLineEdit *fCompanyField;
00076     QLineEdit *fTitleField;
00077     QLineEdit *fFirstNameField;
00078     QLineEdit *fLastNameField;
00079     // phone labels (changing!)
00080     QLabel    *m_phoneLabel[5];
00081 
00082     void initLayout();
00083     void fillFields();
00084     QString phoneLabelText(PilotAddress *, const PhoneSlot &i);
00085 };
00086 #endif
00087