Baloo Widgets

filemetadataconfigwidget.h
1/*
2 SPDX-FileCopyrightText: 2013 Vishesh Handa <me@vhanda.in>
3 SPDX-FileCopyrightText: 2009 Peter Penz <peter.penz@gmx.at>
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
18namespace Baloo
19{
20#if BALOO_WIDGETS_ENABLE_DEPRECATED_SINCE(23, 8)
21class FileMetaDataConfigWidgetPrivate;
22
23/**
24 * @brief Widget which allows to configure which meta data should be shown
25 * in the FileMetadataWidget
26 * @deprecated Since 23.08, use FileMetaDataWidget::setConfigurationMode()
27 * instead.
28 */
29class BALOO_WIDGETS_EXPORT FileMetaDataConfigWidget : public QWidget
30{
31 Q_OBJECT
32
33public:
34 explicit FileMetaDataConfigWidget(QWidget *parent = nullptr);
35 ~FileMetaDataConfigWidget() override;
36
37 /**
38 * Sets the items, for which the visibility of the meta data should
39 * be configured. Note that the visibility of the meta data is not
40 * bound to the items itself, the items are only used to determine
41 * which meta data should be configurable. For example when a JPEG image
42 * is set as item, it will be configurable which EXIF data should be
43 * shown. If an audio file is set as item, it will be configurable
44 * whether the artist, album name, ... should be shown.
45 */
46 void setItems(const KFileItemList &items);
47 KFileItemList items() const;
48
49 /**
50 * Saves the modified configuration.
51 */
52 void save();
53
54 /** @see QWidget::sizeHint() */
55 QSize sizeHint() const override;
56
57protected:
58 bool event(QEvent *event) override;
59
60private:
61 friend class FileMetaDataConfigWidgetPrivate;
62 std::unique_ptr<FileMetaDataConfigWidgetPrivate> const d;
63
64 Q_PRIVATE_SLOT(d, void loadMetaData())
65 Q_PRIVATE_SLOT(d, void slotLoadingFinished())
66};
67#endif
68}
69#endif
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
QAction * save(const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 12:00:13 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.