parley
containermodel.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef CONTAINERMODEL_H
00017 #define CONTAINERMODEL_H
00018
00019 #include "basiccontainermodel.h"
00020
00021 #include <QAbstractItemModel>
00022 #include <QModelIndex>
00023
00024 #include <QObject>
00025
00026 #include <keduvocdocument.h>
00027 #include <keduvoclesson.h>
00028
00032 class ContainerModel : public BasicContainerModel
00033 {
00034 Q_OBJECT
00035
00036 public:
00037 explicit ContainerModel(KEduVocContainer::EnumContainerType type, QObject *parent = 0);
00038
00039 virtual QVariant data(const QModelIndex &index, int role) const;
00040 virtual Qt::ItemFlags flags(const QModelIndex &index) const;
00041 virtual QVariant headerData(int section, Qt::Orientation orientation,
00042 int role = Qt::DisplayRole) const;
00043 virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
00044
00045 Qt::DropActions supportedDropActions () const;
00046 QStringList mimeTypes() const;
00047 QMimeData * mimeData(const QModelIndexList &indexes) const;
00048 bool dropMimeData(const QMimeData *data, Qt::DropAction action,
00049 int row, int column, const QModelIndex &parent);
00050
00056 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
00057
00058
00059 QModelIndex appendContainer(const QModelIndex& parent, const QString & containerName = QString());
00060
00061 void deleteContainer(const QModelIndex& containerIndex);
00062
00063 signals:
00067 void documentModified();
00068 };
00069
00070
00071 #endif