43 return "RemoteGuiExample2";
84 RemoteGuiExample2::RemoteGui_update()
91 RemoteGuiExample2::createTab_Widgets()
99 Label label(
"Line: ");
100 HBoxLayout line{label, widgetsTab.
lineEdit};
101 vLayout.addChild(line);
105 widgetsTab.combo.addOptions({
"First",
"Second",
"Third",
"Fourth"});
106 widgetsTab.combo.setValue(
"Second");
108 HBoxLayout line{
Label(
"Combo: "), widgetsTab.combo};
109 vLayout.addChild(line);
113 widgetsTab.checkBox.setValue(
true);
115 HBoxLayout line{
Label(
"Check: "), widgetsTab.checkBox};
116 vLayout.addChild(line);
120 widgetsTab.toggle.setValue(
true);
121 widgetsTab.toggle.setLabel(
"Toggle");
123 HBoxLayout line{
Label(
"Toggle: "), widgetsTab.toggle};
124 vLayout.addChild(line);
128 widgetsTab.intSlider.setRange(0, 10);
129 widgetsTab.intSlider.setValue(5);
131 widgetsTab.intSpin.setRange(0, 10);
132 widgetsTab.intSpin.setValue(5);
134 HBoxLayout line{
Label(
"Int: "), widgetsTab.intSlider, widgetsTab.intSpin};
135 vLayout.addChild(line);
139 widgetsTab.floatSlider.setRange(0.0f, 2.0f);
140 widgetsTab.floatSlider.setSteps(100);
141 widgetsTab.floatSlider.setValue(0.0f);
143 widgetsTab.floatSpin.setRange(0.0f, 2.0f);
144 widgetsTab.floatSpin.setSteps(20);
145 widgetsTab.floatSpin.setDecimals(2);
146 widgetsTab.floatSpin.setValue(0.4f);
148 HBoxLayout line{
Label(
"Float: "), widgetsTab.floatSlider, widgetsTab.floatSpin};
149 vLayout.addChild(line);
153 widgetsTab.button.setLabel(
"Button");
155 HBoxLayout line{
Label(
"Button: "), widgetsTab.button};
156 vLayout.addChild(line);
159 vLayout.addChild(VSpacer());
162 groupBox.setLabel(
"Group VBoxLayout");
163 groupBox.addChild(vLayout);
168 result.setLabel(text);
172 GroupBox gridGroupBox;
173 gridGroupBox.setLabel(
"Group GridLayout");
174 gridGroupBox.addChild(GridLayout()
179 .add(
Label(
"foooooooooooooooooo"), Pos{2, 1}, Span{1, 2})
180 .add(HSpacer(), Pos{0, 3}, Span{1, 1}));
182 GroupBox collapsedGroup;
183 collapsedGroup.setLabel(
"Group Collapsed");
184 collapsedGroup.setCollapsed(
true);
185 collapsedGroup.addChild(
Label(
"This can only be seen if expanded"));
187 VBoxLayout root = {groupBox, gridGroupBox, collapsedGroup};
193 RemoteGuiExample2::updateTab_Widgets()
195 widgetsTab.receiveUpdates();
198 int intSliderValue = widgetsTab.intSlider.getValue();
199 widgetsTab.intSpin.setValue(intSliderValue);
202 float floatBoxValue = widgetsTab.floatSpin.getValue();
203 widgetsTab.floatSlider.setValue(floatBoxValue);
205 widgetsTab.sendUpdates();
209 RemoteGuiExample2::createTab_Events()
215 label.setText(
"Counter: ");
217 eventsTab.spinInt.setRange(-10, 10);
218 eventsTab.spinInt.setValue(0);
222 line.addChild(label);
223 line.addChild(eventsTab.spinInt);
225 vLayout.addChild(line);
229 eventsTab.buttonUp.setLabel(
"Up");
230 eventsTab.buttonDown.setLabel(
"Down");
233 line.addChild(eventsTab.buttonUp);
234 line.addChild(eventsTab.buttonDown);
236 vLayout.addChild(line);
239 vLayout.addChild(VSpacer());
245 RemoteGuiExample2::updateTab_Events()
247 int currentValue = eventsTab.spinInt.getValue();
248 if (eventsTab.buttonUp.wasClicked())
252 if (eventsTab.buttonDown.wasClicked())
257 eventsTab.spinInt.setValue(currentValue);
int Label(int n[], int size, int *curLabel, MiscLib::Vector< std::pair< int, size_t > > *labels)
#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName)
Default component property definition container.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Brief description of class RemoteGuiExample2.
void onInitComponent() override
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
static std::string GetDefaultName()
void onExitComponent() override
std::string getDefaultName() const override
#define ARMARX_INFO
The normal logging level.
detail::ButtonBuilder makeButton(std::string const &name)
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
void RemoteGui_startRunningTask()
void RemoteGui_createTab(std::string const &name, RemoteGui::Client::Widget const &rootWidget, RemoteGui::Client::Tab *tab)
void setValue(std::string const &text)