summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/contacteditor.h
authortux_mike <tux_mike>2002-03-26 17:46:06 (UTC)
committer tux_mike <tux_mike>2002-03-26 17:46:06 (UTC)
commitdbbbe1c0600422e4bd2d6a6aba271476f457ed97 (patch) (unidiff)
tree692c9a3453a158b685de2f1f794b7cdb8c2eccef /core/pim/addressbook/contacteditor.h
parente91f77a9ebf359c0fbf4f8d1a0de50bf0dcf81d8 (diff)
downloadopie-dbbbe1c0600422e4bd2d6a6aba271476f457ed97.zip
opie-dbbbe1c0600422e4bd2d6a6aba271476f457ed97.tar.gz
opie-dbbbe1c0600422e4bd2d6a6aba271476f457ed97.tar.bz2
Mike Crawford <mike@tuxnami.org> Source files for the new input screen.
Diffstat (limited to 'core/pim/addressbook/contacteditor.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.h158
1 files changed, 158 insertions, 0 deletions
diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h
new file mode 100644
index 0000000..a799672
--- a/dev/null
+++ b/core/pim/addressbook/contacteditor.h
@@ -0,0 +1,158 @@
1/*
2 * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org>
3 *
4 * This file is an add-on for the OPIE Palmtop Environment
5 *
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
8 * Foundation and appearing in the file LICENSE.GPL included in the pacakaging
9 * of this file.
10 *
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.
13 *
14 *
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
17 * is made to operate exactly in interface with the exception of name.
18 *
19 */
20
21#ifndef CONTACTEDITOR_H
22#define CONTACTEDITOR_H
23
24#include <qpe/contact.h>
25
26#include <qdialog.h>
27#include <qlist.h>
28#include <qmap.h>
29#include <qstringlist.h>
30
31const int NAME_LF = 0;
32const int NAME_LFM = 1;
33const int NAME_FL = 2;
34const int NAME_FMLS = 3;
35
36const int NAME_F = 4;
37const int NAME_M = 5;
38const int NAME_L = 6;
39const int NAME_S = 7;
40
41
42class QScrollView;
43class QTabWidget;
44class QMultiLineEdit;
45class QLineEdit;
46class QComboBox;
47class QPushButton;
48class CategorySelect;
49class QLabel;
50
51class ContactEditor : public QDialog {
52 Q_OBJECT
53
54 public:
55 ContactEditor(const Contact &entry,
56 const QValueList<int> *newOrderedValues,
57 QStringList *slNewOrdered,
58 QWidget *parent = 0,
59 const char *name = 0,
60 WFlags fl = 0 );
61 ~ContactEditor();
62 void loadFields();
63 void setNameFocus();
64 Contact entry() const { return ent; }
65
66 public slots:
67 void slotNote();
68 void slotName();
69 void setEntry(const Contact &entry);
70
71 protected slots:
72 void accept();
73
74 private:
75 void init();
76 void initMap();
77 void saveEntry();
78 bool isEmpty();
79 void cleanupFields();
80 QString parseName( QString fullName, int type );
81
82 private slots:
83 void slotChooser1Change( const QString &textChanged );
84 void slotChooser2Change( const QString &textChanged );
85 void slotChooser3Change( const QString &textChanged );
86 void slotCmbChooser1Change( int index );
87 void slotCmbChooser2Change( int index );
88 void slotCmbChooser3Change( int index );
89 void slotAddressTypeChange( int index );
90 void slotAddressChange( const QString &textChanged );
91 void slotAddress2Change( const QString &textChanged );
92 void slotPOBoxChange( const QString &textChanged );
93 void slotCityChange( const QString &textChanged );
94 void slotStateChange( const QString &textChanged );
95 void slotZipChange( const QString &textChanged );
96 void slotCountryChange( const QString &textChanged );
97 void slotFullNameChange( const QString &textChanged );
98
99 private:
100 bool useFullName, hasGender, hasTitle, hasCompany, hasNotes, hasStreet, hasStreet2, hasPOBox, hasCity, hasState, hasZip, hasCountry;
101
102 Contact ent;
103
104 QDialog *dlgNote;
105 QDialog *dlgName;
106
107 QList<QLineEdit> listValue;
108 QList<QLabel> listName;
109 const QValueList<int> *orderedValues;
110 QStringList *slOrdered;
111 QStringList *slDynamicEntries;
112
113 QStringList *slHomeAddress;
114 QStringList *slBusinessAddress;
115 QStringList *slChooserNames;
116 QStringList *slChooserValues;
117
118 QMultiLineEdit *txtNote;
119 QLabel *lblNote;
120
121 //QLineEdit *txtTitle;
122 QLineEdit *txtFirstName;
123 QLineEdit *txtMiddleName;
124 QLineEdit *txtLastName;
125 QLineEdit *txtSuffix;
126
127 QTabWidget *tabMain;
128 QScrollView *svGeneral;
129 QPushButton *btnFullName;
130 QPushButton *btnNote;
131 QLineEdit *txtFullName;
132 QLineEdit *txtJobTitle;
133 QLineEdit *txtOrganization;
134 QLineEdit *txtChooserField1;
135 QLineEdit *txtChooserField2;
136 QLineEdit *txtChooserField3;
137 QComboBox *cmbChooserField1;
138 QComboBox *cmbChooserField2;
139 QComboBox *cmbChooserField3;
140 QComboBox *cmbFileAs;
141 CategorySelect *cmbCat;
142
143 QScrollView *svAddress;
144 QLineEdit *txtAddress;
145 //QLineEdit *txtAddress2;
146 //QLineEdit *txtPOBox;
147 QLineEdit *txtCity;
148 QLineEdit *txtState;
149 QLineEdit *txtZip;
150 QComboBox *cmbAddress;
151 QComboBox *cmbCountry;
152
153 QScrollView *svDetails;
154 QComboBox *cmbGender;
155
156};
157
158#endif