diff options
Diffstat (limited to 'archiveview.cpp')
-rw-r--r-- | archiveview.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/archiveview.cpp b/archiveview.cpp index c43afe5..8e95eae 100644 --- a/archiveview.cpp +++ b/archiveview.cpp @@ -798,6 +798,19 @@ MetadataEditorWidget::MetadataEditorWidget(QWidget *parent) : QWidget(parent){ srcGBL->addStretch(); srcGB->setLayout(srcGBL); + QGroupBox *reasonGB = new QGroupBox(tr("Reencode reason")); + QHBoxLayout *reasonGBL = new QHBoxLayout; + mReencReason = new QComboBox; + QStringList reasons = SmGlobals::instance()->reencReasons(); + mReencReason->addItems(reasons); + connect(mReencReason, SIGNAL(currentIndexChanged(QString)), this, SLOT(addToComment(QString))); + reasonGBL->addWidget(mReencReason); + reasonGB->setLayout(reasonGBL); + + QHBoxLayout *srcReasonL = new QHBoxLayout; + srcReasonL->addWidget(srcGB); + srcReasonL->addWidget(reasonGB); + //comment QGroupBox *commentGB = new QGroupBox(tr("Comment")); mComment = new QTextEdit; @@ -809,7 +822,7 @@ MetadataEditorWidget::MetadataEditorWidget(QWidget *parent) : QWidget(parent){ mainLayout->addWidget(captionL); mainLayout->addWidget(genGB); - mainLayout->addWidget(srcGB); + mainLayout->addLayout(srcReasonL); mainLayout->addWidget(commentGB); setLayout(mainLayout); } @@ -844,6 +857,10 @@ QList<QVariant> MetadataEditorWidget::metadata() const{ return retval; } +void MetadataEditorWidget::addToComment(const QString &reason){ + mComment->append(reason); +} + /* Metadata Editor */ MetadataEditor::MetadataEditor(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f){ mWidget = new MetadataEditorWidget; |