blob: 87ee87a588cca2aafad8b216bda97ac088673c26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*
* SPDX-FileCopyrightText: 2010 Peter Penz <[email protected]>
* SPDX-FileCopyrightText: 2008 Fredrik Höglund <[email protected]>
* SPDX-FileCopyrightText: 2012 Mark Gaiser <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef DOLPHINFILEMETADATAWIDGET_H
#define DOLPHINFILEMETADATAWIDGET_H
#include <config-baloo.h>
#include <QWidget>
class KFileItemList;
class QLabel;
namespace Baloo {
class FileMetaDataWidget;
}
/**
* @brief Widget that shows the meta information and a preview of one
* or more files inside a KToolTipWidget.
*/
class DolphinFileMetaDataWidget : public QWidget
{
Q_OBJECT
public:
explicit DolphinFileMetaDataWidget(QWidget* parent = nullptr);
~DolphinFileMetaDataWidget() override;
void setPreview(const QPixmap& pixmap);
QPixmap preview() const;
void setName(const QString& name);
QString name() const;
/**
* Sets the items for which the meta data should be shown.
* The signal metaDataRequestFinished() will be emitted,
* as soon as the meta data for the items has been received.
*/
void setItems(const KFileItemList& items);
KFileItemList items() const;
signals:
/**
* Is emitted after the meta data has been received for the items
* set by DolphinFileMetaDataWidget::setItems().
*/
void metaDataRequestFinished(const KFileItemList& items);
/**
* Is emitted when the user clicks a tag or a link
* in the metadata widget.
*/
void urlActivated(const QUrl& url);
private:
QLabel* m_preview;
QLabel* m_name;
Baloo::FileMetaDataWidget* m_fileMetaDataWidget;
};
#endif
|