A customized QToolBar that supports drag-and-drop reordering of its actions and handling external drops.
More...
#include <drag_drop_toolbar.h>
|
| void | actionMoved (QAction *action, int oldPos, int newPos) |
| | Signal emitted when an action has been moved via drag and drop.
|
| void | newFilterDropped (QString description, QString filter) |
| | Signal emitted when a new filter is dropped onto the toolbar.
|
|
| virtual WiresharkMimeData * | createMimeData (QString name, int position) |
| | Creates MIME data for a specific toolbar item to support drag operations.
|
| virtual void | childEvent (QChildEvent *event) override |
| | Handles child events, such as when widgets are added or removed.
|
| virtual bool | eventFilter (QObject *obj, QEvent *ev) override |
| | Event filter used to intercept mouse events on toolbar child widgets for drag detection.
|
| virtual void | dragEnterEvent (QDragEnterEvent *event) override |
| | Handles drag enter events to accept valid drop targets.
|
| virtual void | dragMoveEvent (QDragMoveEvent *event) override |
| | Handles drag move events for visual feedback during drag operations.
|
| virtual void | dropEvent (QDropEvent *event) override |
| | Handles drop events to finalize reordering or add new items.
|
A customized QToolBar that supports drag-and-drop reordering of its actions and handling external drops.
◆ DragDropToolBar() [1/2]
| DragDropToolBar::DragDropToolBar |
( |
const QString & | title, |
|
|
QWidget * | parent = Q_NULLPTR ) |
|
explicit |
Constructs a new DragDropToolBar with a specific title.
- Parameters
-
| title | The title of the toolbar. |
| parent | The parent widget, defaults to Q_NULLPTR. |
◆ DragDropToolBar() [2/2]
| DragDropToolBar::DragDropToolBar |
( |
QWidget * | parent = Q_NULLPTR | ) |
|
|
explicit |
Constructs a new DragDropToolBar.
- Parameters
-
| parent | The parent widget, defaults to Q_NULLPTR. |
◆ actionMoved
| void DragDropToolBar::actionMoved |
( |
QAction * | action, |
|
|
int | oldPos, |
|
|
int | newPos ) |
|
signal |
Signal emitted when an action has been moved via drag and drop.
- Parameters
-
| action | Pointer to the moved QAction. |
| oldPos | The original index position of the action. |
| newPos | The new index position of the action. |
◆ childEvent()
| void DragDropToolBar::childEvent |
( |
QChildEvent * | event | ) |
|
|
overrideprotectedvirtual |
Handles child events, such as when widgets are added or removed.
- Parameters
-
| event | The child event details. |
◆ createMimeData()
Creates MIME data for a specific toolbar item to support drag operations.
- Parameters
-
| name | The name or description of the item. |
| position | The current position index of the item. |
- Returns
- A pointer to the created WiresharkMimeData.
Reimplemented in FilterExpressionToolBar.
◆ dragEnterEvent()
| void DragDropToolBar::dragEnterEvent |
( |
QDragEnterEvent * | event | ) |
|
|
overrideprotectedvirtual |
Handles drag enter events to accept valid drop targets.
- Parameters
-
| event | The drag enter event details. |
◆ dragMoveEvent()
| void DragDropToolBar::dragMoveEvent |
( |
QDragMoveEvent * | event | ) |
|
|
overrideprotectedvirtual |
Handles drag move events for visual feedback during drag operations.
- Parameters
-
| event | The drag move event details. |
◆ dropEvent()
| void DragDropToolBar::dropEvent |
( |
QDropEvent * | event | ) |
|
|
overrideprotectedvirtual |
Handles drop events to finalize reordering or add new items.
- Parameters
-
| event | The drop event details. |
◆ eventFilter()
| bool DragDropToolBar::eventFilter |
( |
QObject * | obj, |
|
|
QEvent * | ev ) |
|
overrideprotectedvirtual |
Event filter used to intercept mouse events on toolbar child widgets for drag detection.
- Parameters
-
| obj | The object receiving the event. |
| ev | The event being intercepted. |
- Returns
- True if the event was filtered out, false otherwise.
Reimplemented in FilterExpressionToolBar.
◆ newFilterDropped
| void DragDropToolBar::newFilterDropped |
( |
QString | description, |
|
|
QString | filter ) |
|
signal |
Signal emitted when a new filter is dropped onto the toolbar.
- Parameters
-
| description | The description of the dropped filter. |
| filter | The filter string itself. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/drag_drop_toolbar.h
- /builds/wireshark/wireshark/ui/qt/widgets/drag_drop_toolbar.cpp