diff options
-rw-r--r-- | src/editorwindow.cc | 3 | ||||
-rw-r--r-- | src/sidebar.cc | 18 | ||||
-rw-r--r-- | src/sidebar.h | 1 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/editorwindow.cc b/src/editorwindow.cc index 65a84e6..5ae0be8 100644 --- a/src/editorwindow.cc +++ b/src/editorwindow.cc @@ -137,6 +137,9 @@ bool EditorWindow::loadFile(const QString &filename) } else if (ini.got_key_float("radius", f)) { entity->properties()->set_radius(f); + + } else if (ini.got_key_string("info", str)) { + entity->properties()->add_info(str); } else if (ini.got_key()) { entity->properties()->add_value(ini.key(), ini.value()); diff --git a/src/sidebar.cc b/src/sidebar.cc index c541f92..f3ac033 100644 --- a/src/sidebar.cc +++ b/src/sidebar.cc @@ -54,9 +54,13 @@ SideBar::SideBar(QWidget *parent) : QWidget(parent) connect(edit_entitylocation_z, SIGNAL(textChanged(const QString &)), this, SLOT(updateEntityLocationZ(const QString &))); // entity properties - QLabel *label_entityproperties = new QLabel(tr("properties")); + QLabel *label_entityproperties = new QLabel(tr("properties")); text_entityproperties = new QTextEdit(); + // entity info + QLabel *label_info = new QLabel(tr("info")); + text_info = new QTextEdit(); + // entity subsections QLabel *label_entitysubsections = new QLabel(tr("subsections")); text_subsections = new QTextEdit(); @@ -69,8 +73,13 @@ SideBar::SideBar(QWidget *parent) : QWidget(parent) box_global->addLayout(box_entitylabel); box_global->addLayout(box_entityname); box_global->addLayout(box_entitylocation); + box_global->addWidget(label_entityproperties); box_global->addWidget(text_entityproperties,1); + + box_global->addWidget(label_info); + box_global->addWidget(text_info,1); + box_global->addWidget(label_entitysubsections); box_global->addWidget(text_subsections,1); @@ -140,6 +149,10 @@ void SideBar::setProperties(EntityProperties *properties) text_subsections->setEnabled(false); text_subsections->clear(); + + text_info->setEnabled(false); + text_info->clear(); + } else { QString value; @@ -166,6 +179,9 @@ void SideBar::setProperties(EntityProperties *properties) text_subsections->setEnabled(true); text_subsections->setText(properties->subsections()); + + text_info->setEnabled(true); + text_info->setText(properties->info()); } } diff --git a/src/sidebar.h b/src/sidebar.h index 05a79f0..0f6b35c 100644 --- a/src/sidebar.h +++ b/src/sidebar.h @@ -66,6 +66,7 @@ private: QLineEdit *edit_entitylocation_z; QTextEdit *text_entityproperties; QTextEdit *text_subsections; + QTextEdit *text_info; EntityProperties *last_selected; }; |