Fix incorrect sensor selection due to reorder sensors in SensorListWidget
This commit is contained in:
parent
271330d5fd
commit
0c5603ca44
7 changed files with 47 additions and 15 deletions
|
|
@ -3,6 +3,15 @@
|
|||
#include <vector>
|
||||
#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
|
||||
|
|
@ -11,10 +20,11 @@ class SensorListWidget : public QTableWidget
|
|||
|
||||
public:
|
||||
|
||||
SensorListWidget(const bool showHidden = true, QWidget *parent = nullptr);
|
||||
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:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue