Add groups to the sensors
This commit is contained in:
parent
2fbfd1d458
commit
221cb519a2
6 changed files with 68 additions and 5 deletions
|
|
@ -11,6 +11,15 @@ SensorSettingsDialog::SensorSettingsDialog(const Sensor& sensor, QWidget* parent
|
|||
ui->label_idValue->setText(QString::number(sensor.id));
|
||||
ui->lineEdit_Name->setText(sensor.name);
|
||||
ui->checkBox_Hidden->setChecked(sensor.hidden);
|
||||
|
||||
// Populate group dropdown with existing groups
|
||||
std::vector<QString> groups = globalSensors.allGroups();
|
||||
for(const QString& group : groups)
|
||||
{
|
||||
ui->comboBox_Group->addItem(group);
|
||||
}
|
||||
// Set current group (will be empty string if no group)
|
||||
ui->comboBox_Group->setCurrentText(sensor.groupName);
|
||||
}
|
||||
|
||||
SensorSettingsDialog::~SensorSettingsDialog()
|
||||
|
|
@ -23,6 +32,11 @@ QString SensorSettingsDialog::getName() const
|
|||
return ui->lineEdit_Name->text();
|
||||
}
|
||||
|
||||
QString SensorSettingsDialog::getGroupName() const
|
||||
{
|
||||
return ui->comboBox_Group->currentText();
|
||||
}
|
||||
|
||||
bool SensorSettingsDialog::getHidden() const
|
||||
{
|
||||
return ui->checkBox_Hidden->isChecked();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue