Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-02-19 16:11:07 +0000
committerStijn Buys <ingar@osirion.org>2012-02-19 16:11:07 +0000
commit85500fcb7a8aae73da87af337e2984cc91425eb8 (patch)
treef8cc7ca6dacd72fa72cf0ba6a6d8cc1054706965 /src/entitywidget.cc
parent7a9c504720e494ee07d16a6234b77c500af4da93 (diff)
Added subsections textbox
Diffstat (limited to 'src/entitywidget.cc')
-rw-r--r--src/entitywidget.cc26
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)