From 85500fcb7a8aae73da87af337e2984cc91425eb8 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 19 Feb 2012 16:11:07 +0000 Subject: Added subsections textbox --- src/sidebar.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/sidebar.cc') diff --git a/src/sidebar.cc b/src/sidebar.cc index 6298589..498a457 100644 --- a/src/sidebar.cc +++ b/src/sidebar.cc @@ -53,9 +53,14 @@ SideBar::SideBar(QWidget *parent) : QWidget(parent) connect(edit_entitylocation_y, SIGNAL(textChanged(const QString &)), this, SLOT(updateEntityLocationY(const QString &))); connect(edit_entitylocation_z, SIGNAL(textChanged(const QString &)), this, SLOT(updateEntityLocationZ(const QString &))); + // entity properties QLabel *label_entityproperties = new QLabel(tr("properties")); text_entityproperties = new QTextEdit(); + // entity subsections + QLabel *label_entitysubsections = new QLabel(tr("subsections")); + text_subsections = new QTextEdit(); + // global vertical layout QVBoxLayout *box_global = new QVBoxLayout(); @@ -66,6 +71,8 @@ SideBar::SideBar(QWidget *parent) : QWidget(parent) box_global->addLayout(box_entitylocation); box_global->addWidget(label_entityproperties); box_global->addWidget(text_entityproperties,1); + box_global->addWidget(label_entitysubsections); + box_global->addWidget(text_subsections,1); setLayout(box_global); @@ -132,6 +139,9 @@ void SideBar::setEntity(EntityWidget *entity) text_entityproperties->setEnabled(false); text_entityproperties->clear(); + + text_subsections->setEnabled(false); + text_subsections->clear(); } else { edit_entitylabel->setEnabled(true); edit_entitylabel->setText(entity->label()); @@ -153,6 +163,9 @@ void SideBar::setEntity(EntityWidget *entity) text_entityproperties->setEnabled(true); text_entityproperties->setText(entity->properties()); + + text_subsections->setEnabled(true); + text_subsections->setText(entity->subsections()); } } -- cgit v1.2.3