From d6b178b1fdcdac519ded25e3f253d9eeffa84053 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 28 Jul 2013 07:46:16 +0200 Subject: Implement file properties dialog Show file properties in Filemanager and Archive, if the file is available. Also get rid of the palette stuff in SmGlobals. Just call setPalette() early enough and set it in SmTreeView. --- filepropertiesdialog.h | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'filepropertiesdialog.h') diff --git a/filepropertiesdialog.h b/filepropertiesdialog.h index ee9aa96..425f6e6 100644 --- a/filepropertiesdialog.h +++ b/filepropertiesdialog.h @@ -10,29 +10,33 @@ #include "smdialog.h" +class QPushButton; class SmTreeView; -class QLabel; -class QTabWidget; +class SmTreeItem; class SmTreeModel; -class MetadataWidget; +class QTabWidget; +class QStackedWidget; class FilePropertiesDialog : public SmDialog { Q_OBJECT public: - explicit FilePropertiesDialog(/*int seriesPartId, */QWidget *parent = 0, Qt::WindowFlags f = 0); - void setFileName(const QString &fileName); - void setStreamData(const QList > &streamData); - void addData(const QString &caption, const QMap &data); - MetadataWidget *metaWidget() { return mMetadata; }; + explicit FilePropertiesDialog(const QString &file, QWidget *parent = 0, Qt::WindowFlags f = 0); private: - QTabWidget *mTab; - MetadataWidget *mMetadata; - SmTreeView *mView; - QPushButton *mOk; - QPushButton *mCancel; - QLabel *mDescriptionLabel; - SmTreeModel *mModel; + void movieData(); + void movieDataRecursive(QJsonValue start, SmTreeItem *appendTo); + void pictureData(); + void appendItem(const QList &data, SmTreeItem *parent); + QTabWidget *mTab; + QStackedWidget *mStack; + QPushButton *mOk; + SmTreeModel *mFormatModel; + SmTreeView *mFormatView; + SmTreeModel *mStreamModel; + SmTreeView *mStreamView; + SmTreeModel *mPicModel; + SmTreeView *mPicView; + QString mFile; }; #endif // FILEPROPERTIESDIALOG_H -- cgit v1.2.3-70-g09d2