Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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)