author | llornkcor <llornkcor> | 2002-06-05 18:33:09 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-05 18:33:09 (UTC) |
commit | 91398d550495cb82445457b59e472a58ad0a296a (patch) (side-by-side diff) | |
tree | 946605431ce9f600ae496c807126c281848a83b4 | |
parent | 9bd38805d22b6687ec8918ab1f581b2a28ba637a (diff) | |
download | opie-91398d550495cb82445457b59e472a58ad0a296a.zip opie-91398d550495cb82445457b59e472a58ad0a296a.tar.gz opie-91398d550495cb82445457b59e472a58ad0a296a.tar.bz2 |
added import vcard menu entry
-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 @@ #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> @@ -165,6 +168,14 @@ 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() ) ); @@ -277,6 +288,14 @@ 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 @@ -59,6 +59,7 @@ public slots: void setDocument( const QString & ); private slots: + void importvCard(); void slotListNew(); void slotListView(); 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 TARGET = addressbook INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopie TRANSLATIONS = ../../i18n/pt_BR/addressbook.ts TRANSLATIONS += ../../i18n/de/addressbook.ts |