• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.9.1 API Reference
  • KDE Home
  • Contact Us
 

akonadi/contact

  • akonadi
  • contact
standardcontactactionmanager.cpp
1 /*
2  This file is part of Akonadi Contact.
3 
4  Copyright (c) 2009 - 2010 Tobias Koenig <tokoe@kde.org>
5 
6  This library is free software; you can redistribute it and/or modify it
7  under the terms of the GNU Library General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or (at your
9  option) any later version.
10 
11  This library is distributed in the hope that it will be useful, but WITHOUT
12  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14  License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to the
18  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  02110-1301, USA.
20 */
21 
22 #include "standardcontactactionmanager.h"
23 
24 #include "contacteditordialog.h"
25 #include "contactgroupeditordialog.h"
26 
27 #include <akonadi/entitytreemodel.h>
28 #include <akonadi/mimetypechecker.h>
29 #include <kabc/addressee.h>
30 #include <kabc/contactgroup.h>
31 #include <kaction.h>
32 #include <kactioncollection.h>
33 #include <klocale.h>
34 #include <kmessagebox.h>
35 
36 #include <QtCore/QPointer>
37 #include <QtGui/QItemSelectionModel>
38 
39 using namespace Akonadi;
40 
41 class StandardContactActionManager::Private
42 {
43  public:
44  Private( KActionCollection *actionCollection, QWidget *parentWidget, StandardContactActionManager *parent )
45  : mActionCollection( actionCollection ), mParentWidget( parentWidget ),
46  mCollectionSelectionModel( 0 ), mItemSelectionModel( 0 ), mParent( parent )
47  {
48  mGenericManager = new StandardActionManager( actionCollection, parentWidget );
49  mParent->connect( mGenericManager, SIGNAL(actionStateUpdated()),
50  mParent, SIGNAL(actionStateUpdated()) );
51  mGenericManager->createAllActions();
52 
53  mGenericManager->action( Akonadi::StandardActionManager::CreateCollection )->setText(
54  i18n( "Add Address Book Folder..." ) );
55  mGenericManager->action( Akonadi::StandardActionManager::CreateCollection )->setWhatsThis(
56  i18n( "Add a new address book folder to the currently selected address book folder." ) );
57 
58  mGenericManager->setActionText( Akonadi::StandardActionManager::CopyCollections,
59  ki18np( "Copy Address Book Folder",
60  "Copy %1 Address Book Folders" ) );
61  mGenericManager->action( Akonadi::StandardActionManager::CopyCollections )->setWhatsThis(
62  i18n( "Copy the selected address book folders to the clipboard." ) );
63 
64  mGenericManager->setActionText( Akonadi::StandardActionManager::DeleteCollections,
65  ki18np( "Delete Address Book Folder",
66  "Delete %1 Address Book Folders" ) );
67  mGenericManager->action( Akonadi::StandardActionManager::DeleteCollections )->setWhatsThis(
68  i18n( "Delete the selected address book folders from the address book." ) );
69 
70  mGenericManager->setActionText( Akonadi::StandardActionManager::SynchronizeCollections,
71  ki18np( "Update Address Book Folder",
72  "Update %1 Address Book Folders" ) );
73  mGenericManager->action( Akonadi::StandardActionManager::SynchronizeCollections )->setWhatsThis(
74  i18n( "Update the content of the selected address book folders." ) );
75 
76  mGenericManager->setActionText( Akonadi::StandardActionManager::CutCollections,
77  ki18np( "Cut Address Book Folder",
78  "Cut %1 Address Book Folders" ) );
79  mGenericManager->action( Akonadi::StandardActionManager::CutCollections )->setWhatsThis(
80  i18n( "Cut the selected address book folders from the address book." ) );
81 
82  mGenericManager->action( Akonadi::StandardActionManager::CollectionProperties )->setText(
83  i18n( "Folder Properties..." ) );
84  mGenericManager->action( Akonadi::StandardActionManager::CollectionProperties)->setWhatsThis(
85  i18n( "Open a dialog to edit the properties of the selected address book folder." ) );
86 
87  mGenericManager->setActionText( Akonadi::StandardActionManager::CopyItems,
88  ki18np( "Copy Contact", "Copy %1 Contacts" ) );
89  mGenericManager->action( Akonadi::StandardActionManager::CopyItems )->setWhatsThis(
90  i18n( "Copy the selected contacts to the clipboard." ) );
91 
92  mGenericManager->setActionText( Akonadi::StandardActionManager::DeleteItems,
93  ki18np( "Delete Contact", "Delete %1 Contacts" ) );
94  mGenericManager->action( Akonadi::StandardActionManager::DeleteItems )->setWhatsThis(
95  i18n( "Delete the selected contacts from the address book." ) );
96 
97  mGenericManager->setActionText( Akonadi::StandardActionManager::CutItems,
98  ki18np( "Cut Contact", "Cut %1 Contacts" ) );
99  mGenericManager->action( Akonadi::StandardActionManager::CutItems )->setWhatsThis(
100  i18n( "Cut the selected contacts from the address book." ) );
101 
102  mGenericManager->action( Akonadi::StandardActionManager::CreateResource )->setText(
103  i18n( "Add &Address Book..." ) );
104  mGenericManager->action( Akonadi::StandardActionManager::CreateResource )->setWhatsThis(
105  i18n( "Add a new address book<p>"
106  "You will be presented with a dialog where you can select "
107  "the type of the address book that shall be added.</p>" ) );
108 
109  mGenericManager->setActionText( Akonadi::StandardActionManager::DeleteResources,
110  ki18np( "&Delete Address Book",
111  "&Delete %1 Address Books" ) );
112  mGenericManager->action( Akonadi::StandardActionManager::DeleteResources )->setWhatsThis(
113  i18n( "Delete the selected address books<p>"
114  "The currently selected address books will be deleted, "
115  "along with all the contacts and contact groups they contain.</p>" ) );
116 
117  mGenericManager->action( Akonadi::StandardActionManager::ResourceProperties )->setText(
118  i18n( "Address Book Properties..." ) );
119  mGenericManager->action( Akonadi::StandardActionManager::ResourceProperties )->setWhatsThis(
120  i18n( "Open a dialog to edit properties of the selected address book." ) );
121 
122  mGenericManager->setActionText( Akonadi::StandardActionManager::SynchronizeResources,
123  ki18np( "Update Address Book",
124  "Update %1 Address Books" ) );
125 
126  mGenericManager->action( Akonadi::StandardActionManager::SynchronizeResources )->setWhatsThis
127  ( i18n( "Updates the content of all folders of the selected address books." ) );
128 
129  mGenericManager->setContextText(
130  StandardActionManager::CreateCollection, StandardActionManager::DialogTitle,
131  i18nc( "@title:window", "New Address Book Folder" ) );
132 
133  mGenericManager->setContextText(
134  StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageText,
135  ki18n( "Could not create address book folder: %1" ) );
136 
137  mGenericManager->setContextText(
138  StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageTitle,
139  i18n( "Address book folder creation failed" ) );
140 
141  mGenericManager->setContextText(
142  StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxText,
143  ki18np( "Do you really want to delete this address book folder and all its sub-folders?",
144  "Do you really want to delete %1 address book folders and all their sub-folders?" ) );
145  mGenericManager->setContextText(
146  StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxTitle,
147  ki18ncp( "@title:window", "Delete address book folder?", "Delete address book folders?" ) );
148 
149  mGenericManager->setContextText(
150  StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageText,
151  ki18n( "Could not delete address book folder: %1" ) );
152 
153  mGenericManager->setContextText(
154  StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageTitle,
155  i18n( "Address book folder deletion failed" ) );
156 
157  mGenericManager->setContextText(
158  StandardActionManager::CollectionProperties, StandardActionManager::DialogTitle,
159  ki18nc( "@title:window", "Properties of Address Book Folder %1" ) );
160 
161  mGenericManager->setContextText(
162  StandardActionManager::DeleteItems, StandardActionManager::MessageBoxText,
163  ki18np( "Do you really want to delete the selected contact?",
164  "Do you really want to delete %1 contacts?" ) );
165 
166  mGenericManager->setContextText(
167  StandardActionManager::DeleteItems, StandardActionManager::MessageBoxTitle,
168  ki18ncp( "@title:window", "Delete Contact?", "Delete Contacts?" ) );
169 
170  mGenericManager->setContextText(
171  StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageText,
172  ki18n( "Could not delete contact: %1" ) );
173 
174  mGenericManager->setContextText(
175  StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageTitle,
176  i18n( "Contact deletion failed" ) );
177 
178  mGenericManager->setContextText(
179  StandardActionManager::CreateResource, StandardActionManager::DialogTitle,
180  i18nc( "@title:window", "Add Address Book" ) );
181 
182  mGenericManager->setContextText(
183  StandardActionManager::CreateResource, StandardActionManager::ErrorMessageText,
184  ki18n( "Could not create address book: %1" ) );
185 
186  mGenericManager->setContextText(
187  StandardActionManager::CreateResource, StandardActionManager::ErrorMessageTitle,
188  i18n( "Address book creation failed" ) );
189 
190  mGenericManager->setContextText(
191  StandardActionManager::DeleteResources, StandardActionManager::MessageBoxText,
192  ki18np( "Do you really want to delete this address book?",
193  "Do you really want to delete %1 address books?" ) );
194 
195  mGenericManager->setContextText(
196  StandardActionManager::DeleteResources, StandardActionManager::MessageBoxTitle,
197  ki18ncp( "@title:window", "Delete Address Book?", "Delete Address Books?" ) );
198 
199  mGenericManager->setContextText(
200  StandardActionManager::Paste, StandardActionManager::ErrorMessageText,
201  ki18n( "Could not paste contact: %1" ) );
202 
203  mGenericManager->setContextText(
204  StandardActionManager::Paste, StandardActionManager::ErrorMessageTitle,
205  i18n( "Paste failed" ) );
206 
207  mGenericManager->setMimeTypeFilter(
208  QStringList() << KABC::Addressee::mimeType() << KABC::ContactGroup::mimeType() );
209 
210  mGenericManager->setCapabilityFilter( QStringList() << QLatin1String( "Resource" ) );
211  }
212 
213  ~Private()
214  {
215  delete mGenericManager;
216  }
217 
218  static bool hasWritableCollection( const QModelIndex &index, const QString &mimeType )
219  {
220  const Akonadi::Collection collection =
221  index.data( Akonadi::EntityTreeModel::CollectionRole ).value<Akonadi::Collection>();
222  if ( collection.isValid() ) {
223  if ( collection.contentMimeTypes().contains( mimeType ) &&
224  ( collection.rights() & Akonadi::Collection::CanCreateItem ) ) {
225  return true;
226  }
227  }
228 
229  const QAbstractItemModel *model = index.model();
230  if ( !model )
231  return false;
232 
233  for ( int row = 0; row < model->rowCount( index ); ++row ) {
234  if ( hasWritableCollection( model->index( row, 0, index ), mimeType ) )
235  return true;
236  }
237 
238  return false;
239  }
240 
241  bool hasWritableCollection( const QString &mimeType ) const
242  {
243  if ( !mCollectionSelectionModel )
244  return false;
245 
246  const QAbstractItemModel *collectionModel = mCollectionSelectionModel->model();
247  for ( int row = 0; row < collectionModel->rowCount(); ++row ) {
248  if ( hasWritableCollection( collectionModel->index( row, 0, QModelIndex() ), mimeType ) )
249  return true;
250  }
251 
252  return false;
253  }
254 
255  void updateActions()
256  {
257  int itemCount = 0;
258  if ( mItemSelectionModel ) {
259  itemCount = mItemSelectionModel->selectedRows().count();
260  if ( itemCount == 1 ) {
261  const QModelIndex index = mItemSelectionModel->selectedRows().first();
262  if ( index.isValid() ) {
263  const QString mimeType = index.data( EntityTreeModel::MimeTypeRole ).toString();
264  if ( mimeType == KABC::Addressee::mimeType() ) {
265  mGenericManager->setActionText( Akonadi::StandardActionManager::CopyItems,
266  ki18np( "Copy Contact", "Copy %1 Contacts" ) );
267  mGenericManager->action( Akonadi::StandardActionManager::CopyItemToMenu )->setText( i18n( "Copy Contact To" ) );
268  mGenericManager->action( Akonadi::StandardActionManager::CopyItemToDialog )->setText( i18n( "Copy Contact To" ) );
269  mGenericManager->setActionText( Akonadi::StandardActionManager::DeleteItems,
270  ki18np( "Delete Contact", "Delete %1 Contacts" ) );
271  mGenericManager->setActionText( Akonadi::StandardActionManager::CutItems,
272  ki18np( "Cut Contact", "Cut %1 Contacts" ) );
273  mGenericManager->action( Akonadi::StandardActionManager::MoveItemToMenu )->setText( i18n( "Move Contact To" ) );
274  mGenericManager->action( Akonadi::StandardActionManager::MoveItemToDialog )->setText( i18n( "Move Contact To" ) );
275  if ( mActions.contains( StandardContactActionManager::EditItem ) )
276  mActions.value( StandardContactActionManager::EditItem )->setText( i18n( "Edit Contact..." ) );
277  } else if ( mimeType == KABC::ContactGroup::mimeType() ) {
278  mGenericManager->setActionText( Akonadi::StandardActionManager::CopyItems,
279  ki18np( "Copy Group", "Copy %1 Groups" ) );
280  mGenericManager->action( Akonadi::StandardActionManager::CopyItemToMenu )->setText( i18n( "Copy Group To" ) );
281  mGenericManager->action( Akonadi::StandardActionManager::CopyItemToDialog )->setText( i18n( "Copy Group To" ) );
282  mGenericManager->setActionText( Akonadi::StandardActionManager::DeleteItems,
283  ki18np( "Delete Group", "Delete %1 Groups" ) );
284  mGenericManager->setActionText( Akonadi::StandardActionManager::CutItems,
285  ki18np( "Cut Group", "Cut %1 Groups" ) );
286  mGenericManager->action( Akonadi::StandardActionManager::MoveItemToMenu )->setText( i18n( "Move Group To" ) );
287  mGenericManager->action( Akonadi::StandardActionManager::MoveItemToDialog )->setText( i18n( "Move Group To" ) );
288  if ( mActions.contains( StandardContactActionManager::EditItem ) )
289  mActions.value( StandardContactActionManager::EditItem )->setText( i18n( "Edit Group..." ) );
290  }
291  }
292  }
293  }
294 
295  if ( mActions.contains( StandardContactActionManager::CreateContact ) )
296  mActions[ StandardContactActionManager::CreateContact ]->setEnabled( hasWritableCollection( KABC::Addressee::mimeType() ) );
297  if ( mActions.contains( StandardContactActionManager::CreateContactGroup ) )
298  mActions[ StandardContactActionManager::CreateContactGroup ]->setEnabled( hasWritableCollection( KABC::ContactGroup::mimeType() ) );
299 
300  if ( mActions.contains( StandardContactActionManager::EditItem ) ) {
301  bool canEditItem = true;
302 
303  // only one selected item can be edited
304  canEditItem = canEditItem && (itemCount == 1);
305 
306  // check whether parent collection allows changing the item
307  const QModelIndexList rows = mItemSelectionModel->selectedRows();
308  if ( rows.count() == 1 ) {
309  const QModelIndex index = rows.first();
310  const Collection parentCollection = index.data( EntityTreeModel::ParentCollectionRole ).value<Collection>();
311  if ( parentCollection.isValid() )
312  canEditItem = canEditItem && (parentCollection.rights() & Collection::CanChangeItem);
313  }
314 
315  mActions.value( StandardContactActionManager::EditItem )->setEnabled( canEditItem );
316  }
317 
318  emit mParent->actionStateUpdated();
319  }
320 
321  Collection selectedCollection() const
322  {
323  if ( !mCollectionSelectionModel )
324  return Collection();
325 
326  if ( mCollectionSelectionModel->selectedIndexes().isEmpty() )
327  return Collection();
328 
329  const QModelIndex index = mCollectionSelectionModel->selectedIndexes().first();
330  if ( !index.isValid() )
331  return Collection();
332 
333  return index.data( EntityTreeModel::CollectionRole).value<Collection>();
334  }
335 
336  void slotCreateContact()
337  {
338  if ( mInterceptedActions.contains( StandardContactActionManager::CreateContact ) )
339  return;
340 
341  Akonadi::ContactEditorDialog dlg( Akonadi::ContactEditorDialog::CreateMode, mParentWidget );
342  dlg.setDefaultAddressBook( selectedCollection() );
343 
344  dlg.exec();
345  }
346 
347  void slotCreateContactGroup()
348  {
349  if ( mInterceptedActions.contains( StandardContactActionManager::CreateContactGroup ) )
350  return;
351 
352  Akonadi::ContactGroupEditorDialog dlg( Akonadi::ContactGroupEditorDialog::CreateMode, mParentWidget );
353  dlg.setDefaultAddressBook( selectedCollection() );
354 
355  dlg.exec();
356  }
357 
358  void slotEditItem()
359  {
360  if ( mInterceptedActions.contains( StandardContactActionManager::EditItem ) )
361  return;
362 
363  if ( !mItemSelectionModel )
364  return;
365 
366  if ( mItemSelectionModel->selectedIndexes().isEmpty() )
367  return;
368 
369  const QModelIndex index = mItemSelectionModel->selectedIndexes().first();
370  if ( !index.isValid() )
371  return;
372 
373  const Item item = index.data( EntityTreeModel::ItemRole ).value<Item>();
374  if ( !item.isValid() )
375  return;
376 
377  if ( Akonadi::MimeTypeChecker::isWantedItem( item, KABC::Addressee::mimeType() ) ) {
378  Akonadi::ContactEditorDialog dlg( Akonadi::ContactEditorDialog::EditMode, mParentWidget );
379  dlg.setContact( item );
380  dlg.exec();
381  }
382  else if ( Akonadi::MimeTypeChecker::isWantedItem( item, KABC::ContactGroup::mimeType() ) ) {
383  Akonadi::ContactGroupEditorDialog dlg( Akonadi::ContactGroupEditorDialog::EditMode, mParentWidget );
384  dlg.setContactGroup( item );
385  dlg.exec();
386  }
387  }
388 
389  KActionCollection *mActionCollection;
390  QWidget *mParentWidget;
391  StandardActionManager *mGenericManager;
392  QItemSelectionModel *mCollectionSelectionModel;
393  QItemSelectionModel *mItemSelectionModel;
394  QHash<StandardContactActionManager::Type, KAction*> mActions;
395  QSet<StandardContactActionManager::Type> mInterceptedActions;
396  StandardContactActionManager *mParent;
397 };
398 
399 StandardContactActionManager::StandardContactActionManager( KActionCollection *actionCollection, QWidget *parent )
400  : QObject( parent ), d( new Private( actionCollection, parent, this ) )
401 {
402 }
403 
404 StandardContactActionManager::~StandardContactActionManager()
405 {
406  delete d;
407 }
408 
409 void StandardContactActionManager::setCollectionSelectionModel( QItemSelectionModel *selectionModel )
410 {
411  d->mCollectionSelectionModel = selectionModel;
412  d->mGenericManager->setCollectionSelectionModel( selectionModel );
413 
414  connect( selectionModel->model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
415  SLOT(updateActions()) );
416  connect( selectionModel->model(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
417  SLOT(updateActions()) );
418  connect( selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
419  SLOT(updateActions()) );
420 
421  d->updateActions();
422 }
423 
424 void StandardContactActionManager::setItemSelectionModel( QItemSelectionModel* selectionModel )
425 {
426  d->mItemSelectionModel = selectionModel;
427  d->mGenericManager->setItemSelectionModel( selectionModel );
428 
429  connect( selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
430  SLOT(updateActions()) );
431 
432  d->updateActions();
433 }
434 
435 KAction* StandardContactActionManager::createAction( Type type )
436 {
437  if ( d->mActions.contains( type ) )
438  return d->mActions.value( type );
439 
440  KAction *action = 0;
441 
442  switch ( type ) {
443  case CreateContact:
444  action = new KAction( d->mParentWidget );
445  action->setIcon( KIcon( QLatin1String( "contact-new" ) ) );
446  action->setText( i18n( "New &Contact..." ) );
447  action->setShortcut( QKeySequence( Qt::CTRL + Qt::Key_N ) );
448  action->setWhatsThis( i18n( "Create a new contact<p>You will be presented with a dialog where you can add data about a person, including addresses and phone numbers.</p>" ) );
449  d->mActions.insert( CreateContact, action );
450  d->mActionCollection->addAction( QString::fromLatin1( "akonadi_contact_create" ), action );
451  connect( action, SIGNAL(triggered(bool)), this, SLOT(slotCreateContact()) );
452  break;
453  case CreateContactGroup:
454  action = new KAction( d->mParentWidget );
455  action->setIcon( KIcon( QLatin1String( "user-group-new" ) ) );
456  action->setText( i18n( "New &Group..." ) );
457  action->setShortcut( QKeySequence( Qt::CTRL + Qt::Key_G ) );
458  action->setWhatsThis( i18n( "Create a new group<p>You will be presented with a dialog where you can add a new group of contacts.</p>" ) );
459  d->mActions.insert( CreateContactGroup, action );
460  d->mActionCollection->addAction( QString::fromLatin1( "akonadi_contact_group_create" ), action );
461  connect( action, SIGNAL(triggered(bool)), this, SLOT(slotCreateContactGroup()) );
462  break;
463  case EditItem:
464  action = new KAction( d->mParentWidget );
465  action->setIcon( KIcon( QLatin1String( "document-edit" ) ) );
466  action->setText( i18n( "Edit Contact..." ) );
467  action->setWhatsThis( i18n( "Edit the selected contact<p>You will be presented with a dialog where you can edit the data stored about a person, including addresses and phone numbers.</p>" ) );
468  action->setEnabled( false );
469  d->mActions.insert( EditItem, action );
470  d->mActionCollection->addAction( QString::fromLatin1( "akonadi_contact_item_edit" ), action );
471  connect( action, SIGNAL(triggered(bool)), this, SLOT(slotEditItem()) );
472  break;
473  default:
474  Q_ASSERT( false ); // should never happen
475  break;
476  }
477 
478  return action;
479 }
480 
481 KAction* StandardContactActionManager::createAction( StandardActionManager::Type type )
482 {
483  return d->mGenericManager->createAction( type );
484 }
485 
486 void StandardContactActionManager::createAllActions()
487 {
488  createAction( CreateContact );
489  createAction( CreateContactGroup );
490  createAction( EditItem );
491 
492  d->mGenericManager->createAllActions();
493 
494  d->updateActions();
495 }
496 
497 KAction* StandardContactActionManager::action( Type type ) const
498 {
499  if ( d->mActions.contains( type ) )
500  return d->mActions.value( type );
501 
502  return 0;
503 }
504 
505 KAction* StandardContactActionManager::action( StandardActionManager::Type type ) const
506 {
507  return d->mGenericManager->action( type );
508 }
509 
510 void StandardContactActionManager::setActionText( StandardActionManager::Type type, const KLocalizedString &text )
511 {
512  d->mGenericManager->setActionText( type, text );
513 }
514 
515 void StandardContactActionManager::interceptAction( Type type, bool intercept )
516 {
517  if ( intercept )
518  d->mInterceptedActions.insert( type );
519  else
520  d->mInterceptedActions.remove( type );
521 }
522 
523 void StandardContactActionManager::interceptAction( StandardActionManager::Type type, bool intercept )
524 {
525  d->mGenericManager->interceptAction( type, intercept );
526 }
527 
528 Akonadi::Collection::List StandardContactActionManager::selectedCollections() const
529 {
530  return d->mGenericManager->selectedCollections();
531 }
532 
533 Akonadi::Item::List StandardContactActionManager::selectedItems() const
534 {
535  return d->mGenericManager->selectedItems();
536 }
537 
538 
539 void StandardContactActionManager::setCollectionPropertiesPageNames( const QStringList &names )
540 {
541  d->mGenericManager->setCollectionPropertiesPageNames( names );
542 }
543 #include "standardcontactactionmanager.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Sep 24 2012 09:08:06 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi/contact

Skip menu "akonadi/contact"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.9.1 API Reference

Skip menu "kdepimlibs-4.9.1 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal