• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kmobiletools

popupaddressee.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002    Copyright (C) 2007
00003    by Marco Gulino <marco@kmobiletools.org>
00004 
00005    This program is free software; you can redistribute it and/or modify
00006    it under the terms of the GNU General Public License as published by
00007    the Free Software Foundation; either version 2 of the License, or
00008    (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the
00017    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019  ***************************************************************************/
00020 #include "popupaddressee.h"
00021 #include "popupnumber.h"
00022 #include <kicon.h>
00023 #include <kdebug.h>
00024 #include <klocale.h>
00025 
00026 popupAddressee::popupAddressee(const QString &deviceName, const KABC::Addressee &_addressee, QWidget *parent, bool ro)
00027  : KMenu(parent), addressee(_addressee)
00028 {
00029     setObjectName(deviceName);
00030     if(addressee.isEmpty()) return;
00031     addTitle( KIcon( "x-office-contact" ), addressee.formattedName() );
00032     if(!ro) {
00033         addAction( KIcon("document-properties"), i18n("Edit"), this, SLOT(slotEdit()));
00034         addAction( KIcon("edit-delete"), i18n("Delete"), this, SLOT(slotDelete()));
00035     }
00036     KABC::PhoneNumber::List::Iterator it;
00037     KABC::PhoneNumber::List p_list=addressee.phoneNumbers();
00038     QMenu *curmenu;
00039     for( it=p_list.begin(); it!=p_list.end() ;++it )
00040     {
00041         curmenu=new popupNumber( objectName(), (*it).number(), this );
00042         curmenu->setTitle((*it).number() );
00043         addMenu(curmenu );
00044     }
00045 }
00046 
00047 
00048 popupAddressee::~popupAddressee()
00049 {
00050 }
00051 
00052 
00053 #include "popupaddressee.moc"
00054 
00055 
00056 void popupAddressee::slotEdit()
00057 {
00058     emit editClicked( addressee );
00059 }
00060 
00061 void popupAddressee::slotDelete()
00062 {
00063     emit delContact();
00064 }
00065 

kmobiletools

Skip menu "kmobiletools"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal