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>
37 class CollectionModel;
38 class CollectionStatistics;
50 : q_ptr( parent ), monitor( 0 ), session( 0 ), fetchStatistics(
false ), unsubscribed(
false ),
51 headerContent( i18nc(
"@title:column, name of a thing",
"Name" ) )
58 QHash<Collection::Id, Collection> collections;
59 QHash<Collection::Id, QVector<Collection::Id> > childCollections;
61 QHash<Collection::Id, Collection> m_newCollections;
62 QHash< Collection::Id, QVector<Collection::Id> > m_newChildCollections;
66 QStringList mimeTypes;
69 QString headerContent;
72 void startFirstListJob();
75 void updateDone( KJob* );
77 void listDone( KJob* );
78 void editDone( KJob* );
79 void dropResult( KJob* );
83 bool removeRowFromModel(
int row,
const QModelIndex & parent = QModelIndex() );
84 bool supportsContentType(
const QModelIndex &index,
const QStringList &contentTypes );
87 void updateSupportedMimeTypes(
Collection col )
90 QStringList::ConstIterator constEnd(l.constEnd());
91 for ( QStringList::ConstIterator it = l.constBegin(); it != constEnd; ++it ) {
95 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.