server doxygen

Add documentation to the server
This commit is contained in:
2026-02-14 14:32:37 +01:00
parent 8ef11ece30
commit 01dfb0e21d
30 changed files with 1635 additions and 22 deletions
+37
View File
@@ -4,15 +4,52 @@
#define UI_LED_TYPE std::string("ui_led")
/**
* @brief Class representing a UI led
*
*/
class UI_led : public UI_item
{
Q_OBJECT
public:
/**
* @brief Construct a UI led object
*
* @param parent The parent QObject
*/
UI_led(QObject *parent = nullptr);
/**
* @brief Construct a UI led object
*
* @param text The text to display
* @param fg_color The foreground color
* @param bg_color The background color
* @param parent The parent QObject
*/
UI_led(std::string text, Color fg_color, Color bg_color, QObject *parent = nullptr);
/**
* @brief Set the state of the LED
*
* @param state The state to set
* @param on The color when the LED is on
* @param off The color when the LED is off
* @return true If the state was changed
* @return false If the state was not changed
*/
bool set_led(bool state, Color on, Color off);
/**
* @brief Deserialize the LED from JSON
*
* @param j The JSON object
*/
void from_json(const json &j) override;
/**
* @brief Serialize the LED to JSON
*
* @param id The id of the LED
* @return json The JSON representation of the LED
*/
json to_json(size_t id) const override;
};