mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
client
change id_to_label to use qwidget pointer instead of id
This commit is contained in:
@@ -31,9 +31,8 @@ Test_Sim::~Test_Sim()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QLabel *Test_Sim::id_to_label(size_t id)
|
||||
QLabel *Test_Sim::id_to_label(QWidget *widget)
|
||||
{
|
||||
QWidget *widget = id_to_ui(id);
|
||||
if (widget == ui->slider)
|
||||
return ui->slider_label;
|
||||
if (widget == ui->thermo)
|
||||
|
||||
@@ -16,7 +16,7 @@ class Test_Sim : public Simulator_base
|
||||
explicit Test_Sim(Web_socket_wrapper *web_socket = nullptr, QWidget *parent = nullptr);
|
||||
~Test_Sim();
|
||||
|
||||
QLabel *id_to_label(size_t name) override;
|
||||
QLabel *id_to_label(QWidget *widget) override;
|
||||
|
||||
private:
|
||||
Ui::Test_Sim *ui;
|
||||
|
||||
Reference in New Issue
Block a user