mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
VisualBuilder: Hook up everything needed for widget property editing.
It's now possible to edit widget properties inline in the properties window. We're currently relying on the basic GVariant conversion functions to do all the "parsing" but that's not gonna be good enough.
This commit is contained in:
parent
18785ba5c3
commit
3a33b8ea08
13 changed files with 123 additions and 46 deletions
|
@ -22,7 +22,7 @@ public:
|
|||
GVariant& operator=(const GVariant&);
|
||||
|
||||
GVariant(GVariant&&) = delete;
|
||||
GVariant& operator=(GVariant&&) = delete;
|
||||
GVariant& operator=(GVariant&&);
|
||||
|
||||
void clear();
|
||||
~GVariant();
|
||||
|
@ -91,6 +91,13 @@ public:
|
|||
return as_bool() ? 1 : 0;
|
||||
if (is_float())
|
||||
return (int)as_float();
|
||||
if (is_string()) {
|
||||
bool ok;
|
||||
int value = as_string().to_int(ok);
|
||||
if (!ok)
|
||||
return 0;
|
||||
return value;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue