Diffstat (limited to 'core/pim/addressbook/contacteditor.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/contacteditor.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h index 72d14a9..1b86e6f 100644 --- a/core/pim/addressbook/contacteditor.h +++ b/core/pim/addressbook/contacteditor.h | |||
@@ -1,142 +1,142 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org> | 2 | * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org> |
3 | * | 3 | * |
4 | * This file is an add-on for the OPIE Palmtop Environment | 4 | * This file is an add-on for the OPIE Palmtop Environment |
5 | * | 5 | * |
6 | * This file may be distributed and/or modified under the terms of the | 6 | * This file may be distributed and/or modified under the terms of the |
7 | * GNU General Public License version 2 as published by the Free Software | 7 | * GNU General Public License version 2 as published by the Free Software |
8 | * Foundation and appearing in the file LICENSE.GPL included in the pacakaging | 8 | * Foundation and appearing in the file LICENSE.GPL included in the pacakaging |
9 | * of this file. | 9 | * of this file. |
10 | * | 10 | * |
11 | * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | * | 13 | * |
14 | * | 14 | * |
15 | * This is a rewrite of the abeditor.h file, modified to provide a more | 15 | * This is a rewrite of the abeditor.h file, modified to provide a more |
16 | * intuitive interface to TrollTech's original Address Book editor. This | 16 | * intuitive interface to TrollTech's original Address Book editor. This |
17 | * is made to operate exactly in interface with the exception of name. | 17 | * is made to operate exactly in interface with the exception of name. |
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef CONTACTEDITOR_H | 21 | #ifndef CONTACTEDITOR_H |
22 | #define CONTACTEDITOR_H | 22 | #define CONTACTEDITOR_H |
23 | 23 | ||
24 | #include <opie/ocontact.h> | 24 | #include <opie2/opimcontact.h> |
25 | #include <opie/ocontactfields.h> | 25 | #include <opie2/opimcontactfields.h> |
26 | 26 | ||
27 | #include <qpe/datebookmonth.h> | 27 | #include <qpe/datebookmonth.h> |
28 | 28 | ||
29 | #include <qdialog.h> | 29 | #include <qdialog.h> |
30 | #include <qlist.h> | 30 | #include <qlist.h> |
31 | #include <qmap.h> | 31 | #include <qmap.h> |
32 | #include <qstringlist.h> | 32 | #include <qstringlist.h> |
33 | #include <qwidgetstack.h> | 33 | #include <qwidgetstack.h> |
34 | 34 | ||
35 | const int NAME_LF = 0; | 35 | const int NAME_LF = 0; |
36 | const int NAME_LFM = 1; | 36 | const int NAME_LFM = 1; |
37 | const int NAME_FL = 2; | 37 | const int NAME_FL = 2; |
38 | const int NAME_FML = 3; | 38 | const int NAME_FML = 3; |
39 | 39 | ||
40 | const int NAME_F = 4; | 40 | const int NAME_F = 4; |
41 | const int NAME_M = 5; | 41 | const int NAME_M = 5; |
42 | const int NAME_L = 6; | 42 | const int NAME_L = 6; |
43 | const int NAME_S = 7; | 43 | const int NAME_S = 7; |
44 | 44 | ||
45 | 45 | ||
46 | class QScrollView; | 46 | class QScrollView; |
47 | class QTabWidget; | 47 | class QTabWidget; |
48 | class QMultiLineEdit; | 48 | class QMultiLineEdit; |
49 | class QLineEdit; | 49 | class QLineEdit; |
50 | class QComboBox; | 50 | class QComboBox; |
51 | class QPushButton; | 51 | class QPushButton; |
52 | class CategorySelect; | 52 | class CategorySelect; |
53 | class QLabel; | 53 | class QLabel; |
54 | 54 | ||
55 | class ContactEditor : public QDialog { | 55 | class ContactEditor : public QDialog { |
56 | Q_OBJECT | 56 | Q_OBJECT |
57 | 57 | ||
58 | public: | 58 | public: |
59 | ContactEditor(const OContact &entry, | 59 | ContactEditor(const Opie::OPimContact &entry, |
60 | QWidget *parent = 0, | 60 | QWidget *parent = 0, |
61 | const char *name = 0, | 61 | const char *name = 0, |
62 | WFlags fl = 0 ); | 62 | WFlags fl = 0 ); |
63 | ~ContactEditor(); | 63 | ~ContactEditor(); |
64 | void setNameFocus(); | 64 | void setNameFocus(); |
65 | void setPersonalView( bool personal = true ); | 65 | void setPersonalView( bool personal = true ); |
66 | OContact entry() const { return ent; } | 66 | Opie::OPimContact entry() const { return ent; } |
67 | 67 | ||
68 | public slots: | 68 | public slots: |
69 | void slotNote(); | 69 | void slotNote(); |
70 | void slotName(); | 70 | void slotName(); |
71 | void setEntry(const OContact &entry); | 71 | void setEntry(const Opie::OPimContact &entry); |
72 | 72 | ||
73 | protected slots: | 73 | protected slots: |
74 | void accept(); | 74 | void accept(); |
75 | 75 | ||
76 | private: | 76 | private: |
77 | void init(); | 77 | void init(); |
78 | void saveEntry(); | 78 | void saveEntry(); |
79 | bool isEmpty(); | 79 | bool isEmpty(); |
80 | void cleanupFields(); | 80 | void cleanupFields(); |
81 | void updateDatePicker(); | 81 | void updateDatePicker(); |
82 | QString parseName( QString fullName, int type ); | 82 | QString parseName( QString fullName, int type ); |
83 | void chooserError( int index ); | 83 | void chooserError( int index ); |
84 | private slots: | 84 | private slots: |
85 | void slotChooser1Change( const QString &textChanged ); | 85 | void slotChooser1Change( const QString &textChanged ); |
86 | void slotChooser2Change( const QString &textChanged ); | 86 | void slotChooser2Change( const QString &textChanged ); |
87 | void slotChooser3Change( const QString &textChanged ); | 87 | void slotChooser3Change( const QString &textChanged ); |
88 | void slotChooser4Change( const QString &textChanged ); | 88 | void slotChooser4Change( const QString &textChanged ); |
89 | void slotCmbChooser1Change( int index ); | 89 | void slotCmbChooser1Change( int index ); |
90 | void slotCmbChooser2Change( int index ); | 90 | void slotCmbChooser2Change( int index ); |
91 | void slotCmbChooser3Change( int index ); | 91 | void slotCmbChooser3Change( int index ); |
92 | void slotCmbChooser4Change( int index ); | 92 | void slotCmbChooser4Change( int index ); |
93 | void slotAddressTypeChange( int index ); | 93 | void slotAddressTypeChange( int index ); |
94 | void slotAddressChange( const QString &textChanged ); | 94 | void slotAddressChange( const QString &textChanged ); |
95 | void slotAddress2Change( const QString &textChanged ); | 95 | void slotAddress2Change( const QString &textChanged ); |
96 | void slotPOBoxChange( const QString &textChanged ); | 96 | void slotPOBoxChange( const QString &textChanged ); |
97 | void slotCityChange( const QString &textChanged ); | 97 | void slotCityChange( const QString &textChanged ); |
98 | void slotStateChange( const QString &textChanged ); | 98 | void slotStateChange( const QString &textChanged ); |
99 | void slotZipChange( const QString &textChanged ); | 99 | void slotZipChange( const QString &textChanged ); |
100 | void slotCountryChange( const QString &textChanged ); | 100 | void slotCountryChange( const QString &textChanged ); |
101 | void slotFullNameChange( const QString &textChanged ); | 101 | void slotFullNameChange( const QString &textChanged ); |
102 | void slotSuffixChange( const QString &textChanged ); | 102 | void slotSuffixChange( const QString &textChanged ); |
103 | void slotOrganizationChange( const QString &textChanged ); | 103 | void slotOrganizationChange( const QString &textChanged ); |
104 | void slotAnniversaryDateChanged( int year, int month, int day); | 104 | void slotAnniversaryDateChanged( int year, int month, int day); |
105 | void slotBirthdayDateChanged( int year, int month, int day); | 105 | void slotBirthdayDateChanged( int year, int month, int day); |
106 | void slotRemoveBirthday(); | 106 | void slotRemoveBirthday(); |
107 | void slotRemoveAnniversary(); | 107 | void slotRemoveAnniversary(); |
108 | void defaultEmailChanged(int); | 108 | void defaultEmailChanged(int); |
109 | 109 | ||
110 | private: | 110 | private: |
111 | enum StackWidgets { TextField = 1, Combo }; | 111 | enum StackWidgets { TextField = 1, Combo }; |
112 | int defaultEmailChooserPosition; | 112 | int defaultEmailChooserPosition; |
113 | void populateDefaultEmailCmb(); | 113 | void populateDefaultEmailCmb(); |
114 | void chooserChange( const QString&, int , QLineEdit*, int ); | 114 | void chooserChange( const QString&, int , QLineEdit*, int ); |
115 | bool cmbChooserChange( int , QWidgetStack*, int ); | 115 | bool cmbChooserChange( int , QWidgetStack*, int ); |
116 | OContactFields contactfields; | 116 | Opie::OPimContactFields contactfields; |
117 | 117 | ||
118 | OContact ent; | 118 | Opie::OPimContact ent; |
119 | 119 | ||
120 | QDialog *dlgNote; | 120 | QDialog *dlgNote; |
121 | QDialog *dlgName; | 121 | QDialog *dlgName; |
122 | 122 | ||
123 | QList<QLineEdit> listValue; | 123 | QList<QLineEdit> listValue; |
124 | QList<QLabel> listName; | 124 | QList<QLabel> listName; |
125 | 125 | ||
126 | QStringList slDynamicEntries; | 126 | QStringList slDynamicEntries; |
127 | QStringList trlDynamicEntries; | 127 | QStringList trlDynamicEntries; |
128 | 128 | ||
129 | bool m_personalView; | 129 | bool m_personalView; |
130 | 130 | ||
131 | QStringList slHomeAddress; | 131 | QStringList slHomeAddress; |
132 | QStringList slBusinessAddress; | 132 | QStringList slBusinessAddress; |
133 | QStringList slChooserNames; | 133 | QStringList slChooserNames; |
134 | QStringList slChooserValues; | 134 | QStringList slChooserValues; |
135 | QStringList emails; | 135 | QStringList emails; |
136 | QString defaultEmail; | 136 | QString defaultEmail; |
137 | 137 | ||
138 | QMultiLineEdit *txtNote; | 138 | QMultiLineEdit *txtNote; |
139 | QLabel *lblNote; | 139 | QLabel *lblNote; |
140 | 140 | ||
141 | //QLineEdit *txtTitle; | 141 | //QLineEdit *txtTitle; |
142 | QLineEdit *txtFirstName; | 142 | QLineEdit *txtFirstName; |