digiKam
namespacelistview.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 : 2013-08-22
7  * Description : Reimplemented QListView for metadata setup, with support for
8  * drag-n-drop
9  *
10  * Copyright (C) 2013-2015 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_NAMESPACE_LISTVIEW_H
26 #define DIGIKAM_NAMESPACE_LISTVIEW_H
27 
28 // Qt includes
29 
30 #include <QListView>
31 
32 class QPoint;
33 
34 namespace Digikam
35 {
36 
37 class NamespaceListView : public QListView
38 {
39  Q_OBJECT
40 
41 public:
42 
43  explicit NamespaceListView(QWidget* const parent = nullptr);
44  QModelIndexList mySelectedIndexes();
45 
46 protected:
47 
51  void startDrag(Qt::DropActions supportedActions) override;
52  void dropEvent(QDropEvent* e) override;
53 
54  QModelIndex indexVisuallyAt(const QPoint& p);
55 
60 /*
61  void contextMenuEvent(QContextMenuEvent* event);
62 */
63 
64 Q_SIGNALS:
65 
67 
68 public Q_SLOTS:
69 
73  void slotDeleteSelected();
74 
75  void slotMoveItemDown();
76 
77  void slotMoveItemUp();
78 };
79 
80 } // namespace Digikam
81 
82 #endif // DIGIKAM_NAMESPACE_LISTVIEW_H
Definition: namespacelistview.h:38
void slotMoveItemUp()
Definition: namespacelistview.cpp:149
void slotDeleteSelected()
slotDeleteSelected - delete selected item from Quick Access List
Definition: namespacelistview.cpp:92
void startDrag(Qt::DropActions supportedActions) override
Definition: namespacelistview.cpp:60
NamespaceListView(QWidget *const parent=nullptr)
Definition: namespacelistview.cpp:50
QModelIndexList mySelectedIndexes()
Definition: namespacelistview.cpp:65
QModelIndex indexVisuallyAt(const QPoint &p)
Definition: namespacelistview.cpp:77
void signalItemsChanged()
contextMenuEvent - reimplemented method from QListView to handle custom context menu
void slotMoveItemDown()
Definition: namespacelistview.cpp:118
void dropEvent(QDropEvent *e) override
Definition: namespacelistview.cpp:70
Definition: datefolderview.cpp:43