-
Notifications
You must be signed in to change notification settings - Fork 2
/
qdroptreewidget.h
executable file
·62 lines (52 loc) · 1.36 KB
/
qdroptreewidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef QDROPTREEWIDGET_H
#define QDROPTREEWIDGET_H
#include <QTreeWidget>
class QMimeData;
class QDropTreeWidget : public QTreeWidget
{
Q_OBJECT
public:
QDropTreeWidget(QWidget *parent = 0);
private slots:
bool d_duplicateCheck(QString name, QString dir);
void actionPreview();
void actionRemove();
void actionAdd();
void actionAddFolder();
void openDestination();
void openInput();
void actionRemoveFromHDD();
void actionClear();
signals:
void countUpdate();
void preview();
void remove();
void add();
void addFolder();
void destination();
void input();
void removeHDD();
void a_clear();
protected:
void dragEnterEvent(QDragEnterEvent *event);
// void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
void contextMenuEvent(QContextMenuEvent *event);
private:
void createActions();
void createMenus();
bool checkDestination();
bool checkInput();
QTreeWidget *dropTreeWidget();
QMenu *itemMenu;
QMenu *noItemMenu;
QAction *clearAction;
QAction *previewAction;
QAction *removeAction;
QAction *addAction;
QAction *addFolderAction;
QAction *destinationAction;
QAction *originalAction;
QAction *removeFromHDDAction;
};
#endif // QDROPTREEWIDGET_H