mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
client
clean up mainwindow files
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "mainwindow.hpp"
|
||||
#include "simulator_base.hpp"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "web_socket_wrapper.hpp"
|
||||
#include <QDirIterator>
|
||||
#include <QLibrary>
|
||||
#include <QMessageBox>
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
#pragma once
|
||||
#include "simulator_base.hpp"
|
||||
#include "web_socket_wrapper.hpp"
|
||||
#include "nlohmann/json.hpp"
|
||||
#include <QMainWindow>
|
||||
#include <map>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
#define INSERT_SIMULATOR(type) \
|
||||
m_sims.insert(std::make_pair(type().sim_name(), std::make_unique<type>(m_web_socket.get(), this)))
|
||||
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(QMessageBox);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(Web_socket_wrapper);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(Simulator_base);
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@@ -22,6 +25,10 @@ class MainWindow : public QMainWindow
|
||||
explicit MainWindow(QUrl ws_url, QString sim, QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
void showEvent(QShowEvent *event);
|
||||
void hideEvent(QHideEvent *event);
|
||||
|
||||
void default_sim(QString name);
|
||||
void pase_sim_names(json &sims);
|
||||
void open_sim_window(void);
|
||||
@@ -29,10 +36,6 @@ class MainWindow : public QMainWindow
|
||||
void open_sim(QString sim_name);
|
||||
void setup_cb(void);
|
||||
|
||||
private:
|
||||
void showEvent(QShowEvent *event);
|
||||
void hideEvent(QHideEvent *event);
|
||||
|
||||
void on_cmd_cb(json &j);
|
||||
|
||||
bool m_default_sim = false;
|
||||
|
||||
Reference in New Issue
Block a user