Go to the documentation of this file.
11 impl->desc =
static_cast<RemoteGui::Widget*
>(iceWidget);
14 static std::atomic<std::uint64_t> counter{0};
15 std::uint64_t uniqueNumber = counter++;
21 impl->desc->name = name;
26 return impl->desc->name;
53 auto* concrete =
static_cast<RemoteGui::IntSpinBox*
>(
impl->desc.get());
60 impl->setValue(newValue);
65 return impl->hasValueChanged();
70 return impl->getValue<
int>();
102 for (
auto& child : children)
126 auto* concrete =
static_cast<RemoteGui::Button*
>(
impl->desc.get());
127 concrete->label = label;
143 return impl->getValue<std::string>();
148 auto* concrete =
static_cast<RemoteGui::LineEdit*
>(
impl->desc.get());
149 concrete->defaultValue =
makeValue(text);
154 return impl->hasValueChanged();
164 auto* concrete =
static_cast<RemoteGui::ComboBox*
>(
impl->desc.get());
165 concrete->options.push_back(
option);
168 if (concrete->defaultValue.type == VALUE_VARIANT_EMPTY)
176 for (
auto&
option : options)
184 auto* concrete =
static_cast<RemoteGui::ComboBox*
>(
impl->desc.get());
185 concrete->options = options;
186 if (options.size() > 0)
188 concrete->defaultValue =
makeValue(options.front());
194 impl->setValue(newValue);
199 return impl->getValue<std::string>();
204 auto* concrete =
static_cast<RemoteGui::ComboBox*
>(
impl->desc.get());
205 if (index < 0 || index >= (
int)concrete->options.size())
207 throw std::runtime_error(
"ComboBox::setIndex(i) Index i is invalid");
214 auto* concrete =
static_cast<RemoteGui::ComboBox*
>(
impl->desc.get());
216 for (
int i = 0; i < (int)concrete->options.size(); ++i)
218 if (concrete->options[i] ==
value)
228 return impl->hasValueChanged();
239 return impl->getValue<
bool>();
244 impl->setValue(newValue);
249 return impl->hasValueChanged();
260 auto* concrete =
static_cast<RemoteGui::ToggleButton*
>(
impl->desc.get());
261 concrete->label = label;
266 return impl->getValue<
bool>();
271 impl->setValue(newValue);
276 return impl->hasValueChanged();
287 auto* concrete =
static_cast<RemoteGui::IntSlider*
>(
impl->desc.get());
294 return impl->getValue<
int>();
299 impl->setValue(newValue);
304 return impl->hasValueChanged();
315 auto* concrete =
static_cast<RemoteGui::FloatSpinBox*
>(
impl->desc.get());
322 auto* concrete =
static_cast<RemoteGui::FloatSpinBox*
>(
impl->desc.get());
323 concrete->steps = steps;
328 auto* concrete =
static_cast<RemoteGui::FloatSpinBox*
>(
impl->desc.get());
329 concrete->decimals = decimals;
334 return impl->getValue<
float>();
339 impl->setValue(newValue);
344 return impl->hasValueChanged();
355 auto* concrete =
static_cast<RemoteGui::FloatSlider*
>(
impl->desc.get());
362 auto* concrete =
static_cast<RemoteGui::FloatSlider*
>(
impl->desc.get());
363 concrete->steps = steps;
368 return impl->getValue<
float>();
373 impl->setValue(newValue);
378 return impl->hasValueChanged();
389 for (
auto& child : children)
397 auto* concrete =
static_cast<RemoteGui::GroupBox*
>(
impl->desc.get());
398 concrete->label = text;
403 auto* concrete =
static_cast<RemoteGui::GroupBox*
>(
impl->desc.get());
404 concrete->collapsed = collapsed;
416 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)