Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
drag_drop_toolbar.h
Go to the documentation of this file.
1
10#ifndef DRAG_DROP_TOOLBAR_H
11#define DRAG_DROP_TOOLBAR_H
12
13#include <QToolBar>
14#include <QPoint>
15
17
18class DragDropToolBar : public QToolBar
19{
20 Q_OBJECT
21public:
22 explicit DragDropToolBar(const QString &title, QWidget *parent = Q_NULLPTR);
23 explicit DragDropToolBar(QWidget *parent = Q_NULLPTR);
25
26 virtual void clear();
27
28signals:
29 void actionMoved(QAction * action, int oldPos, int newPos);
30
31 void newFilterDropped(QString description, QString filter);
32
33protected:
34
35 virtual WiresharkMimeData * createMimeData(QString name, int position);
36
37 virtual void childEvent(QChildEvent * event);
38
39 virtual bool eventFilter(QObject * obj, QEvent * ev);
40 virtual void dragEnterEvent(QDragEnterEvent *event);
41 virtual void dragMoveEvent(QDragMoveEvent *event);
42 virtual void dropEvent(QDropEvent *event);
43
44private:
45
46 QPoint dragStartPosition;
47 int childCounter;
48
49 void setupToolbar();
50 void moveToolbarItems(int fromPos, int toPos);
51
52};
53
54#endif // DRAG_DROP_TOOLBAR_H
Definition drag_drop_toolbar.h:19
Definition wireshark_mime_data.h:15