Client doxygen

Add documentation to the client
This commit is contained in:
2026-02-14 14:32:36 +01:00
parent 758958fd3a
commit 7a74847f45
5 changed files with 448 additions and 30 deletions
+48 -1
View File
@@ -22,20 +22,67 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
/**
* @brief Construct a new Main Window object
*
* @param ws_url The WebSocket URL
* @param sim The default simulator name
* @param parent The parent widget
*/
explicit MainWindow(QUrl ws_url, QString sim, QWidget *parent = nullptr);
~MainWindow();
private:
/**
* @brief Handle the show event
* And will connect the WebSocket signals
*
* @param event
*/
void showEvent(QShowEvent *event) override;
/**
* @brief Handle the hide event
* And will disconnect the WebSocket signals
*
* @param event
*/
void hideEvent(QHideEvent *event) override;
/**
* @brief Set the default simulator only possible on construction
*
* @param name The simulator name
*/
void default_sim(QString name);
/**
* @brief Parse the simulator names from JSON and add them to the combo box
*
* @param sims The JSON array of simulator names
*/
void pase_sim_names(json &sims);
/**
* @brief Open the simulator window using the selected simulator
*/
void open_sim_window(void);
/**
* @brief Open a simulator by name
*
* @param sim_name The simulator name
*/
void check_active_sim(QString name);
/**
* @brief Open a simulator by name
* Used when using the default simulator
*
* @param sim_name
*/
void open_sim(QString sim_name);
void setup_cb(void);
/**
* @brief Handle command callbacks from the server
*
* @param j The JSON command
*/
void on_cmd_cb(json &j);
bool m_default_sim = false;