diff options
author | Arno <arno@disconnect.de> | 2016-11-06 03:12:26 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2016-11-06 03:12:26 +0100 |
commit | 6274b353c2f22703371e4751b6cb7f96a38d94e9 (patch) | |
tree | c477d6697c44b2eaebae2c80e3eea050f10f05db /archiveview.cpp | |
parent | 6e596a0c4bdbb41962816f96c00cf7c95b6d0cac (diff) | |
download | SheMov-6274b353c2f22703371e4751b6cb7f96a38d94e9.tar.gz SheMov-6274b353c2f22703371e4751b6cb7f96a38d94e9.tar.bz2 SheMov-6274b353c2f22703371e4751b6cb7f96a38d94e9.zip |
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.
Diffstat (limited to 'archiveview.cpp')
-rw-r--r-- | archiveview.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
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); } |