]> cloud.milkyroute.net Git - dolphin.git/blob - src/panels/information/filemetadataconfigurationdialog.h
f471d545fa56b08b7c5096df53f909253daa75c3
[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 #include <KFileItem>
25 #include "config-baloo.h"
26
27 #ifndef HAVE_BALOO
28 class KFileMetaDataConfigurationWidget;
29 #else
30 namespace Baloo {
31 class FileMetaDataConfigWidget;
32 }
33 #endif
34
35 class QLabel;
36
37 /**
38 * @brief Dialog which allows to configure which meta data should be shown
39 * in the KFileMetaDataWidget.
40 */
41 class FileMetaDataConfigurationDialog : public QDialog
42 {
43 Q_OBJECT
44
45 public:
46 explicit FileMetaDataConfigurationDialog(QWidget* parent = 0);
47 ~FileMetaDataConfigurationDialog() override;
48
49 /**
50 * Sets the items, for which the visibility of the meta data should
51 * be configured. Note that the visibility of the meta data is not
52 * bound to the items itself, the items are only used to determine
53 * which meta data should be configurable. For example when a JPEG image
54 * is set as item, it will be configurable which EXIF data should be
55 * shown. If an audio file is set as item, it will be configurable
56 * whether the artist, album name, ... should be shown.
57 */
58 void setItems(const KFileItemList& items);
59 KFileItemList items() const;
60
61 /**
62 * Sets the description that is shown above the list
63 * of meta data. Per default the translated text for
64 * "Select which data should be shown." is set.
65 */
66 void setDescription(const QString& description);
67 QString description() const;
68
69 protected slots:
70 void slotAccepted();
71 private:
72 QLabel* m_descriptionLabel;
73 #ifndef HAVE_BALOO
74 KFileMetaDataConfigurationWidget* m_configWidget;
75 #else
76 Baloo::FileMetaDataConfigWidget* m_configWidget;
77 #endif
78 };
79
80 #endif