00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_SUBSCRIPTIONMODEL_P_H
00021 #define AKONADI_SUBSCRIPTIONMODEL_P_H
00022
00023 #include <akonadi/collection.h>
00024 #include <akonadi/collectionmodel.h>
00025
00026 namespace Akonadi {
00027
00034 class SubscriptionModel : public CollectionModel
00035 {
00036 Q_OBJECT
00037 public:
00039 enum Roles {
00040 SubscriptionChangedRole = CollectionModel::UserRole + 1
00041 };
00042
00047 explicit SubscriptionModel( QObject *parent = 0 );
00048
00052 ~SubscriptionModel();
00053
00054 QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const;
00055 Qt::ItemFlags flags( const QModelIndex &index ) const;
00056 bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole );
00057
00058 Collection::List subscribed() const;
00059 Collection::List unsubscribed() const;
00060
00061 signals:
00065 void loaded();
00066
00067 private:
00068 class Private;
00069 Private* const d;
00070 Q_PRIVATE_SLOT( d, void listResult(KJob*) )
00071 };
00072
00073 }
00074
00075 #endif