mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
b ui plot
forgot emitting the value changed signal
This commit is contained in:
@@ -18,6 +18,8 @@ UI_plot::UI_plot(const json &j, QObject *parent) : UI_item{UI_PLOT_TYPE, parent}
|
||||
void UI_plot::set_x_label(std::string name)
|
||||
{
|
||||
m_x_label = name;
|
||||
|
||||
emit value_changed();
|
||||
}
|
||||
|
||||
std::string UI_plot::x_label() const
|
||||
@@ -28,6 +30,8 @@ std::string UI_plot::x_label() const
|
||||
void UI_plot::set_y_label(std::string name)
|
||||
{
|
||||
m_y_label = name;
|
||||
|
||||
emit value_changed();
|
||||
}
|
||||
|
||||
std::string UI_plot::y_label() const
|
||||
@@ -39,18 +43,24 @@ void UI_plot::add_value(double y)
|
||||
{
|
||||
m_x_vals.push_back((double)m_x_vals.size());
|
||||
m_y_vals.push_back(y);
|
||||
|
||||
emit value_changed();
|
||||
}
|
||||
|
||||
void UI_plot::add_value(double x, double y)
|
||||
{
|
||||
m_x_vals.push_back(x);
|
||||
m_y_vals.push_back(y);
|
||||
|
||||
emit value_changed();
|
||||
}
|
||||
|
||||
void UI_plot::clean_vals()
|
||||
{
|
||||
m_x_vals.clear();
|
||||
m_y_vals.clear();
|
||||
|
||||
emit value_changed();
|
||||
}
|
||||
|
||||
void UI_plot::from_json(const json &j)
|
||||
|
||||
Reference in New Issue
Block a user