1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:18:12 +00:00
serenity/Applications/VisualBuilder/VBProperty.h
Andreas Kling 3cddc3484e VisualBuilder: Add [x, y, width, height] properties for all widgets.
At first I tried doing this as a single "rect" property but I like the
feel of the individual properties much better. :^)
2019-04-11 22:54:04 +02:00

22 lines
523 B
C++

#pragma once
#include <AK/AKString.h>
#include <LibGUI/GVariant.h>
class VBProperty {
public:
VBProperty(const String& name, const GVariant& value);
~VBProperty();
String name() const { return m_name; }
const GVariant& value() const { return m_value; }
void set_value(const GVariant& value) { m_value = value; }
bool is_readonly() const { return m_readonly; }
void set_readonly(bool b) { m_readonly = b; }
private:
String m_name;
GVariant m_value;
bool m_readonly { false };
};