Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
ProfileTreeView Class Reference

Tree view specialised for displaying and editing configuration profiles, with inline editing support and selection-change notifications. More...

#include <profile_tree_view.h>

Inheritance diagram for ProfileTreeView:

Signals

void itemUpdated ()
 Emitted when a profile item has been modified through the inline editor.

Public Member Functions

 ProfileTreeView (QWidget *parent=nullptr)
 Constructs a ProfileTreeView.
 ~ProfileTreeView ()
 Destroys the view and releases the associated delegate.
void selectIndex (const QModelIndex &idx)
 Selects the row of idx in the view.
bool activeEdit ()
 Returns whether an inline edit is currently active in the view.

Protected Slots

virtual void selectionChanged (const QItemSelection &selected, const QItemSelection &deselected) override
 Responds to selection changes, updating UI state and emitting itemUpdated() when appropriate.

Protected Member Functions

virtual void showEvent (QShowEvent *) override
 Restores the previously selected row when the view becomes visible.
virtual void mouseDoubleClickEvent (QMouseEvent *event) override
 Opens an inline editor for the double-clicked cell when the profile is editable; otherwise propagates the event.
virtual void startDrag (Qt::DropActions supportedActions) override
 Starts dragging the selected profile names, with the same drag image on all platforms.
virtual void dragMoveEvent (QDragMoveEvent *event) override
 Highlights the profile where a dragged profile will be moved to, and all its parents.
virtual void dragLeaveEvent (QDragLeaveEvent *event) override
virtual void dropEvent (QDropEvent *event) override
virtual void drawRow (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
virtual void paintEvent (QPaintEvent *event) override

Detailed Description

Tree view specialised for displaying and editing configuration profiles, with inline editing support and selection-change notifications.

Constructor & Destructor Documentation

◆ ProfileTreeView()

ProfileTreeView::ProfileTreeView ( QWidget * parent = nullptr)

Constructs a ProfileTreeView.

Parameters
parentOptional parent widget.

Member Function Documentation

◆ activeEdit()

bool ProfileTreeView::activeEdit ( )

Returns whether an inline edit is currently active in the view.

Returns
true if a cell editor is open.

◆ mouseDoubleClickEvent()

void ProfileTreeView::mouseDoubleClickEvent ( QMouseEvent * event)
overrideprotectedvirtual

Opens an inline editor for the double-clicked cell when the profile is editable; otherwise propagates the event.

Parameters
eventThe mouse double-click event.

◆ selectIndex()

void ProfileTreeView::selectIndex ( const QModelIndex & idx)

Selects the row of idx in the view.

Parameters
idxIndex of the row to select.

◆ selectionChanged

void ProfileTreeView::selectionChanged ( const QItemSelection & selected,
const QItemSelection & deselected )
overrideprotectedvirtualslot

Responds to selection changes, updating UI state and emitting itemUpdated() when appropriate.

Parameters
selectedNewly selected items.
deselectedPreviously selected items that are now deselected.

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