20 #ifndef AKONADI_COLLECTIONMODEL_P_H
21 #define AKONADI_COLLECTIONMODEL_P_H
23 #include "collection.h"
25 #include <klocalizedstring.h>
27 #include <QtCore/QHash>
28 #include <QtCore/QList>
29 #include <QtCore/QModelIndex>
30 #include <QtCore/QStringList>
36 class CollectionModel;
37 class CollectionStatistics;
49 : q_ptr( parent ), monitor( 0 ), session( 0 ), fetchStatistics(
false ), unsubscribed(
false ),
50 headerContent( i18nc(
"@title:column, name of a thing",
"Name" ) )
57 QHash<Collection::Id, Collection> collections;
58 QHash<Collection::Id, QVector<Collection::Id> > childCollections;
60 QHash<Collection::Id, Collection> m_newCollections;
61 QHash< Collection::Id, QVector<Collection::Id> > m_newChildCollections;
65 QStringList mimeTypes;
68 QString headerContent;
71 void startFirstListJob();
74 void updateDone( KJob* );
76 void listDone( KJob* );
77 void editDone( KJob* );
78 void dropResult( KJob* );
82 bool removeRowFromModel(
int row,
const QModelIndex & parent = QModelIndex() );
83 bool supportsContentType(
const QModelIndex &index,
const QStringList &contentTypes );
86 void updateSupportedMimeTypes(
Collection col )
89 QStringList::ConstIterator constEnd(l.constEnd());
90 for ( QStringList::ConstIterator it = l.constBegin(); it != constEnd; ++it ) {
94 if ( !mimeTypes.contains( *it ) ) {
Provides statistics information of a Collection.
Represents a collection of PIM items.
qint64 Id
Describes the unique id type.
static QString mimeType()
Returns the mimetype used for collections.
A communication session with the Akonadi storage.
Monitors an item or collection for changes.
QStringList contentMimeTypes() const
Returns a list of possible content mimetypes, e.g.
QList< Collection > List
Describes a list of collections.