-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 @@ -25,8 +25,11 @@ #include "abtable.h" #include "addresssettings.h" #include "addressbook.h" + +#include <opie/ofileselector.h> +#include <opie/ofiledialog.h> #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/contact.h> @@ -164,8 +167,16 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, } edit->insertSeparator(); + a = new QAction( tr("Import vCard"), QString::null, 0, 0, 0, TRUE ); + actionPersonal = a; + connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); + a->addTo( edit ); + + + edit->insertSeparator(); + a = new QAction( tr("My Personal Details"), QString::null, 0, 0, 0, TRUE ); actionPersonal = a; connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); a->addTo( edit ); @@ -276,8 +287,16 @@ void AddressbookWindow::slotSetFont( int size ) { } } + +void AddressbookWindow::importvCard() { + QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); + if(!str.isEmpty() ) + setDocument((const QString&) str ); + +} + void AddressbookWindow::setDocument( const QString &filename ) { 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 @@ -58,8 +58,9 @@ public slots: void appMessage(const QCString &, const QByteArray &); void setDocument( const QString & ); private slots: + void importvCard(); void slotListNew(); void slotListView(); void slotListDelete(); void slotViewBack(); 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 @@ -18,9 +18,9 @@ INTERFACES = addresssettingsbase.ui TARGET = addressbook INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopie TRANSLATIONS = ../../i18n/pt_BR/addressbook.ts TRANSLATIONS += ../../i18n/de/addressbook.ts TRANSLATIONS += ../../i18n/en/addressbook.ts |