2011-03-28 23:36:26 +00:00
|
|
|
#ifndef DATAFILESMODEL_H
|
|
|
|
#define DATAFILESMODEL_H
|
|
|
|
|
2011-03-29 21:42:34 +00:00
|
|
|
#include <QAbstractItemModel>
|
|
|
|
#include <QModelIndex>
|
|
|
|
#include <QVariant>
|
2011-03-28 23:36:26 +00:00
|
|
|
|
2011-03-29 21:42:34 +00:00
|
|
|
class DataFilesItem;
|
2011-03-28 23:36:26 +00:00
|
|
|
|
2011-03-29 21:42:34 +00:00
|
|
|
class DataFilesModel : public QAbstractItemModel
|
2011-03-28 23:36:26 +00:00
|
|
|
{
|
2011-03-29 21:42:34 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2011-03-28 23:36:26 +00:00
|
|
|
public:
|
2011-03-29 21:42:34 +00:00
|
|
|
//DataFilesModel(const QString &data, QObject *parent = 0);
|
2011-03-28 23:36:26 +00:00
|
|
|
DataFilesModel(QObject *parent = 0);
|
2011-03-29 21:42:34 +00:00
|
|
|
~DataFilesModel();
|
2011-03-28 23:36:26 +00:00
|
|
|
|
2011-03-29 21:42:34 +00:00
|
|
|
QVariant data(const QModelIndex &index, int role) const;
|
2011-03-28 23:36:26 +00:00
|
|
|
Qt::ItemFlags flags(const QModelIndex &index) const;
|
2011-03-29 21:42:34 +00:00
|
|
|
QVariant headerData(int section, Qt::Orientation orientation,
|
|
|
|
int role = Qt::DisplayRole) const;
|
|
|
|
QModelIndex index(int row, int column,
|
|
|
|
const QModelIndex &parent = QModelIndex()) const;
|
|
|
|
QModelIndex parent(const QModelIndex &index) const;
|
|
|
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
|
|
|
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
//void setupModelData(const QStringList &lines, TreeItem *parent);
|
|
|
|
|
|
|
|
DataFilesItem *rootItem;
|
2011-03-28 23:36:26 +00:00
|
|
|
};
|
|
|
|
|
2011-03-29 21:42:34 +00:00
|
|
|
#endif
|