mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
client
change from sim_name to name
This commit is contained in:
@@ -27,7 +27,7 @@ MainWindow::MainWindow(QUrl ws_url, QWidget *parent)
|
||||
continue;
|
||||
}
|
||||
auto widget = loaded_ui(m_web_socket.get(), this);
|
||||
m_sims.insert(std::make_pair(widget->sim_name(), widget));
|
||||
m_sims.insert(std::make_pair(widget->name(), widget));
|
||||
lib.unload();
|
||||
}
|
||||
// Insert debug sims here
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
#include "web_socket_wrapper.hpp"
|
||||
#include <magic_enum/magic_enum.hpp>
|
||||
|
||||
Simulator_base::Simulator_base(QString sim_name, Web_socket_wrapper *web_socket, QWidget *parent)
|
||||
Simulator_base::Simulator_base(QString name, Web_socket_wrapper *web_socket, QWidget *parent)
|
||||
: QMainWindow{parent}, m_error_dialog(new NetworkError(this)), m_timer_update(new QTimer()),
|
||||
m_web_socket(web_socket), m_sim_name(sim_name)
|
||||
m_web_socket(web_socket), m_name(name)
|
||||
{
|
||||
if (windowTitle() != m_sim_name)
|
||||
if (windowTitle() != m_name)
|
||||
{
|
||||
setWindowTitle(m_sim_name);
|
||||
setWindowTitle(m_name);
|
||||
}
|
||||
m_error_dialog->set_error("Connection timed out\nCheck if the server is running");
|
||||
m_ui_lookup.reserve(40);
|
||||
@@ -24,9 +24,9 @@ QWidget *Simulator_base::id_to_ui(size_t id)
|
||||
return m_ui_lookup.at(id);
|
||||
}
|
||||
|
||||
QString Simulator_base::sim_name() const
|
||||
QString Simulator_base::name() const
|
||||
{
|
||||
return m_sim_name;
|
||||
return m_name;
|
||||
}
|
||||
|
||||
void Simulator_base::showEvent(QShowEvent *event)
|
||||
|
||||
@@ -24,9 +24,9 @@ class Simulator_base : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Simulator_base(QString sim_name, Web_socket_wrapper *api, QWidget *parent = nullptr);
|
||||
explicit Simulator_base(QString name, Web_socket_wrapper *api, QWidget *parent = nullptr);
|
||||
void sim_update(void);
|
||||
QString sim_name() const;
|
||||
QString name() const;
|
||||
QWidget *id_to_ui(size_t id);
|
||||
virtual QLabel *id_to_label(size_t name)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ class Simulator_base : public QMainWindow
|
||||
|
||||
private:
|
||||
Web_socket_wrapper *m_web_socket;
|
||||
QString m_sim_name;
|
||||
QString m_name;
|
||||
|
||||
QTimer *m_timer_update;
|
||||
uint32_t m_refresh_rate;
|
||||
|
||||
Reference in New Issue
Block a user