author | eilers <eilers> | 2002-10-08 12:33:52 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-08 12:33:52 (UTC) |
commit | a194611bf645fe7e2e9e83733ababc587fd42f1d (patch) (unidiff) | |
tree | 2c21a5576bce48dba2fe83f6c849c0d16025a848 /core/pim/addressbook/contacteditor.h | |
parent | 333fec32d47ea32de9fb4c8cd378a519785a1ff8 (diff) | |
download | opie-a194611bf645fe7e2e9e83733ababc587fd42f1d.zip opie-a194611bf645fe7e2e9e83733ababc587fd42f1d.tar.gz opie-a194611bf645fe7e2e9e83733ababc587fd42f1d.tar.bz2 |
Joined development branch: It uses the new PIM API
Some features in "View" added by Darwin Zins, but they are
not finished..
Diffstat (limited to 'core/pim/addressbook/contacteditor.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/contacteditor.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h index 4f3b56e..8ed8553 100644 --- a/core/pim/addressbook/contacteditor.h +++ b/core/pim/addressbook/contacteditor.h | |||
@@ -1,128 +1,128 @@ | |||
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 <qpe/contact.h> | 24 | #include <opie/ocontact.h> |
25 | 25 | ||
26 | #include <qdialog.h> | 26 | #include <qdialog.h> |
27 | #include <qlist.h> | 27 | #include <qlist.h> |
28 | #include <qmap.h> | 28 | #include <qmap.h> |
29 | #include <qstringlist.h> | 29 | #include <qstringlist.h> |
30 | 30 | ||
31 | const int NAME_LF = 0; | 31 | const int NAME_LF = 0; |
32 | const int NAME_LFM = 1; | 32 | const int NAME_LFM = 1; |
33 | const int NAME_FL = 2; | 33 | const int NAME_FL = 2; |
34 | const int NAME_FMLS = 3; | 34 | const int NAME_FMLS = 3; |
35 | 35 | ||
36 | const int NAME_F = 4; | 36 | const int NAME_F = 4; |
37 | const int NAME_M = 5; | 37 | const int NAME_M = 5; |
38 | const int NAME_L = 6; | 38 | const int NAME_L = 6; |
39 | const int NAME_S = 7; | 39 | const int NAME_S = 7; |
40 | 40 | ||
41 | 41 | ||
42 | class QScrollView; | 42 | class QScrollView; |
43 | class QTabWidget; | 43 | class QTabWidget; |
44 | class QMultiLineEdit; | 44 | class QMultiLineEdit; |
45 | class QLineEdit; | 45 | class QLineEdit; |
46 | class QComboBox; | 46 | class QComboBox; |
47 | class QPushButton; | 47 | class QPushButton; |
48 | class CategorySelect; | 48 | class CategorySelect; |
49 | class QLabel; | 49 | class QLabel; |
50 | 50 | ||
51 | class ContactEditor : public QDialog { | 51 | class ContactEditor : public QDialog { |
52 | Q_OBJECT | 52 | Q_OBJECT |
53 | 53 | ||
54 | public: | 54 | public: |
55 | ContactEditor(const Contact &entry, | 55 | ContactEditor(const OContact &entry, |
56 | const QValueList<int> *newOrderedValues, | 56 | const QValueList<int> *newOrderedValues, |
57 | QStringList *slNewOrdered, | 57 | QStringList *slNewOrdered, |
58 | QWidget *parent = 0, | 58 | QWidget *parent = 0, |
59 | const char *name = 0, | 59 | const char *name = 0, |
60 | WFlags fl = 0 ); | 60 | WFlags fl = 0 ); |
61 | ~ContactEditor(); | 61 | ~ContactEditor(); |
62 | void loadFields(); | 62 | void loadFields(); |
63 | void setNameFocus(); | 63 | void setNameFocus(); |
64 | Contact entry() const { return ent; } | 64 | OContact entry() const { return ent; } |
65 | 65 | ||
66 | public slots: | 66 | public slots: |
67 | void slotNote(); | 67 | void slotNote(); |
68 | void slotName(); | 68 | void slotName(); |
69 | void setEntry(const Contact &entry); | 69 | void setEntry(const OContact &entry); |
70 | 70 | ||
71 | protected slots: | 71 | protected slots: |
72 | void accept(); | 72 | void accept(); |
73 | 73 | ||
74 | private: | 74 | private: |
75 | void init(); | 75 | void init(); |
76 | void initMap(); | 76 | void initMap(); |
77 | void saveEntry(); | 77 | void saveEntry(); |
78 | bool isEmpty(); | 78 | bool isEmpty(); |
79 | void cleanupFields(); | 79 | void cleanupFields(); |
80 | QString parseName( QString fullName, int type ); | 80 | QString parseName( QString fullName, int type ); |
81 | 81 | ||
82 | private slots: | 82 | private slots: |
83 | void slotChooser1Change( const QString &textChanged ); | 83 | void slotChooser1Change( const QString &textChanged ); |
84 | void slotChooser2Change( const QString &textChanged ); | 84 | void slotChooser2Change( const QString &textChanged ); |
85 | void slotChooser3Change( const QString &textChanged ); | 85 | void slotChooser3Change( const QString &textChanged ); |
86 | void slotChooser4Change( const QString &textChanged ); | 86 | void slotChooser4Change( const QString &textChanged ); |
87 | void slotCmbChooser1Change( int index ); | 87 | void slotCmbChooser1Change( int index ); |
88 | void slotCmbChooser2Change( int index ); | 88 | void slotCmbChooser2Change( int index ); |
89 | void slotCmbChooser3Change( int index ); | 89 | void slotCmbChooser3Change( int index ); |
90 | void slotCmbChooser4Change( int index ); | 90 | void slotCmbChooser4Change( int index ); |
91 | void slotAddressTypeChange( int index ); | 91 | void slotAddressTypeChange( int index ); |
92 | void slotAddressChange( const QString &textChanged ); | 92 | void slotAddressChange( const QString &textChanged ); |
93 | void slotAddress2Change( const QString &textChanged ); | 93 | void slotAddress2Change( const QString &textChanged ); |
94 | void slotPOBoxChange( const QString &textChanged ); | 94 | void slotPOBoxChange( const QString &textChanged ); |
95 | void slotCityChange( const QString &textChanged ); | 95 | void slotCityChange( const QString &textChanged ); |
96 | void slotStateChange( const QString &textChanged ); | 96 | void slotStateChange( const QString &textChanged ); |
97 | void slotZipChange( const QString &textChanged ); | 97 | void slotZipChange( const QString &textChanged ); |
98 | void slotCountryChange( const QString &textChanged ); | 98 | void slotCountryChange( const QString &textChanged ); |
99 | void slotFullNameChange( const QString &textChanged ); | 99 | void slotFullNameChange( const QString &textChanged ); |
100 | 100 | ||
101 | private: | 101 | private: |
102 | bool useFullName, hasGender, hasTitle, hasCompany, hasNotes, hasStreet, hasStreet2, hasPOBox, hasCity, hasState, hasZip, hasCountry; | 102 | bool useFullName, hasGender, hasTitle, hasCompany, hasNotes, hasStreet, hasStreet2, hasPOBox, hasCity, hasState, hasZip, hasCountry; |
103 | 103 | ||
104 | Contact ent; | 104 | OContact ent; |
105 | 105 | ||
106 | QDialog *dlgNote; | 106 | QDialog *dlgNote; |
107 | QDialog *dlgName; | 107 | QDialog *dlgName; |
108 | 108 | ||
109 | QList<QLineEdit> listValue; | 109 | QList<QLineEdit> listValue; |
110 | QList<QLabel> listName; | 110 | QList<QLabel> listName; |
111 | const QValueList<int> *orderedValues; | 111 | const QValueList<int> *orderedValues; |
112 | QStringList slOrdered; | 112 | QStringList slOrdered; |
113 | QStringList slDynamicEntries; | 113 | QStringList slDynamicEntries; |
114 | 114 | ||
115 | QStringList slHomeAddress; | 115 | QStringList slHomeAddress; |
116 | QStringList slBusinessAddress; | 116 | QStringList slBusinessAddress; |
117 | QStringList slChooserNames; | 117 | QStringList slChooserNames; |
118 | QStringList slChooserValues; | 118 | QStringList slChooserValues; |
119 | 119 | ||
120 | QMultiLineEdit *txtNote; | 120 | QMultiLineEdit *txtNote; |
121 | QLabel *lblNote; | 121 | QLabel *lblNote; |
122 | 122 | ||
123 | //QLineEdit *txtTitle; | 123 | //QLineEdit *txtTitle; |
124 | QLineEdit *txtFirstName; | 124 | QLineEdit *txtFirstName; |
125 | QLineEdit *txtMiddleName; | 125 | QLineEdit *txtMiddleName; |
126 | QLineEdit *txtLastName; | 126 | QLineEdit *txtLastName; |
127 | QLineEdit *txtSuffix; | 127 | QLineEdit *txtSuffix; |
128 | 128 | ||