Files
OpenRGB/qt/DetectorTableModel.h
k1-801 8a88573443 Add settings page to enable and disable devices
Commits squashed and amended to read information only from settings manager by Adam Honse <calcprogrammer1@gmail.com>
2020-12-06 20:19:12 -06:00

34 lines
881 B
C++

#ifndef DETECTORTABLEMODEL_H
#define DETECTORTABLEMODEL_H
#include <QAbstractTableModel>
#include "ResourceManager.h"
typedef struct
{
std::string key;
bool value;
} DetectorTableValue;
class DetectorTableModel : public QAbstractTableModel
{
Q_OBJECT
private:
std::vector<DetectorTableValue> detectors;
public:
DetectorTableModel(QObject *parent = nullptr);
int columnCount(const QModelIndex&) const override;
int rowCount(const QModelIndex&) const override;
QVariant data(const QModelIndex& index, int role) const override;
bool setData(const QModelIndex& index, const QVariant&, int role) override;
QVariant headerData(int index, Qt::Orientation orientation, int role) const override;
Qt::ItemFlags flags(const QModelIndex& index) const override;
public slots:
void applySettings();
};
#endif // DETECTORTABLEMODEL_H