2017-05-23 16:08:53 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QAbstractTableModel>
|
2020-09-14 19:43:25 -04:00
|
|
|
#include "Types.h"
|
|
|
|
|
|
|
|
class CInputBindingManager;
|
2017-05-23 16:08:53 +01:00
|
|
|
|
2020-09-16 15:09:14 -04:00
|
|
|
class CInputBindingModel : public QAbstractTableModel
|
2017-05-23 16:08:53 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-09-16 15:09:14 -04:00
|
|
|
CInputBindingModel(QObject* parent, CInputBindingManager*, uint32 padIndex);
|
|
|
|
~CInputBindingModel() = default;
|
2017-05-23 16:08:53 +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;
|
|
|
|
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
|
|
|
|
void addData(const QStringList data) const;
|
|
|
|
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
|
|
|
|
void Refresh();
|
2017-05-23 16:08:53 +01:00
|
|
|
|
|
|
|
protected:
|
2018-04-30 21:01:23 +01:00
|
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
|
2017-05-23 16:08:53 +01:00
|
|
|
|
|
|
|
private:
|
2020-09-14 19:43:25 -04:00
|
|
|
CInputBindingManager* m_inputManager = nullptr;
|
|
|
|
uint32 m_padIndex = 0;
|
2018-04-30 21:01:23 +01:00
|
|
|
QVariantList m_h_header;
|
2017-05-23 16:08:53 +01:00
|
|
|
};
|