author | kergoth <kergoth> | 2002-06-07 18:53:14 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-06-07 18:53:14 (UTC) |
commit | 640d964cfdc7467f6cacb513087cd3acda2c04f0 (patch) (unidiff) | |
tree | 9a784686c1795f8b1f81eb344598f3b549d43467 /examples/qpepim-addressbook/addressbookdumper.cpp | |
parent | dfb9c76738bb68e235114c5ad43dbd26a59b98ab (diff) | |
download | opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.zip opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.tar.gz opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.tar.bz2 |
Backing out unintentional merge from TT branch.
Diffstat (limited to 'examples/qpepim-addressbook/addressbookdumper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | examples/qpepim-addressbook/addressbookdumper.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/examples/qpepim-addressbook/addressbookdumper.cpp b/examples/qpepim-addressbook/addressbookdumper.cpp deleted file mode 100644 index c47e05c..0000000 --- a/examples/qpepim-addressbook/addressbookdumper.cpp +++ b/dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia 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 | ||
9 | ** packaging 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 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include <qpe/contact.h> | ||
22 | #include <qvaluelist.h> | ||
23 | #include "addressbookdumper.h" | ||
24 | |||
25 | AddressBookDumper::AddressBookDumper(QWidget* parent) : QMultiLineEdit(parent) { | ||
26 | // connect(&m_ABAccess, SIGNAL(addressbookUpdated()), this, SLOT(abChanged())); | ||
27 | } | ||
28 | |||
29 | AddressBookDumper::~AddressBookDumper() { | ||
30 | } | ||
31 | |||
32 | void AddressBookDumper::abChanged() { | ||
33 | QString newText; | ||
34 | QValueList<Contact> contacts = m_ABAccess.contacts(); | ||
35 | QValueListConstIterator<Contact> it; | ||
36 | for (it = contacts.begin() ; it != contacts.end(); it++) { | ||
37 | newText.append((*it).firstName() + " " + (*it).lastName() + "\n"); | ||
38 | } | ||
39 | setText(newText); | ||
40 | } | ||
41 | |||
42 | void AddressBookDumper::startBigEdit() { | ||
43 | if (m_ABAccess.startBlockEdit()) | ||
44 | qDebug("*** Block edit successfully started."); | ||
45 | else | ||
46 | qDebug("*** Block edit start failed."); | ||
47 | } | ||
48 | |||
49 | void AddressBookDumper::endBigEdit() { | ||
50 | if (m_ABAccess.endBlockEdit()) | ||
51 | qDebug("*** Block edit successfully ended."); | ||
52 | else | ||
53 | qDebug("*** Block edit end failed."); | ||
54 | } | ||
55 | |||
56 | void AddressBookDumper::addContact() { | ||
57 | Contact foo; | ||
58 | foo.setFirstName("Foo"); | ||
59 | foo.setLastName("Bar"); | ||
60 | foo.setFileAs(); | ||
61 | if (m_ABAccess.addContact(foo)) | ||
62 | qDebug("*** Add succeeded.."); | ||
63 | else | ||
64 | qDebug("*** Add failed.."); | ||
65 | } | ||