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 | |||
@@ -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; |