Play-/Source/ui_unix/vfsmodel.h

30 lines
878 B
C
Raw Normal View History

2017-12-21 18:21:44 -05:00
#pragma once
2016-09-06 00:03:02 +01:00
#include "VfsDevice.h"
2017-12-21 18:21:44 -05:00
#include <QAbstractTableModel>
2016-09-06 00:03:02 +01:00
class VFSModel : public QAbstractTableModel
{
2017-12-21 18:21:44 -05:00
Q_OBJECT
2016-09-06 00:03:02 +01:00
public:
2017-12-21 18:21:44 -05:00
VFSModel(QObject* parent);
~VFSModel();
2016-09-06 00:03:02 +01:00
2018-04-30 21:01:23 +01:00
int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
2017-12-21 18:21:44 -05:00
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
2018-04-30 21:01:23 +01:00
void addData(const QStringList data) const;
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
void DoubleClicked(const QModelIndex& index, QWidget* parent = 0);
void Save();
2016-09-06 00:03:02 +01:00
protected:
2017-12-21 18:21:44 -05:00
QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
2016-09-06 00:03:02 +01:00
private:
2017-12-21 18:21:44 -05:00
void SetupDevices();
2016-09-06 00:03:02 +01:00
2018-04-30 21:01:23 +01:00
DeviceList m_devices;
2017-12-21 18:21:44 -05:00
QVariantList m_h_header;
2016-09-06 00:03:02 +01:00
};