digiKam
tagmngrlistview.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 : 20013-08-22
7  * Description : Reimplemented QListView for Tags Manager, with support for
8  * drag-n-drop
9  *
10  * Copyright (C) 2013 by Veaceslav Munteanu <veaceslav dot munteanu90 at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_TAG_MNGR_LIST_VIEW_H
26 #define DIGIKAM_TAG_MNGR_LIST_VIEW_H
27 
28 // Qt includes
29 
30 #include <QTreeView>
31 
32 class QPoint;
33 
34 namespace Digikam
35 {
36 
37 class TagMngrListView : public QTreeView
38 {
39  Q_OBJECT
40 
41 public:
42 
43  explicit TagMngrListView(QWidget* const parent = nullptr);
44 
45  QModelIndexList mySelectedIndexes();
46 
47 protected:
48 
52  void startDrag(Qt::DropActions supportedActions) override;
53  void dropEvent(QDropEvent *e) override;
54 
55  QModelIndex indexVisuallyAt(const QPoint& p);
56 
61  void contextMenuEvent(QContextMenuEvent* event) override;
62 
63 
64 public Q_SLOTS:
65 
69  void slotDeleteSelected();
70 };
71 
72 } // namespace Digikam
73 
74 #endif // DIGIKAM_TAG_MNGR_LIST_VIEW_H
Definition: tagmngrlistview.h:38
void dropEvent(QDropEvent *e) override
Definition: tagmngrlistview.cpp:88
void contextMenuEvent(QContextMenuEvent *event) override
contextMenuEvent - reimplemented method from QListView to handle custom context menu
Definition: tagmngrlistview.cpp:141
void slotDeleteSelected()
slotDeleteSelected - delete selected item from Quick Access List
Definition: tagmngrlistview.cpp:169
void startDrag(Qt::DropActions supportedActions) override
Definition: tagmngrlistview.cpp:59
QModelIndex indexVisuallyAt(const QPoint &p)
Definition: tagmngrlistview.cpp:126
TagMngrListView(QWidget *const parent=nullptr)
Definition: tagmngrlistview.cpp:52
QModelIndexList mySelectedIndexes()
Definition: tagmngrlistview.cpp:83
Definition: datefolderview.cpp:43