-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 19 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.h | 1 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.pro | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 8229212..86d1760 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -23,12 +23,15 @@ | |||
23 | #include "contacteditor.h" | 23 | #include "contacteditor.h" |
24 | #include "ablabel.h" | 24 | #include "ablabel.h" |
25 | #include "abtable.h" | 25 | #include "abtable.h" |
26 | #include "addresssettings.h" | 26 | #include "addresssettings.h" |
27 | #include "addressbook.h" | 27 | #include "addressbook.h" |
28 | 28 | ||
29 | |||
30 | #include <opie/ofileselector.h> | ||
31 | #include <opie/ofiledialog.h> | ||
29 | #include <qpe/qpeapplication.h> | 32 | #include <qpe/qpeapplication.h> |
30 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
31 | #include <qpe/contact.h> | 34 | #include <qpe/contact.h> |
32 | 35 | ||
33 | #ifndef MAKE_FOR_SHARP_ROM | 36 | #ifndef MAKE_FOR_SHARP_ROM |
34 | #include <qpe/finddialog.h> | 37 | #include <qpe/finddialog.h> |
@@ -162,12 +165,20 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | |||
162 | a->addTo( edit ); | 165 | a->addTo( edit ); |
163 | a->addTo( listTools ); | 166 | a->addTo( listTools ); |
164 | } | 167 | } |
165 | 168 | ||
166 | edit->insertSeparator(); | 169 | edit->insertSeparator(); |
167 | 170 | ||
171 | a = new QAction( tr("Import vCard"), QString::null, 0, 0, 0, TRUE ); | ||
172 | actionPersonal = a; | ||
173 | connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); | ||
174 | a->addTo( edit ); | ||
175 | |||
176 | |||
177 | edit->insertSeparator(); | ||
178 | |||
168 | a = new QAction( tr("My Personal Details"), QString::null, 0, 0, 0, TRUE ); | 179 | a = new QAction( tr("My Personal Details"), QString::null, 0, 0, 0, TRUE ); |
169 | actionPersonal = a; | 180 | actionPersonal = a; |
170 | connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); | 181 | connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); |
171 | a->addTo( edit ); | 182 | a->addTo( edit ); |
172 | 183 | ||
173 | 184 | ||
@@ -274,12 +285,20 @@ void AddressbookWindow::slotSetFont( int size ) { | |||
274 | abList->resizeRows(currentFont->pixelSize() + 7); | 285 | abList->resizeRows(currentFont->pixelSize() + 7); |
275 | break; | 286 | break; |
276 | } | 287 | } |
277 | } | 288 | } |
278 | 289 | ||
279 | 290 | ||
291 | |||
292 | void AddressbookWindow::importvCard() { | ||
293 | QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); | ||
294 | if(!str.isEmpty() ) | ||
295 | setDocument((const QString&) str ); | ||
296 | |||
297 | } | ||
298 | |||
280 | void AddressbookWindow::setDocument( const QString &filename ) | 299 | void AddressbookWindow::setDocument( const QString &filename ) |
281 | { | 300 | { |
282 | if ( filename.find(".vcf") != int(filename.length()) - 4 ) return; | 301 | if ( filename.find(".vcf") != int(filename.length()) - 4 ) return; |
283 | 302 | ||
284 | QValueList<Contact> cl = Contact::readVCard( filename ); | 303 | QValueList<Contact> cl = Contact::readVCard( filename ); |
285 | for( QValueList<Contact>::Iterator it = cl.begin(); it != cl.end(); ++it ) { | 304 | for( QValueList<Contact>::Iterator it = cl.begin(); it != cl.end(); ++it ) { |
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h index 476c971..da43731 100644 --- a/core/pim/addressbook/addressbook.h +++ b/core/pim/addressbook/addressbook.h | |||
@@ -56,12 +56,13 @@ public slots: | |||
56 | void flush(); | 56 | void flush(); |
57 | void reload(); | 57 | void reload(); |
58 | void appMessage(const QCString &, const QByteArray &); | 58 | void appMessage(const QCString &, const QByteArray &); |
59 | void setDocument( const QString & ); | 59 | void setDocument( const QString & ); |
60 | 60 | ||
61 | private slots: | 61 | private slots: |
62 | void importvCard(); | ||
62 | void slotListNew(); | 63 | void slotListNew(); |
63 | void slotListView(); | 64 | void slotListView(); |
64 | void slotListDelete(); | 65 | void slotListDelete(); |
65 | void slotViewBack(); | 66 | void slotViewBack(); |
66 | void slotViewEdit(); | 67 | void slotViewEdit(); |
67 | void slotPersonalView(); | 68 | void slotPersonalView(); |
diff --git a/core/pim/addressbook/addressbook.pro b/core/pim/addressbook/addressbook.pro index 0d65c74..428af2b 100644 --- a/core/pim/addressbook/addressbook.pro +++ b/core/pim/addressbook/addressbook.pro | |||
@@ -16,13 +16,13 @@ SOURCES = main.cpp \ | |||
16 | picker.cpp | 16 | picker.cpp |
17 | INTERFACES= addresssettingsbase.ui | 17 | INTERFACES= addresssettingsbase.ui |
18 | 18 | ||
19 | TARGET = addressbook | 19 | TARGET = addressbook |
20 | INCLUDEPATH += $(OPIEDIR)/include | 20 | INCLUDEPATH += $(OPIEDIR)/include |
21 | DEPENDPATH+= $(OPIEDIR)/include | 21 | DEPENDPATH+= $(OPIEDIR)/include |
22 | LIBS += -lqpe | 22 | LIBS += -lqpe -lopie |
23 | 23 | ||
24 | TRANSLATIONS = ../../i18n/pt_BR/addressbook.ts | 24 | TRANSLATIONS = ../../i18n/pt_BR/addressbook.ts |
25 | TRANSLATIONS += ../../i18n/de/addressbook.ts | 25 | TRANSLATIONS += ../../i18n/de/addressbook.ts |
26 | TRANSLATIONS += ../../i18n/en/addressbook.ts | 26 | TRANSLATIONS += ../../i18n/en/addressbook.ts |
27 | TRANSLATIONS += ../../i18n/hu/addressbook.ts | 27 | TRANSLATIONS += ../../i18n/hu/addressbook.ts |
28 | TRANSLATIONS += ../../i18n/sl/addressbook.ts | 28 | TRANSLATIONS += ../../i18n/sl/addressbook.ts |