Debian Codegraph @

core/tests/geolocation/geoiface/demo/mytreewidget.h

raw symbols SCIP
1 /* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2010-03-06
7 * Description : sub class of QTreeWidget for drag-and-drop support
8 *
9 * SPDX-FileCopyrightText: 2010 by Michael G. Hansen <mike at mghansen dot de>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15 #pragma once
16
17 // Qt includes
18
19 #include <QTreeWidget>
20 #include <QPersistentModelIndex>
21
22 // Local includes
23
24 #include "myimageitem.h"
25
26 class QMouseEvent;
27
28 Q_DECLARE_METATYPE(QTreeWidgetItem*)
29
30 class MyTreeWidget : public QTreeWidget
31 {
32 Q_OBJECT
33
34 public:
35
36 explicit MyTreeWidget(QWidget* const parent = nullptr);
37 ~MyTreeWidget() override;
38
39 protected:
40
41 void startDrag(Qt::DropActions supportedActions) override;
42
43 #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
44
45 QMimeData* mimeData(const QList<QTreeWidgetItem*>& items) const override;
46
47 #else
48
49 // cppcheck-suppress passedByValue
50 QMimeData* mimeData(const QList<QTreeWidgetItem*> items) const override; // clazy:exclude=function-args-by-ref
51
52 #endif
53
54 // cppcheck-suppress passedByValue
55 virtual QMimeData* mimeData(const QModelIndexList items) const;
56
57 private:
58
59 class Private;
60 Private* const d = nullptr;
61 };