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:
+3
-45
@@ -14,26 +14,13 @@ class UI_slider : public UI_item
|
||||
*
|
||||
* @param text The text to display
|
||||
* @param unit The unit of the slider
|
||||
* @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_slider(std::string text, std::string unit, Color fg_color, Color bg_color, double min, double max, double value,
|
||||
UI_slider(QString text, QString unit, double min, double max, double value,
|
||||
QObject *parent = nullptr);
|
||||
/**
|
||||
* @brief Construct a UI slider object
|
||||
*
|
||||
* @param text The text to display
|
||||
* @param unit The unit of the slider
|
||||
* @param min The minimum value
|
||||
* @param max The maximum value
|
||||
* @param value The initial value
|
||||
* @param parent The parent QObject
|
||||
*/
|
||||
UI_slider(std::string text, std::string unit, double min, double max, double value, QObject *parent = nullptr);
|
||||
/**
|
||||
* @brief Construct a UI slider object
|
||||
*
|
||||
@@ -45,18 +32,9 @@ class UI_slider : public UI_item
|
||||
* @param value The initial value
|
||||
* @param parent The parent QObject
|
||||
*/
|
||||
UI_slider(std::string text, Color fg_color, Color bg_color, double min, double max, double value,
|
||||
UI_slider(QString text, double min, double max, double value,
|
||||
QObject *parent = nullptr);
|
||||
/**
|
||||
* @brief Construct a UI slider object
|
||||
*
|
||||
* @param text The text to display
|
||||
* @param min The minimum value
|
||||
* @param max The maximum value
|
||||
* @param value The initial value
|
||||
* @param parent The parent QObject
|
||||
*/
|
||||
UI_slider(std::string text, double min, double max, double value, QObject *parent = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Construct a UI slider object
|
||||
*
|
||||
@@ -89,20 +67,6 @@ class UI_slider : public UI_item
|
||||
* @return double The maximum value
|
||||
*/
|
||||
double max() const;
|
||||
|
||||
/**
|
||||
* @brief Deserialize the slider from JSON
|
||||
*
|
||||
* @param j The JSON object
|
||||
*/
|
||||
void from_json(const json &j) override;
|
||||
/**
|
||||
* @brief Serialize the slider to JSON
|
||||
*
|
||||
* @param id The id of the slider
|
||||
* @return json The JSON representation of the slider
|
||||
*/
|
||||
json to_json(size_t id) const override;
|
||||
signals:
|
||||
/**
|
||||
* @brief Signal emitted when the slider value changes
|
||||
@@ -110,10 +74,4 @@ class UI_slider : public UI_item
|
||||
* @param value The new value of the slider
|
||||
*/
|
||||
void changed(double value);
|
||||
|
||||
private:
|
||||
double m_min;
|
||||
double m_max;
|
||||
double m_value;
|
||||
std::string m_unit;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user