diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-01 00:23:31 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-01 00:23:31 +0200 |
commit | 40ca3b019f293977bbb3c1b673e952c23b6e3264 (patch) | |
tree | b0ef917add5712ef32839956b96bc119615d24a3 /DevTools/VisualBuilder/VBWidget.cpp | |
parent | b0d8dba16da63407a268938e8c52b0fdbe46a247 (diff) | |
download | serenity-40ca3b019f293977bbb3c1b673e952c23b6e3264.zip |
VisualBuilder: Add GRadioButton to the widget repertoire.
Diffstat (limited to 'DevTools/VisualBuilder/VBWidget.cpp')
-rw-r--r-- | DevTools/VisualBuilder/VBWidget.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/DevTools/VisualBuilder/VBWidget.cpp b/DevTools/VisualBuilder/VBWidget.cpp index 084cddbaf4..49ab472c3a 100644 --- a/DevTools/VisualBuilder/VBWidget.cpp +++ b/DevTools/VisualBuilder/VBWidget.cpp @@ -1,18 +1,19 @@ -#include "VBWidget.h" #include "VBForm.h" #include "VBProperty.h" -#include "VBWidgetRegistry.h" +#include "VBWidget.h" #include "VBWidgetPropertyModel.h" -#include <LibGUI/GPainter.h> -#include <LibGUI/GLabel.h> +#include "VBWidgetRegistry.h" #include <LibGUI/GButton.h> -#include <LibGUI/GScrollBar.h> -#include <LibGUI/GSpinBox.h> -#include <LibGUI/GTextEditor.h> -#include <LibGUI/GGroupBox.h> #include <LibGUI/GCheckBox.h> +#include <LibGUI/GGroupBox.h> +#include <LibGUI/GLabel.h> +#include <LibGUI/GPainter.h> #include <LibGUI/GProgressBar.h> +#include <LibGUI/GRadioButton.h> +#include <LibGUI/GScrollBar.h> #include <LibGUI/GSlider.h> +#include <LibGUI/GSpinBox.h> +#include <LibGUI/GTextEditor.h> VBWidget::VBWidget(VBWidgetType type, VBForm& form) : m_type(type) @@ -161,9 +162,14 @@ void VBWidget::setup_properties() } if (m_type == VBWidgetType::GCheckBox) { - VB_ADD_PROPERTY(GCheckBox, "caption", text, set_text, string); + VB_ADD_PROPERTY(GCheckBox, "text", text, set_text, string); VB_ADD_PROPERTY(GCheckBox, "checked", is_checked, set_checked, bool); } + + if (m_type == VBWidgetType::GRadioButton) { + VB_ADD_PROPERTY(GRadioButton, "text", text, set_text, string); + VB_ADD_PROPERTY(GRadioButton, "checked", is_checked, set_checked, bool); + } } void VBWidget::synchronize_properties() |