1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

VisualBuilder: Let's have getters and setters for properties.

This commit is contained in:
Andreas Kling 2019-04-14 04:14:23 +02:00
parent 6dc9a6ef42
commit f1b58d8d8c
3 changed files with 24 additions and 3 deletions

View file

@ -6,6 +6,15 @@ VBProperty::VBProperty(const String& name, const GVariant& value)
{
}
VBProperty::VBProperty(const String& name, Function<GVariant(const GWidget&)>&& getter, Function<void(GWidget&, const GVariant&)>&& setter)
: m_name(name)
, m_getter(move(getter))
, m_setter(move(setter))
{
ASSERT(m_getter);
ASSERT(m_setter);
}
VBProperty::~VBProperty()
{
}