Baloo Widgets

filemetadataconfigwidget.h
1 /*
2  SPDX-FileCopyrightText: 2013 Vishesh Handa <[email protected]>
3  SPDX-FileCopyrightText: 2009 Peter Penz <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef BALOO_FILEMETADATACONFIGWIDGET_H
9 #define BALOO_FILEMETADATACONFIGWIDGET_H
10 
11 #include "widgets_export.h"
12 #include <KFileItem>
13 
14 #include <QWidget>
15 
16 #include <memory>
17 
18 namespace Baloo
19 {
20 class FileMetaDataConfigWidgetPrivate;
21 
22 /**
23  * @brief Widget which allows to configure which meta data should be shown
24  * in the FileMetadataWidget
25  */
26 class BALOO_WIDGETS_EXPORT FileMetaDataConfigWidget : public QWidget
27 {
28  Q_OBJECT
29 
30 public:
31  explicit FileMetaDataConfigWidget(QWidget *parent = nullptr);
32  ~FileMetaDataConfigWidget() override;
33 
34  /**
35  * Sets the items, for which the visibility of the meta data should
36  * be configured. Note that the visibility of the meta data is not
37  * bound to the items itself, the items are only used to determine
38  * which meta data should be configurable. For example when a JPEG image
39  * is set as item, it will be configurable which EXIF data should be
40  * shown. If an audio file is set as item, it will be configurable
41  * whether the artist, album name, ... should be shown.
42  */
43  void setItems(const KFileItemList &items);
44  KFileItemList items() const;
45 
46  /**
47  * Saves the modified configuration.
48  */
49  void save();
50 
51  /** @see QWidget::sizeHint() */
52  QSize sizeHint() const override;
53 
54 protected:
55  bool event(QEvent *event) override;
56 
57 private:
58  friend class FileMetaDataConfigWidgetPrivate;
59  std::unique_ptr<FileMetaDataConfigWidgetPrivate> const d;
60 
61  Q_PRIVATE_SLOT(d, void loadMetaData())
62  Q_PRIVATE_SLOT(d, void slotLoadingFinished())
63 };
64 
65 }
66 #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-2022 The KDE developers.
Generated on Fri Aug 19 2022 04:12:56 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.