digiKam
Loading...
Searching...
No Matches
dwitemdelegate_p.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 : 2007-11-15
7 * Description : widget item delegate for setup collection view
8 *
9 * SPDX-FileCopyrightText: 2015-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2007-2008 by Rafael Fernández López <ereslibre at kde dot org>
11 * SPDX-FileCopyrightText: 2008 by Kevin Ottens <ervin at kde dot org>
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 *
15 * ============================================================ */
16
17#pragma once
18
19#include "dwitemdelegate.h"
20
21// Qt includes
22
23#include <QObject>
24#include <QItemSelectionModel>
25
26namespace Digikam
27{
28
29class DWItemDelegate;
30class DWItemDelegatePool;
31
32class Q_DECL_HIDDEN DWItemDelegatePrivate : public QObject
33{
34 Q_OBJECT
35
36public:
37
38 explicit DWItemDelegatePrivate(DWItemDelegate* const qq, QObject* const parent = nullptr);
39 ~DWItemDelegatePrivate() override;
40
41 void updateRowRange(const QModelIndex& parent, int start, int end, bool isRemoving);
42 QStyleOptionViewItem optionView(const QModelIndex& index);
43
44public Q_SLOTS:
45
46 void initializeModel(const QModelIndex& parent = QModelIndex());
47
48 void slotDWRowsInserted(const QModelIndex& parent, int start, int end);
49 void slotDWRowsAboutToBeRemoved(const QModelIndex& parent, int start, int end);
50 void slotDWRowsRemoved(const QModelIndex& parent, int start, int end);
51 void slotDWDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
52 void slotDWLayoutChanged();
53 void slotDWModelReset();
54 void slotDWSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
55
56protected:
57
58 bool eventFilter(QObject* watched, QEvent* event) override;
59
60public:
61
62 QAbstractItemView* itemView = nullptr;
63 DWItemDelegatePool* widgetPool = nullptr;
64 QAbstractItemModel* model = nullptr;
65 QItemSelectionModel* selectionModel = nullptr;
66 DWItemDelegate* q = nullptr;
67};
68
69} // namespace Digikam
Definition dwitemdelegatepool.h:39
Definition dwitemdelegate_p.h:33
Definition dwitemdelegate.h:50
Definition datefolderview.cpp:34