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

A QTreeView variant that advances to the next column (same row) on Tab instead of the next row (same column), making it suitable for inline tabular editing workflows. More...

#include <tabnav_tree_view.h>

Inheritance diagram for TabnavTreeView:
RowMoveTreeView

Signals

void currentItemChanged (const QModelIndex &current, const QModelIndex &previous)
 Emitted whenever the current item changes.
 

Public Member Functions

 TabnavTreeView (QWidget *parent=0)
 Constructs the tree view with column-wise Tab navigation.
 
QModelIndex moveCursor (CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
 Returns the index the view should move to for a given cursor action.
 

Protected Slots

void currentChanged (const QModelIndex &current, const QModelIndex &previous)
 Relays the QAbstractItemView::currentChanged notification as the currentItemChanged() signal so that external observers can connect without subclassing.
 

Detailed Description

A QTreeView variant that advances to the next column (same row) on Tab instead of the next row (same column), making it suitable for inline tabular editing workflows.

Constructor & Destructor Documentation

◆ TabnavTreeView()

TabnavTreeView::TabnavTreeView ( QWidget *  parent = 0)

Constructs the tree view with column-wise Tab navigation.

Parameters
parentOptional parent widget.

Member Function Documentation

◆ currentChanged

void TabnavTreeView::currentChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
protectedslot

Relays the QAbstractItemView::currentChanged notification as the currentItemChanged() signal so that external observers can connect without subclassing.

Parameters
currentThe newly current model index.
previousThe previously current model index.

◆ currentItemChanged

void TabnavTreeView::currentItemChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
signal

Emitted whenever the current item changes.

Parameters
currentThe newly current model index.
previousThe previously current model index.

This signal is emitted whenever the current item changes.

previous is the item that previously had the focus; current is the new current item.

◆ moveCursor()

QModelIndex TabnavTreeView::moveCursor ( CursorAction  cursorAction,
Qt::KeyboardModifiers  modifiers 
)

Returns the index the view should move to for a given cursor action.

Overrides the default behaviour so that CursorAction::MoveNext (Tab) and CursorAction::MovePrevious (Shift+Tab) advance through columns within the current row rather than moving to adjacent rows.

Parameters
cursorActionThe navigation action requested (e.g. MoveNext, MovePrevious).
modifiersActive keyboard modifiers at the time of the action.
Returns
The model index that should receive focus.

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