-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 18 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.h | 4 |
2 files changed, 19 insertions, 3 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 86d1760..e11cf4c 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -132,16 +132,30 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 ); actionTrash = a; connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); a->addTo( edit ); a->addTo( listTools ); + + // make it possible to go directly to businesscard via qcop call +#if defined(Q_WS_QWS) +#if !defined(QT_NO_COP) + QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); + connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), + this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); +#endif +#endif + + + + + #ifndef MAKE_FOR_SHARP_ROM a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), QString::null, 0, this, 0 ); actionFind = a; connect( a, SIGNAL(activated()), this, SLOT(slotFind()) ); a->addTo( edit ); a->addTo( listTools ); #endif @@ -245,16 +259,18 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, slotSetFont(startFontSize); mbList->insertItem( tr("Font"), fontMenu); setCentralWidget(listContainer); // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); } + + void AddressbookWindow::slotSetFont( int size ) { if (size > 2 || size < 0) size = 1; startFontSize = size; QFont *currentFont; @@ -288,17 +304,17 @@ 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; QValueList<Contact> cl = Contact::readVCard( filename ); for( QValueList<Contact>::Iterator it = cl.begin(); it != cl.end(); ++it ) { diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h index da43731..34ca85d 100644 --- a/core/pim/addressbook/addressbook.h +++ b/core/pim/addressbook/addressbook.h @@ -54,17 +54,17 @@ protected: public slots: void flush(); void reload(); void appMessage(const QCString &, const QByteArray &); void setDocument( const QString & ); private slots: - void importvCard(); + void importvCard(); void slotListNew(); void slotListView(); void slotListDelete(); void slotViewBack(); void slotViewEdit(); void slotPersonalView(); void listIsEmpty( bool ); void slotSettings(); @@ -89,17 +89,17 @@ private: QStringList slOrderedFields; enum Panes { paneList=0, paneView, paneEdit }; ContactEditor *abEditor; AbLabel *mView; LetterPicker *pLabel; AbTable *abList; QWidget *listContainer; - QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, + QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail; bool bAbEditFirstTime; int viewMargin; bool syncing; QFont *defaultFont; int startFontSize; |