fix bad syntax
This commit is contained in:
2026-02-14 14:32:12 +01:00
parent 474906c4af
commit be4aafdd89
3 changed files with 60 additions and 31 deletions
+13 -11
View File
@@ -1,14 +1,16 @@
## Client UI
To create a new simulator ui follow these steps
1) Make sure the client folder is folded down
2) Right click on unisim_client and select Add new
3) Choose Qt in files and classes and then select Qt widgets designer form class + Choose
4) Select Mainwindow + Next
5) Change the classname to the name of your sim use underscores as spaces, don't forget classnames always start with a capital letter
6) Select the path by clicking browse, and make sure it is in the client/simulators folder + Next
7) Set add to project to None + Finished
8) Refresh CMake by right clicking on the project name + Run Cmake, it should show your sim as ui_ + filename
9) Change the hpp file as following. This is an example out of test sim
To create a new simulator ui follow these steps
1. Make sure the client folder is folded down
2. Right click on unisim_client and select Add new
3. Choose Qt in files and classes and then select Qt widgets designer form class + Choose
4. Select Mainwindow + Next
5. Change the classname to the name of your sim use underscores as spaces, don't forget classnames always start with a capital letter
6. Select the path by clicking browse, and make sure it is in the client/simulators folder + Next
7. Set add to project to None + Finished
8. Refresh CMake by right clicking on the project name + Run Cmake, it should show your sim as ui_ + filename
9. Change the hpp file as following. This is an example out of test sim
OPTIONAL Add id_to_label is optional if you want to use value labels
```cpp
#pragma once
@@ -33,7 +35,7 @@ class Test_Sim : public Simulator_base
Ui::Test_Sim *ui;
};
```
10) Change the cpp file as following. This is an example out of test sim. PUSH_UI_ITEM is the method to add new QWidgets to the similator UI
10. Change the cpp file as following. This is an example out of test sim. PUSH_UI_ITEM is the method to add new QWidgets to the similator UI
OPTIONAL Add id_to_label is optional if you want to use value labels switch case is also an option instead of if
```cpp
#include "test.hpp"