diff options
author | Stijn Buys <ingar@osirion.org> | 2012-02-19 16:11:07 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-02-19 16:11:07 +0000 |
commit | 85500fcb7a8aae73da87af337e2984cc91425eb8 (patch) | |
tree | f8cc7ca6dacd72fa72cf0ba6a6d8cc1054706965 /src/entitywidget.cc | |
parent | 7a9c504720e494ee07d16a6234b77c500af4da93 (diff) |
Added subsections textbox
Diffstat (limited to 'src/entitywidget.cc')
-rw-r--r-- | src/entitywidget.cc | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/entitywidget.cc b/src/entitywidget.cc index f04c177..50056c0 100644 --- a/src/entitywidget.cc +++ b/src/entitywidget.cc @@ -55,14 +55,34 @@ void EntityWidget::set_properties(const QString &properties) { entity_properties = properties; } + void EntityWidget::add_property(const QString &key, const QString &value) { - if (entity_properties.size()) { - entity_properties += '\n'; - } entity_properties += key; entity_properties += '='; entity_properties += value; + entity_properties += '\n'; +} + +void EntityWidget::add_subsection(const QString &name) +{ + if (entity_subsections.size()) { + entity_subsections += '\n'; + } + + entity_subsections += '['; + entity_subsections += name; + entity_subsections += ']'; + entity_subsections += '\n'; + +} + +void EntityWidget::add_subsection_property(const QString &key, const QString &value) +{ + entity_subsections += key; + entity_subsections += '='; + entity_subsections += value; + entity_subsections += '\n'; } void EntityWidget::paintEvent(QPaintEvent *event) |