digiKam
itemfiltershistoryitemdelegate.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-07-02
7  * Description : delegate for custom painting of used filters view
8  *
9  * Copyright (C) 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_ITEM_FILTERS_HISTORY_ITEM_DELEGATE_H
25 #define DIGIKAM_ITEM_FILTERS_HISTORY_ITEM_DELEGATE_H
26 
27 // Qt includes
28 
29 #include <QStyledItemDelegate>
30 
31 namespace Digikam
32 {
33 
34 class ItemFiltersHistoryItemDelegate : public QStyledItemDelegate
35 {
36  Q_OBJECT
37 
38 public:
39 
40  explicit ItemFiltersHistoryItemDelegate(QObject* const parent = nullptr);
42 
43  void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
44  QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override;
45 };
46 
47 } //namespace Digikam
48 
49 #endif // DIGIKAM_ITEM_FILTERS_HISTORY_ITEM_DELEGATE_H
Definition: itemfiltershistoryitemdelegate.h:35
~ItemFiltersHistoryItemDelegate() override
Definition: itemfiltershistoryitemdelegate.cpp:52
ItemFiltersHistoryItemDelegate(QObject *const parent=nullptr)
Definition: itemfiltershistoryitemdelegate.cpp:47
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: itemfiltershistoryitemdelegate.cpp:70
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: itemfiltershistoryitemdelegate.cpp:56
Definition: datefolderview.cpp:43