summaryrefslogtreecommitdiffstats
path: root/vmchooser2/model.h
blob: c1945d40b1feee3064a45a467d61c5f69f8950ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef MODEL_H
#define MODEL_H

#include <QAbstractListModel>
#include <QFileIconProvider>
#include <QVector>
#include "inc/DataEntry.h"
#include <vector>

class Model : public QAbstractListModel
{
    Q_OBJECT

public:
    Model(std::vector<DataEntry>, QObject *parent = 0);
    ~Model();

    int rowCount(const QModelIndex &parent) const;

    QVariant data(const QModelIndex &index, int role) const;
//    QVariant headerData(int section, Qt::Orientation orientation, int role) const;

private:

    int rc;
    std::vector<DataEntry> entries;
    //QVector<QString> *list;
    QFileIconProvider iconProvider;
};

#endif // MODEL_H