Use QString for LED labels vector
This commit is contained in:
parent
5e002107ef
commit
b0b46dd3a5
2 changed files with 3 additions and 3 deletions
|
|
@ -258,7 +258,7 @@ void DeviceView::setController(RGBController * controller_ptr)
|
|||
{
|
||||
if(controller->leds[led_idx].name == led_label_lookup[led_label_lookup_idx].led_name)
|
||||
{
|
||||
led_labels[led_idx] = led_label_lookup[led_label_lookup_idx].led_label;
|
||||
led_labels[led_idx] = QString::fromStdString(led_label_lookup[led_label_lookup_idx].led_label);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -439,7 +439,7 @@ void DeviceView::paintEvent(QPaintEvent* /* event */)
|
|||
{
|
||||
painter.setPen(Qt::white);
|
||||
}
|
||||
painter.drawText(rect, Qt::AlignVCenter | Qt::AlignHCenter, QString(led_labels[led_idx].c_str()));
|
||||
painter.drawText(rect, Qt::AlignVCenter | Qt::AlignHCenter, QString(led_labels[led_idx]));
|
||||
}
|
||||
|
||||
font.setPixelSize(12);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ private:
|
|||
|
||||
std::vector<matrix_pos_size_type> zone_pos;
|
||||
std::vector<matrix_pos_size_type> led_pos;
|
||||
std::vector<std::string> led_labels;
|
||||
std::vector<QString> led_labels;
|
||||
|
||||
float matrix_h;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue