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 /core/pim/addressbook/addressbook.cpp | |
parent | 9bd38805d22b6687ec8918ab1f581b2a28ba637a (diff) | |
download | opie-91398d550495cb82445457b59e472a58ad0a296a.zip opie-91398d550495cb82445457b59e472a58ad0a296a.tar.gz opie-91398d550495cb82445457b59e472a58ad0a296a.tar.bz2 |
added import vcard menu entry
Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 19 |
1 files changed, 19 insertions, 0 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 @@ #include "contacteditor.h" #include "ablabel.h" #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> #ifndef MAKE_FOR_SHARP_ROM #include <qpe/finddialog.h> @@ -162,12 +165,20 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, a->addTo( edit ); a->addTo( listTools ); } 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 ); @@ -274,12 +285,20 @@ void AddressbookWindow::slotSetFont( int size ) { abList->resizeRows(currentFont->pixelSize() + 7); break; } } + +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; QValueList<Contact> cl = Contact::readVCard( filename ); for( QValueList<Contact>::Iterator it = cl.begin(); it != cl.end(); ++it ) { |