mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
Update UI
This commit is contained in:
+4
-51
@@ -14,39 +14,12 @@ class UI_dial : public UI_item
|
||||
*
|
||||
* @param text The text to display
|
||||
* @param unit The unit of the dial
|
||||
* @param fg_color The foreground color
|
||||
* @param bg_color The background color
|
||||
* @param min The minimum value
|
||||
* @param max The maximum value
|
||||
* @param value The initial value
|
||||
* @param parent The parent QObject
|
||||
*/
|
||||
UI_dial(std::string text, std::string unit, Color fg_color, Color bg_color, double min, double max, double value,
|
||||
QObject *parent = nullptr);
|
||||
/**
|
||||
* @brief Construct a UI dial object
|
||||
*
|
||||
* @param text The text to display
|
||||
* @param unit The unit of the dial
|
||||
* @param min The minimum value
|
||||
* @param max The maximum value
|
||||
* @param value The initial value
|
||||
* @param parent The parent QObject
|
||||
*/
|
||||
UI_dial(std::string text, std::string unit, double min, double max, double value, QObject *parent = nullptr);
|
||||
/**
|
||||
* @brief Construct a UI dial object
|
||||
*
|
||||
* @param text The text to display
|
||||
* @param fg_color The foreground color
|
||||
* @param bg_color The background color
|
||||
* @param min The minimum value
|
||||
* @param max The maximum value
|
||||
* @param value The initial value
|
||||
* @param parent The parent QObject
|
||||
*/
|
||||
UI_dial(std::string text, Color fg_color, Color bg_color, double min, double max, double value,
|
||||
QObject *parent = nullptr);
|
||||
UI_dial(QString text, QString unit, double min, double max, double value, QObject *parent = nullptr);
|
||||
/**
|
||||
* @brief Construct a UI dial object
|
||||
*
|
||||
@@ -56,7 +29,7 @@ class UI_dial : public UI_item
|
||||
* @param value The initial value
|
||||
* @param parent The parent QObject
|
||||
*/
|
||||
UI_dial(std::string text, double min, double max, double value, QObject *parent = nullptr);
|
||||
UI_dial(QString text, double min, double max, double value, QObject *parent = nullptr);
|
||||
/**
|
||||
* @brief Construct a UI dial object
|
||||
*
|
||||
@@ -92,27 +65,7 @@ class UI_dial : public UI_item
|
||||
/**
|
||||
* @brief Get the unit of the dial
|
||||
*
|
||||
* @return std::string The unit of the dial
|
||||
* @return QString The unit of the dial
|
||||
*/
|
||||
std::string unit() const &;
|
||||
|
||||
/**
|
||||
* @brief Deserialize the dial from JSON
|
||||
*
|
||||
* @param j The JSON object
|
||||
*/
|
||||
void from_json(const json &j) override;
|
||||
/**
|
||||
* @brief Serialize the dial to JSON
|
||||
*
|
||||
* @param id The id of the dial
|
||||
* @return json The JSON representation of the dial
|
||||
*/
|
||||
json to_json(size_t id) const override;
|
||||
|
||||
private:
|
||||
double m_min;
|
||||
double m_max;
|
||||
double m_value;
|
||||
std::string m_unit;
|
||||
QString unit() const &;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user