From 299b7a6ce6de170aba94a853d7a4bc28e478781d Mon Sep 17 00:00:00 2001 From: Marek Kochanowicz Date: Wed, 12 Mar 2014 11:08:04 +0100 Subject: [PATCH] Added buttons, they don't do anything. --- apps/opencs/view/world/dialoguesubview.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/apps/opencs/view/world/dialoguesubview.cpp b/apps/opencs/view/world/dialoguesubview.cpp index dd38e770f9..e34d744d93 100644 --- a/apps/opencs/view/world/dialoguesubview.cpp +++ b/apps/opencs/view/world/dialoguesubview.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include "../../model/world/columnbase.hpp" #include "../../model/world/idtable.hpp" @@ -317,7 +318,7 @@ void CSVWorld::EditWidget::remake(const CSMWorld::UniversalId& id) { mWidgetMapper->addMapping (editor, i); QLabel* label = new QLabel(mTable->headerData (i, Qt::Horizontal).toString(), mMainWidget); - label->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); + label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); editor->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); if (! (mTable->flags (mTable->index (0, i)) & Qt::ItemIsEditable)) { @@ -351,9 +352,22 @@ CSVWorld::DialogueSubView::DialogueSubView (const CSMWorld::UniversalId& id, CSM SubView (id) { - EditWidget* widget = new EditWidget(this, id, document, false); + QWidget *mainWidget = new QWidget(this); + + QHBoxLayout *buttonsLayout = new QHBoxLayout; + QPushButton* mPrevButton = new QPushButton(tr("Previous")); + QPushButton* mNextButton = new QPushButton(tr("Next")); + buttonsLayout->addWidget(mPrevButton); + buttonsLayout->addWidget(mNextButton); + + QVBoxLayout *mainLayout = new QVBoxLayout(mainWidget); + + EditWidget* editWidget = new EditWidget(mainWidget, id, document, false); + mainLayout->addLayout(buttonsLayout); + mainLayout->addWidget(editWidget); + editWidget->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); + setWidget(mainWidget); - setWidget (widget); } void CSVWorld::DialogueSubView::setEditLock (bool locked)