#pragma once #include #include #include "sensors/sensor.h" class SensorListItem : public QTableWidgetItem { Sensor sensor; public: const Sensor& getSensor(); SensorListItem(const QString& text, const Sensor& sensor); }; class SensorListWidget : public QTableWidget { Q_OBJECT bool showHidden_; public: SensorListWidget(const bool showHidden = true, QWidget* parent = nullptr); SensorListWidget(SensorStore& sensorStore, const bool showHidden = true, QWidget* parent = nullptr); virtual ~SensorListWidget() {} void setShowHidden(const bool showHidden); const Sensor& getSensorForIndex(const QModelIndex &index); public slots: void sensorsChanged(std::vector sensors); };