From 6274b353c2f22703371e4751b6cb7f96a38d94e9 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 6 Nov 2016 03:12:26 +0100 Subject: Revamp Comments and Metadata Make it a QTextEdit (again?) with HTML content: * A table for metadata * A paragraph for the comment(s) Also add a stretch factor to the containing widget giving it more space. --- archiveview.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'archiveview.cpp') diff --git a/archiveview.cpp b/archiveview.cpp index 8e95eae..c4ac0e4 100644 --- a/archiveview.cpp +++ b/archiveview.cpp @@ -133,22 +133,17 @@ ArchiveView::ArchiveView(QWidget *parent) : QWidget(parent) { genreLayout->addWidget(mGenreView); genreBox->setLayout(genreLayout); - mMetaView = new SmTreeView; - mMetaView->setHeaderHidden(true); - mMetaModel = new QStandardItemModel(this); - mMetaView->setModel(mMetaModel); - mComment = new QTextEdit; - mComment->setReadOnly(true); QGroupBox *metadataBox = new QGroupBox("Metadata/Comment"); QVBoxLayout *metadataLayout = new QVBoxLayout; - metadataLayout->addWidget(mMetaView); - metadataLayout->addWidget(mComment); + mMeta = new QTextEdit; + mMeta->setReadOnly(true); + metadataLayout->addWidget(mMeta); metadataBox->setLayout(metadataLayout); QHBoxLayout *bottomRightLayout = new QHBoxLayout; - bottomRightLayout->addWidget(actorBox); - bottomRightLayout->addWidget(genreBox); - bottomRightLayout->addWidget(metadataBox); + bottomRightLayout->addWidget(actorBox, 1); + bottomRightLayout->addWidget(genreBox, 1); + bottomRightLayout->addWidget(metadataBox, 2); QWidget *bottomRightWidget = new QWidget; bottomRightWidget->setLayout(bottomRightLayout); @@ -286,7 +281,7 @@ void ArchiveView::initController(){ mController->setArchiveFiles(mFiles, mFilesProxy); mController->setModels(mArchiveModel, mFilesModel); mController->setMappingModels(mActorModel, mGenreModel); - mController->setMetadata(mMetaModel, mComment); + mController->setMetadata(mMeta); mController->init(); SmGlobals::instance()->setArchiveController(mController); } -- cgit v1.2.3-70-g09d2