]> cloud.milkyroute.net Git - dolphin.git/blob - src/panels/information/filemetadataconfigurationdialog.h
Remove last traces of KFileMetaDataWidget from information panel
[dolphin.git] / src / panels / information / filemetadataconfigurationdialog.h
1 /***************************************************************************
2 * Copyright (C) 2010 by Peter Penz <peter.penz19@gmail.com> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
19
20 #ifndef FILEMETADATACONFIGURATIONDIALOG_H
21 #define FILEMETADATACONFIGURATIONDIALOG_H
22
23 #include <QDialog>
24
25 #include <KFileItem>
26 #include <config-baloo.h>
27 namespace Baloo {
28 class FileMetaDataConfigWidget;
29 }
30
31 class QLabel;
32
33 /**
34 * @brief Dialog which allows to configure which meta data should be shown
35 * in the Baloo:FileMetaDataWidget.
36 */
37 class FileMetaDataConfigurationDialog : public QDialog
38 {
39 Q_OBJECT
40
41 public:
42 explicit FileMetaDataConfigurationDialog(QWidget* parent = nullptr);
43 ~FileMetaDataConfigurationDialog() override;
44
45 /**
46 * Sets the items, for which the visibility of the meta data should
47 * be configured. Note that the visibility of the meta data is not
48 * bound to the items itself, the items are only used to determine
49 * which meta data should be configurable. For example when a JPEG image
50 * is set as item, it will be configurable which EXIF data should be
51 * shown. If an audio file is set as item, it will be configurable
52 * whether the artist, album name, ... should be shown.
53 */
54 void setItems(const KFileItemList& items);
55 KFileItemList items() const;
56
57 /**
58 * Sets the description that is shown above the list
59 * of meta data. Per default the translated text for
60 * "Select which data should be shown." is set.
61 */
62 void setDescription(const QString& description);
63 QString description() const;
64
65 protected slots:
66 void slotAccepted();
67 private:
68 QLabel* m_descriptionLabel;
69 Baloo::FileMetaDataConfigWidget* m_configWidget;
70 };
71
72 #endif