Go to the documentation of this file.
10 impl->desc =
static_cast<RemoteGui::Widget*
>(iceWidget);
13 static std::atomic<std::uint64_t> counter{0};
14 std::uint64_t uniqueNumber = counter++;
21 impl->desc->name = name;
27 return impl->desc->name;
53 auto* concrete =
static_cast<RemoteGui::IntSpinBox*
>(
impl->desc.get());
61 impl->setValue(newValue);
67 return impl->hasValueChanged();
73 return impl->getValue<
int>();
103 for (
auto& child : children)
125 auto* concrete =
static_cast<RemoteGui::Button*
>(
impl->desc.get());
126 concrete->label = label;
143 return impl->getValue<std::string>();
149 auto* concrete =
static_cast<RemoteGui::LineEdit*
>(
impl->desc.get());
150 concrete->defaultValue =
makeValue(text);
156 return impl->hasValueChanged();
166 auto* concrete =
static_cast<RemoteGui::ComboBox*
>(
impl->desc.get());
167 concrete->options.push_back(
option);
170 if (concrete->defaultValue.type == VALUE_VARIANT_EMPTY)
179 for (
auto&
option : options)
188 auto* concrete =
static_cast<RemoteGui::ComboBox*
>(
impl->desc.get());
189 concrete->options = options;
190 if (options.size() > 0)
192 concrete->defaultValue =
makeValue(options.front());
199 impl->setValue(newValue);
205 return impl->getValue<std::string>();
211 auto* concrete =
static_cast<RemoteGui::ComboBox*
>(
impl->desc.get());
212 if (index < 0 || index >= (
int)concrete->options.size())
214 throw std::runtime_error(
"ComboBox::setIndex(i) Index i is invalid");
222 auto* concrete =
static_cast<RemoteGui::ComboBox*
>(
impl->desc.get());
224 for (
int i = 0; i < (int)concrete->options.size(); ++i)
226 if (concrete->options[i] ==
value)
237 return impl->hasValueChanged();
248 return impl->getValue<
bool>();
254 impl->setValue(newValue);
260 return impl->hasValueChanged();
271 auto* concrete =
static_cast<RemoteGui::ToggleButton*
>(
impl->desc.get());
272 concrete->label = label;
278 return impl->getValue<
bool>();
284 impl->setValue(newValue);
290 return impl->hasValueChanged();
301 auto* concrete =
static_cast<RemoteGui::IntSlider*
>(
impl->desc.get());
309 return impl->getValue<
int>();
315 impl->setValue(newValue);
321 return impl->hasValueChanged();
332 auto* concrete =
static_cast<RemoteGui::FloatSpinBox*
>(
impl->desc.get());
340 auto* concrete =
static_cast<RemoteGui::FloatSpinBox*
>(
impl->desc.get());
341 concrete->steps = steps;
347 auto* concrete =
static_cast<RemoteGui::FloatSpinBox*
>(
impl->desc.get());
348 concrete->decimals = decimals;
354 return impl->getValue<
float>();
360 impl->setValue(newValue);
366 return impl->hasValueChanged();
377 auto* concrete =
static_cast<RemoteGui::FloatSlider*
>(
impl->desc.get());
385 auto* concrete =
static_cast<RemoteGui::FloatSlider*
>(
impl->desc.get());
386 concrete->steps = steps;
392 return impl->getValue<
float>();
398 impl->setValue(newValue);
404 return impl->hasValueChanged();
413 for (
auto& child : children)
422 auto* concrete =
static_cast<RemoteGui::GroupBox*
>(
impl->desc.get());
423 concrete->label = text;
429 auto* concrete =
static_cast<RemoteGui::GroupBox*
>(
impl->desc.get());
430 concrete->collapsed = collapsed;
442 auto* concrete =
static_cast<RemoteGui::GridLayout*
>(
impl->desc.get());
void setValue(int newValue)
bool hasValueChanged() const
bool hasValueChanged() const
GridLayout & add(Widget const &child, Pos pos, Span span=Span{1, 1})
bool hasValueChanged() const
void setValue(float newValue)
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
void setRange(float min, float max)
void setValue(float newValue)
bool hasValueChanged() const
void setValue(int newValue)
std::shared_ptr< Value > value()
void setRange(int min, int max)
void addOption(std::string const &option)
void setCollapsed(bool collapsed)
void setDecimals(int decimals)
bool hasValueChanged() const
const std::string & to_string(const std::string &s)
ValueVariant makeValue(bool value)
void setLabel(std::string const &text)
void setRange(float min, float max)
void setText(std::string const &text)
bool hasValueChanged() const
void setValue(std::string const &text)
void setValue(bool newValue)
void setRange(int min, int max)
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
void addOptions(std::initializer_list< std::string > options)
void setOptions(std::vector< std::string > const &options)
std::string getValue() const
bool hasValueChanged() const
void setValue(std::string const &newValue)