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.cpp | |
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.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index ae86ed0..fd7f009 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -28,49 +28,49 @@ | |||
28 | #include <qcombobox.h> | 28 | #include <qcombobox.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qtabwidget.h> | 30 | #include <qtabwidget.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qlineedit.h> | 32 | #include <qlineedit.h> |
33 | #include <qmultilineedit.h> | 33 | #include <qmultilineedit.h> |
34 | #include <qscrollview.h> | 34 | #include <qscrollview.h> |
35 | #include <qtoolbutton.h> | 35 | #include <qtoolbutton.h> |
36 | #include <qpushbutton.h> | 36 | #include <qpushbutton.h> |
37 | #include <qmainwindow.h> | 37 | #include <qmainwindow.h> |
38 | #include <qvaluelist.h> | 38 | #include <qvaluelist.h> |
39 | 39 | ||
40 | static inline bool containsAlphaNum( const QString &str ); | 40 | static inline bool containsAlphaNum( const QString &str ); |
41 | static inline bool constainsWhiteSpace( const QString &str ); | 41 | static inline bool constainsWhiteSpace( const QString &str ); |
42 | 42 | ||
43 | // helper functions, convert our comma delimited list to proper | 43 | // helper functions, convert our comma delimited list to proper |
44 | // file format... | 44 | // file format... |
45 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, | 45 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, |
46 | QString &strAll ); | 46 | QString &strAll ); |
47 | 47 | ||
48 | // helper convert from file format to comma delimited... | 48 | // helper convert from file format to comma delimited... |
49 | void parseEmailTo( const QString &strDefaultEmail, | 49 | void parseEmailTo( const QString &strDefaultEmail, |
50 | const QString &strOtherEmail, QString &strBack ); | 50 | const QString &strOtherEmail, QString &strBack ); |
51 | 51 | ||
52 | ContactEditor::ContactEditor(const Contact &entry, | 52 | ContactEditor::ContactEditor(const OContact &entry, |
53 | const QValueList<int> *newOrderedValues, | 53 | const QValueList<int> *newOrderedValues, |
54 | QStringList *slNewOrdered, | 54 | QStringList *slNewOrdered, |
55 | QWidget *parent, | 55 | QWidget *parent, |
56 | const char *name, | 56 | const char *name, |
57 | WFlags fl ) | 57 | WFlags fl ) |
58 | : QDialog( parent, name, TRUE, fl ), | 58 | : QDialog( parent, name, TRUE, fl ), |
59 | orderedValues( newOrderedValues ), | 59 | orderedValues( newOrderedValues ), |
60 | slOrdered( *slNewOrdered ) | 60 | slOrdered( *slNewOrdered ) |
61 | { | 61 | { |
62 | 62 | ||
63 | init(); | 63 | init(); |
64 | initMap(); | 64 | initMap(); |
65 | setEntry( entry ); | 65 | setEntry( entry ); |
66 | qDebug("finish"); | 66 | qDebug("finish"); |
67 | } | 67 | } |
68 | 68 | ||
69 | ContactEditor::~ContactEditor() { | 69 | ContactEditor::~ContactEditor() { |
70 | } | 70 | } |
71 | 71 | ||
72 | void ContactEditor::init() { | 72 | void ContactEditor::init() { |
73 | 73 | ||
74 | useFullName = TRUE; | 74 | useFullName = TRUE; |
75 | 75 | ||
76 | int i = 0; | 76 | int i = 0; |
@@ -1271,49 +1271,49 @@ void ContactEditor::cleanupFields() { | |||
1271 | txtFirstName->setText(""); | 1271 | txtFirstName->setText(""); |
1272 | txtMiddleName->setText(""); | 1272 | txtMiddleName->setText(""); |
1273 | txtLastName->setText(""); | 1273 | txtLastName->setText(""); |
1274 | txtSuffix->setText(""); | 1274 | txtSuffix->setText(""); |
1275 | txtNote->setText(""); | 1275 | txtNote->setText(""); |
1276 | txtFullName->setText(""); | 1276 | txtFullName->setText(""); |
1277 | txtJobTitle->setText(""); | 1277 | txtJobTitle->setText(""); |
1278 | txtOrganization->setText(""); | 1278 | txtOrganization->setText(""); |
1279 | txtChooserField1->setText(""); | 1279 | txtChooserField1->setText(""); |
1280 | txtChooserField2->setText(""); | 1280 | txtChooserField2->setText(""); |
1281 | txtChooserField3->setText(""); | 1281 | txtChooserField3->setText(""); |
1282 | txtAddress->setText(""); | 1282 | txtAddress->setText(""); |
1283 | //txtAddress2->setText(""); | 1283 | //txtAddress2->setText(""); |
1284 | txtCity->setText(""); | 1284 | txtCity->setText(""); |
1285 | //txtPOBox->setText(""); | 1285 | //txtPOBox->setText(""); |
1286 | txtState->setText(""); | 1286 | txtState->setText(""); |
1287 | txtZip->setText(""); | 1287 | txtZip->setText(""); |
1288 | QLineEdit *txtTmp = cmbCountry->lineEdit(); | 1288 | QLineEdit *txtTmp = cmbCountry->lineEdit(); |
1289 | txtTmp->setText(""); | 1289 | txtTmp->setText(""); |
1290 | txtTmp = cmbFileAs->lineEdit(); | 1290 | txtTmp = cmbFileAs->lineEdit(); |
1291 | txtTmp->setText(""); | 1291 | txtTmp->setText(""); |
1292 | 1292 | ||
1293 | } | 1293 | } |
1294 | 1294 | ||
1295 | void ContactEditor::setEntry( const Contact &entry ) { | 1295 | void ContactEditor::setEntry( const OContact &entry ) { |
1296 | 1296 | ||
1297 | cleanupFields(); | 1297 | cleanupFields(); |
1298 | 1298 | ||
1299 | 1299 | ||
1300 | ent = entry; | 1300 | ent = entry; |
1301 | 1301 | ||
1302 | useFullName = FALSE; | 1302 | useFullName = FALSE; |
1303 | txtFirstName->setText( ent.firstName() ); | 1303 | txtFirstName->setText( ent.firstName() ); |
1304 | txtMiddleName->setText( ent.middleName() ); | 1304 | txtMiddleName->setText( ent.middleName() ); |
1305 | txtLastName->setText( ent.lastName() ); | 1305 | txtLastName->setText( ent.lastName() ); |
1306 | txtSuffix->setText( ent.suffix() ); | 1306 | txtSuffix->setText( ent.suffix() ); |
1307 | 1307 | ||
1308 | QString *tmpString = new QString; | 1308 | QString *tmpString = new QString; |
1309 | *tmpString = ent.firstName() + " " + ent.middleName() + | 1309 | *tmpString = ent.firstName() + " " + ent.middleName() + |
1310 | + " " + ent.lastName() + " " + ent.suffix(); | 1310 | + " " + ent.lastName() + " " + ent.suffix(); |
1311 | 1311 | ||
1312 | txtFullName->setText( tmpString->simplifyWhiteSpace() ); | 1312 | txtFullName->setText( tmpString->simplifyWhiteSpace() ); |
1313 | 1313 | ||
1314 | cmbFileAs->setEditText( ent.fileAs() ); | 1314 | cmbFileAs->setEditText( ent.fileAs() ); |
1315 | 1315 | ||
1316 | if (hasTitle) | 1316 | if (hasTitle) |
1317 | txtJobTitle->setText( ent.jobTitle() ); | 1317 | txtJobTitle->setText( ent.jobTitle() ); |
1318 | 1318 | ||
1319 | if (hasCompany) | 1319 | if (hasCompany) |