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

akonadi

  • akonadi
  • calendar
calendarbase_p.h
1 /*
2  Copyright (c) 2011-2012 Sérgio Martins <iamsergio@gmail.com>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef AKONADI_CALENDARBASE_P_H
21 #define AKONADI_CALENDARBASE_P_H
22 
23 #include "calendarbase.h"
24 #include "incidencechanger.h"
25 
26 #include <QVector>
27 #include <QMultiHash>
28 
29 class KJob;
30 
31 namespace Akonadi {
32 
33 class CalendarBasePrivate : public QObject
34 {
35  Q_OBJECT
36 public:
37 
38  explicit CalendarBasePrivate( CalendarBase *qq );
39  ~CalendarBasePrivate();
40 
41  void internalInsert( const Akonadi::Item &item );
42  void internalRemove( const Akonadi::Item &item );
43 
44  void deleteAllIncidencesOfType( const QString &mimeType );
45 
46  void handleUidChange( const Akonadi::Item &oldItem, const Akonadi::Item &newItem, const QString &newUid );
47 
48  // Checks if parent changed and adjust internal hierarchy info
49  void handleParentChanged(const KCalCore::Incidence::Ptr &incidence );
50 
51 public Q_SLOTS:
52  void slotDeleteFinished( int changeId,
53  const QVector<Akonadi::Item::Id> &,
54  Akonadi::IncidenceChanger::ResultCode,
55  const QString &errorMessage );
56 
57  void slotCreateFinished( int changeId,
58  const Akonadi::Item &,
59  Akonadi::IncidenceChanger::ResultCode,
60  const QString &errorMessage );
61 
62  void slotModifyFinished( int changeId,
63  const Akonadi::Item &,
64  Akonadi::IncidenceChanger::ResultCode,
65  const QString &errorMessage );
66 
67 public:
68  QMultiHash<Akonadi::Collection::Id, Akonadi::Item> mItemsByCollection;
69  QHash<QString,Akonadi::Item::Id> mItemIdByUid;
70  QHash<Akonadi::Item::Id, Akonadi::Item> mItemById;
71  Akonadi::IncidenceChanger *mIncidenceChanger;
72  QHash<QString,QStringList> mParentUidToChildrenUid;
73  QWeakPointer<CalendarBase> mWeakPointer;
74  Akonadi::Collection mCollectionForBatchInsertion;
75  bool mBatchInsertionCancelled;
76  bool mListensForNewItems; // does this model detect new item creations ?
77 
78  // Hash with uid->parentUid. When receiving onDataChanged() we need a way
79  // to obtain the original RELATED-TO. Because RELATED-TO might have been modified
80  // we can't trust the incidence stored in the calendar. ( Users of this class don't
81  // operate on a incidence clone, they change the same incidence that's inside the calendar )
82  QHash<QString,QString> mUidToParent;
83 
84 private:
85  CalendarBase *const q;
86 };
87 
88 }
89 
90 #endif
Akonadi::Collection
Represents a collection of PIM items.
Definition: collection.h:75
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:15 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.11.3 API Reference

Skip menu "kdepimlibs-4.11.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • 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