From 11032ae73ea103d97d9fefb1375b957fa505eeaa Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 12 Jul 2013 11:44:04 +0200 Subject: Split MetadataEditor Again, split the editor into a widget and a dialog, so we can use the widget in NewMovieWizard. --- archiveview.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'archiveview.h') diff --git a/archiveview.h b/archiveview.h index ed19e4e..41c86c3 100644 --- a/archiveview.h +++ b/archiveview.h @@ -179,15 +179,18 @@ class MappingEditor : public QDialog { MappingEditorWidget *mWidget; }; -class MetadataEditor : public QDialog { +class MetadataEditorWidget : public QWidget { Q_OBJECT public: - explicit MetadataEditor(QWidget *parent = 0, Qt::WindowFlags f = 0); + explicit MetadataEditorWidget(QWidget *parent = 0); void setSources(const QStringList &sources); void setReleaseGroups(const QStringList &relGroups); void setMetadata(const QList &data); QList metadata() const; + public slots: + void setEnabledAll(bool enabled); + private: QSpinBox *mReleaseYear; QComboBox *mSource; @@ -196,9 +199,21 @@ class MetadataEditor : public QDialog { QLineEdit *mEncoderOpts; QSpinBox *mPasses; QTextEdit *mComment; + QDate mAdded; + QList mWidgets; +}; + +class MetadataEditor : public QDialog { + Q_OBJECT + public: + explicit MetadataEditor(QWidget *parent = 0, Qt::WindowFlags f = 0); + MetadataEditorWidget *widget() { return mWidget; } + + private: + MetadataEditorWidget *mWidget; QPushButton *mCancel; QPushButton *mAccept; - QDate mAdded; + }; class FileNoDelegate : public QStyledItemDelegate { -- cgit v1.2.3-70-g09d2