Baloo Widgets

filemetadataconfigwidget.h
1 /*****************************************************************************
2  * Copyright (C) 2013 by Vishesh Handa <[email protected]> *
3  * Copyright (C) 2009 by Peter Penz <[email protected]> *
4  * *
5  * This library is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Library General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2 of the License, or (at your option) any later version. *
9  * *
10  * This library 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 GNU *
13  * Library General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU Library General Public License *
16  * along with this library; see the file COPYING.LIB. If not, write to *
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
18  * Boston, MA 02110-1301, USA. *
19  *****************************************************************************/
20 
21 #ifndef BALOO_FILEMETADATACONFIGWIDGET_H
22 #define BALOO_FILEMETADATACONFIGWIDGET_H
23 
24 #include "widgets_export.h"
25 #include <KFileItem>
26 
27 #include <QWidget>
28 
29 
30 namespace Baloo {
31 
32 /**
33  * @brief Widget which allows to configure which meta data should be shown
34  * in the FileMetadataWidget
35  */
36 class BALOO_WIDGETS_EXPORT FileMetaDataConfigWidget : public QWidget
37 {
38  Q_OBJECT
39 
40 public:
41  explicit FileMetaDataConfigWidget(QWidget* parent = nullptr);
42  ~FileMetaDataConfigWidget() override;
43 
44  /**
45  * Sets the items, for which the visibility of the meta data should
46  * be configured. Note that the visibility of the meta data is not
47  * bound to the items itself, the items are only used to determine
48  * which meta data should be configurable. For example when a JPEG image
49  * is set as item, it will be configurable which EXIF data should be
50  * shown. If an audio file is set as item, it will be configurable
51  * whether the artist, album name, ... should be shown.
52  */
53  void setItems(const KFileItemList& items);
54  KFileItemList items() const;
55 
56  /**
57  * Saves the modified configuration.
58  */
59  void save();
60 
61  /** @see QWidget::sizeHint() */
62  QSize sizeHint() const override;
63 
64 protected:
65  bool event(QEvent* event) override;
66 
67 private:
68  class Private;
69  Private* const d;
70 
71  Q_PRIVATE_SLOT(d, void loadMetaData())
72  Q_PRIVATE_SLOT(d, void slotLoadingFinished())
73 };
74 
75 }
76 #endif
Widget which allows to configure which meta data should be shown in the FileMetadataWidget.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Oct 21 2021 23:07:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.