digiKam
Loading...
Searching...
No Matches
filtershistorywidget.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2010-08-03
7 * Description : Widget displaying filters history used on an image
8 *
9 * SPDX-FileCopyrightText: 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QWidget>
20#include <QAction>
21#include <QModelIndex>
22#include <QUrl>
23
24// Local includes
25
26#include "digikam_export.h"
27#include "dmetadata.h"
28
29namespace Digikam
30{
31
32class DImageHistory;
33
34class RemoveFilterAction : public QAction
35{
36 Q_OBJECT
37
38public:
39
40 explicit RemoveFilterAction(const QString& label, const QModelIndex& index, QObject* const parent = nullptr);
41 ~RemoveFilterAction() override = default;
42
43 void setIndex(const QModelIndex& index);
44
45public Q_SLOTS:
46
48
49Q_SIGNALS:
50
51 void actionTriggered(QModelIndex index);
52
53private:
54
55 QModelIndex m_index;
56};
57
58// -------------------------------------------------------------------------------------
59
60class FiltersHistoryWidget : public QWidget
61{
62 Q_OBJECT
63
64public:
65
66 explicit FiltersHistoryWidget(QWidget* const parent);
67 ~FiltersHistoryWidget() override;
68
69 void setCurrentURL(const QUrl& url = QUrl());
70
71public Q_SLOTS:
72
73 void showCustomContextMenu(const QPoint& position);
74 void setHistory(const DImageHistory& history);
75 void clearData();
76 void setEnabledEntries(int count);
77 void disableEntries(int count);
78 void enableEntries(int count);
79
80private:
81
82 class Private;
83 Private* const d = nullptr;
84};
85
86} // namespace Digikam
Definition dimagehistory.h:39
Definition filtershistorywidget.h:61
void setHistory(const DImageHistory &history)
Definition filtershistorywidget.cpp:138
void showCustomContextMenu(const QPoint &position)
Definition filtershistorywidget.cpp:108
void disableEntries(int count)
Definition filtershistorywidget.cpp:148
void setCurrentURL(const QUrl &url=QUrl())
Definition filtershistorywidget.cpp:101
void enableEntries(int count)
Definition filtershistorywidget.cpp:153
void setEnabledEntries(int count)
Definition filtershistorywidget.cpp:143
void clearData()
Definition filtershistorywidget.cpp:158
~FiltersHistoryWidget() override
Definition filtershistorywidget.cpp:94
void actionTriggered(QModelIndex index)
RemoveFilterAction(const QString &label, const QModelIndex &index, QObject *const parent=nullptr)
~RemoveFilterAction() override=default
void setIndex(const QModelIndex &index)
Definition datefolderview.cpp:34