-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 | |||
@@ -26,6 +26,9 @@ | |||
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> |
@@ -165,6 +168,14 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | |||
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() ) ); |
@@ -277,6 +288,14 @@ void AddressbookWindow::slotSetFont( int size ) { | |||
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; |
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 | |||
@@ -59,6 +59,7 @@ public slots: | |||
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(); |
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 | |||
@@ -19,7 +19,7 @@ INTERFACES = addresssettingsbase.ui | |||
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 |