Qmmp
detailsdialog.h
1 /***************************************************************************
2  * Copyright (C) 2009-2020 by Ilya Kotov *
3  * forkotov02@ya.ru *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef DETAILSDIALOG_H
21 #define DETAILSDIALOG_H
22 
23 #include <QDialog>
24 #include <QList>
25 #include <qmmp/qmmp.h>
26 #include <qmmp/trackinfo.h>
27 #include "qmmpui_export.h"
28 
29 class QTextCodec;
30 class QAbstractButton;
31 class PlayListTrack;
32 class MetaDataModel;
33 class MetaDataItem;
34 
35 namespace Ui {
36  class DetailsDialog;
37 }
38 
42 class QMMPUI_EXPORT DetailsDialog : public QDialog
43 {
44  Q_OBJECT
45 public:
51  DetailsDialog(QList<PlayListTrack *> tracks, QWidget *parent = nullptr);
55  ~DetailsDialog();
56 
57 private slots:
58  void on_buttonBox_clicked(QAbstractButton *button);
59  void on_tabWidget_currentChanged(int index);
60  void on_directoryButton_clicked();
61  void on_prevButton_clicked();
62  void on_nextButton_clicked();
63 
64 private:
65  Ui::DetailsDialog *m_ui;
66  void closeEvent(QCloseEvent *) override;
67  void updatePage();
68  void printInfo();
69  QString formatRow(const QString &key, const QString &value) const;
70  QString formatRow(const MetaDataItem &item) const;
71  MetaDataModel *m_metaDataModel;
72  QList<PlayListTrack *> m_tracks;
73  TrackInfo m_info;
74  int m_page;
75 };
76 
77 #endif
Container of extra file/track property.
Definition: metadatamodel.h:37
The MetaDataModel is the base interface class of metadata access.
Definition: metadatamodel.h:80
The TrackInfo class stores metadata and other information about track.
Definition: trackinfo.h:31
The DetailsDialog class provides dialog to show/edit metadata.
Definition: detailsdialog.h:42
The PlayListTrack class provides a track for use with the PlayListModel class.
Definition: playlisttrack.h:36