Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | List of all members
DragDropTabBar Class Reference

A customized QTabBar supporting drag and drop operations to reorder or detach tabs. More...

#include <detachable_tabwidget.h>

Inheritance diagram for DragDropTabBar:

Signals

void onDetachTab (int tabIdx, QPoint pos)
 Signal emitted to request a tab detachment.
 
void onMoveTab (int oldIdx, int newIdx)
 Signal emitted to indicate a tab has been moved via drag and drop.
 

Public Member Functions

 DragDropTabBar (QWidget *parent)
 Constructs a new DragDropTabBar.
 

Protected Member Functions

virtual void mouseDoubleClickEvent (QMouseEvent *event)
 Handles mouse double-click events.
 
virtual void mousePressEvent (QMouseEvent *event)
 Handles mouse press events to initiate drag tracking.
 
virtual void mouseMoveEvent (QMouseEvent *event)
 Handles mouse move events to trigger the actual drag operation.
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 Handles drag enter events to accept drops.
 
virtual void dropEvent (QDropEvent *event)
 Handles drop events to finalize reordering.
 

Detailed Description

A customized QTabBar supporting drag and drop operations to reorder or detach tabs.

Constructor & Destructor Documentation

◆ DragDropTabBar()

DragDropTabBar::DragDropTabBar ( QWidget *  parent)
explicit

Constructs a new DragDropTabBar.

Parameters
parentThe parent widget.

Member Function Documentation

◆ dragEnterEvent()

void DragDropTabBar::dragEnterEvent ( QDragEnterEvent *  event)
protectedvirtual

Handles drag enter events to accept drops.

Parameters
eventThe drag enter event details.

◆ dropEvent()

void DragDropTabBar::dropEvent ( QDropEvent *  event)
protectedvirtual

Handles drop events to finalize reordering.

Parameters
eventThe drop event details.

◆ mouseDoubleClickEvent()

void DragDropTabBar::mouseDoubleClickEvent ( QMouseEvent *  event)
protectedvirtual

Handles mouse double-click events.

Parameters
eventThe mouse event details.

◆ mouseMoveEvent()

void DragDropTabBar::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

Handles mouse move events to trigger the actual drag operation.

Parameters
eventThe mouse event details.

◆ mousePressEvent()

void DragDropTabBar::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

Handles mouse press events to initiate drag tracking.

Parameters
eventThe mouse event details.

◆ onDetachTab

void DragDropTabBar::onDetachTab ( int  tabIdx,
QPoint  pos 
)
signal

Signal emitted to request a tab detachment.

Parameters
tabIdxThe index of the tab being detached.
posThe global position where the drop occurred.

◆ onMoveTab

void DragDropTabBar::onMoveTab ( int  oldIdx,
int  newIdx 
)
signal

Signal emitted to indicate a tab has been moved via drag and drop.

Parameters
oldIdxThe original index of the tab.
newIdxThe new index of the tab.

The documentation for this class was generated from the following files: