summaryrefslogtreecommitdiffstats
path: root/filepropertiesdialog.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2011-01-27 13:06:32 +0100
committerArno <am@disconnect.de>2011-01-27 13:06:32 +0100
commitaaef34e66368a2803ae876d734809b69f0c258a2 (patch)
tree71db0c618431c361c143dba3386045c7682d4d17 /filepropertiesdialog.cpp
parente4718ab079f4a4eba4a47fb75992b977a787f369 (diff)
downloadSheMov-aaef34e66368a2803ae876d734809b69f0c258a2.tar.gz
SheMov-aaef34e66368a2803ae876d734809b69f0c258a2.tar.bz2
SheMov-aaef34e66368a2803ae876d734809b69f0c258a2.zip
Finished metadata
Created a modes for metadata, revamped NewMovieWizard to use the model and created a MetadataWidget to edit and display metadata.
Diffstat (limited to 'filepropertiesdialog.cpp')
-rw-r--r--filepropertiesdialog.cpp42
1 files changed, 31 insertions, 11 deletions
diff --git a/filepropertiesdialog.cpp b/filepropertiesdialog.cpp
index bcbcde6..e7e6a34 100644
--- a/filepropertiesdialog.cpp
+++ b/filepropertiesdialog.cpp
@@ -14,21 +14,27 @@
#include <QColor>
#include <QVariant>
#include <QPalette>
+#include <QTabWidget>
#include "filepropertiesdialog.h"
+#include "seriesmetadatamodel.h"
#include "smtreemodel.h"
#include "smtreeitem.h"
#include "helper.h"
-FilePropertiesDialog::FilePropertiesDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f){
- //main layout
- QVBoxLayout *mainLayout = new QVBoxLayout;
+FilePropertiesDialog::FilePropertiesDialog(int seriesPartId, QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f){
+ //tab
+ mTab = new QTabWidget;
+
+ //stream data widget
+ QVBoxLayout *streamDataLayout = new QVBoxLayout;
+ QWidget *streamData = new QWidget;
//description
mDescriptionLabel = new QLabel(tr("Properties for [none]"));
mDescriptionLabel->setAutoFillBackground(true);
mDescriptionLabel->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
- mainLayout->addWidget(mDescriptionLabel);
+ streamDataLayout->addWidget(mDescriptionLabel);
QSettings s;
QVariant varColor = s.value("ui/alternatecolor");
QColor labelColor = varColor.value<QColor>();
@@ -43,16 +49,30 @@ FilePropertiesDialog::FilePropertiesDialog(QWidget *parent, Qt::WindowFlags f) :
mView->setAlternatingRowColors(true);
mView->setEditTriggers(QAbstractItemView::NoEditTriggers);
mView->setModel(mModel);
- mainLayout->addWidget(mView);
+ streamDataLayout->addWidget(mView);
+ streamData->setLayout(streamDataLayout);
+ mTab->addTab(streamData, tr("Stream data"));
+
+ //metadata widget
+ mMetadata = new MetadataWidget;
+ mMetadata->setSeriesPartId(seriesPartId);
+ mTab->addTab(mMetadata, tr("Metadata"));
- //ok button
+ //buttons
QHBoxLayout *buttonLayout = new QHBoxLayout;
- mClose = new QPushButton(tr("Close"));
- connect(mClose, SIGNAL(clicked()), this, SLOT(accept()));
- buttonLayout->setAlignment(Qt::AlignCenter);
- buttonLayout->addWidget(mClose);
- mainLayout->addLayout(buttonLayout);
+ mOk = new QPushButton(tr("Ok"));
+ connect(mOk, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(mOk, SIGNAL(clicked()), mMetadata, SLOT(accept()));
+ mCancel = new QPushButton(tr("Cancel"));
+ connect(mCancel, SIGNAL(clicked()), this, SLOT(reject()));
+ buttonLayout->setAlignment(Qt::AlignRight);
+ buttonLayout->addWidget(mOk);
+ buttonLayout->addWidget(mCancel);
+ //main layout
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(mTab);
+ mainLayout->addLayout(buttonLayout);
setLayout(mainLayout);
setMinimumWidth(450);
}