src/job_editor_widget/jobpropertymodel.h

Go to the documentation of this file.
00001 #ifndef JOBPROPERTYMODEL_H
00002 #define JOBPROPERTYMODEL_H
00003 
00010 #include <QAbstractItemModel>
00011 #include <QModelIndex>
00012 #include <QVariant>
00013 
00014 class JobPropertyItem;
00015 
00019 class JobPropertyModel : public QAbstractItemModel
00020 {
00021     Q_OBJECT
00022 
00023 public:
00024     JobPropertyModel(QObject *parent);
00025     ~JobPropertyModel();
00026 
00027     QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
00028     QVariant headerData(int section, Qt::Orientation orientation,
00029                         int role = Qt::DisplayRole) const;
00030 
00031     QModelIndex index(int row, int column,
00032                       const QModelIndex &parent = QModelIndex()) const;
00033     bool removeRows ( int row, int count, const QModelIndex & parent = QModelIndex() );
00034     QModelIndex parent(const QModelIndex &index) const;
00035 
00036     int rowCount(const QModelIndex &parent = QModelIndex()) const;
00037     int columnCount(const QModelIndex &parent = QModelIndex()) const;
00038 
00039     Qt::ItemFlags flags(const QModelIndex &index) const;
00040     bool setData(const QModelIndex &index, const QVariant &value,
00041                  int role = Qt::EditRole);
00042     bool setHeaderData(int section, Qt::Orientation orientation,
00043                        const QVariant &value, int role = Qt::EditRole);
00044 
00045     void emitLayoutAboutToBeChanged();
00046     void emitLayoutChanged();
00047 
00048     JobPropertyItem *getItem(const QModelIndex &index) const;
00049     JobPropertyItem *rootItem;
00050 
00051 public:
00052     bool _layoutAboutToBeChanged;
00053 
00054 };
00055 #endif // JOBPROPERTYMODEL_H

Generated on Mon Mar 16 18:46:05 2009 for QCJM by  doxygen 1.5.4