Diffstat (limited to 'core/pim/osearch/contactitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/osearch/contactitem.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp index 788a415..7d8ecf1 100644 --- a/core/pim/osearch/contactitem.cpp +++ b/core/pim/osearch/contactitem.cpp @@ -34,18 +34,23 @@ QString ContactItem::toRichText() return _contact->toRichText(); } - -void ContactItem::editItem() +void ContactItem::action( int act ) { +if (act == 0){ + QCopEnvelope e("QPE/Application/addressbook", "show(int)"); + e << _contact->uid(); +}else if(act == 1){ QCopEnvelope e("QPE/Application/addressbook", "edit(int)"); -// QCopEnvelope e("QPE/Addressbook", "edit(int)"); e << _contact->uid(); } -void ContactItem::showItem() -{ - QCopEnvelope e("QPE/Application/addressbook", "show(int)"); -// QCopEnvelope e("QPE/Addressbook", "show(int)"); - e << _contact->uid(); } +QIntDict<QString> ContactItem::actions() +{ + QIntDict<QString> result; + result.insert( 0, new QString( QObject::tr("show") ) ); + result.insert( 1, new QString( QObject::tr("edit") ) ); + return result; + +} |