stacked widget

tested and working
This commit is contained in:
2026-02-14 14:32:07 +01:00
parent faac84821c
commit 4da26083a7
9 changed files with 236 additions and 96 deletions
+3 -1
View File
@@ -11,7 +11,7 @@ Test_Sim::Test_Sim(Communication *com, QObject *parent)
m_thermo("Thermo", "%", Color::White, Color::Black, 0, 100, 0), m_led("Led", Color::White, Color::Red),
m_table(4, 4, {"Row 1", "Row 2", "Row 3", "Row 4"}, {"Column 1", "Column 2", "Column 3", "Column 4"}),
m_spinbox(0, 255, 0), m_double_spinbox(0, 255, 0), m_hex_spinbox(0, 255, 0),
m_tab_widget({"Tab 1", "Tab 2", "Tab 3"}, 0, this)
m_tab_widget({"Tab 1", "Tab 2", "Tab 3"}, 0), m_stacked_widget(3, 0)
{
m_thermo.set_start_color(Color::Red);
m_thermo.set_end_color(Color::Red);
@@ -34,6 +34,7 @@ Test_Sim::Test_Sim(Communication *com, QObject *parent)
PUSH_UI_ITEM(m_double_spinbox);
PUSH_UI_ITEM(m_hex_spinbox);
PUSH_UI_ITEM(m_tab_widget);
PUSH_UI_ITEM(m_stacked_widget);
for (size_t i = 0; i < m_table.capacity(); i++)
{
@@ -54,6 +55,7 @@ void Test_Sim::timer()
}
m_slider.set_value(m_slider.value() + 1);
m_tab_widget.advance_tab();
m_stacked_widget.advance_tab();
}
void Test_Sim::run_at_startup()
+1
View File
@@ -28,4 +28,5 @@ class Test_Sim : public Simulator_base
UI_double_spinbox m_double_spinbox;
UI_hex_spinbox m_hex_spinbox;
UI_tab_widget m_tab_widget;
UI_stacked_widget m_stacked_widget;
};