18#ifndef EXTENSIONMODEL_H
19#define EXTENSIONMODEL_H
21#include "qmltypes/qmlextension.h"
23#include <QAbstractItemModel>
25class ExtensionModel :
public QAbstractItemModel
36 explicit ExtensionModel(QObject *parent = 0);
37 virtual ~ExtensionModel();
38 void load(
const QString &
id);
40 QString getName(
int row)
const;
41 QString getFormattedDataSize(
int row)
const;
42 QString localPath(
int row)
const;
43 QString url(
int row)
const;
44 QString sha256(
int row)
const;
45 bool downloaded(
int row)
const;
46 void deleteFile(
int row);
47 int getStandardIndex()
const;
48 QModelIndex getIndexForPath(QString path);
52 int rowCount(
const QModelIndex &parent)
const;
53 int columnCount(
const QModelIndex &parent)
const;
54 QVariant data(
const QModelIndex &index,
int role)
const;
55 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const;
56 QModelIndex index(
int row,
int column = 0,
const QModelIndex &parent = QModelIndex())
const;
57 QModelIndex parent(
const QModelIndex &index)
const;