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

Proxy model that reverses row order for display (newest first). More...

#include <recentcapturefiles_list_model.h>

Inheritance diagram for RecentCaptureFilesReverseProxyModel:

Public Member Functions

 RecentCaptureFilesReverseProxyModel (QObject *parent=nullptr)
 Constructs the reverse-order proxy model.
 
QModelIndex mapToSource (const QModelIndex &proxyIndex) const override
 Maps a proxy index to the corresponding source index by mirroring the row about the midpoint of the list.
 
QModelIndex mapFromSource (const QModelIndex &sourceIndex) const override
 Maps a source index to the corresponding proxy index by mirroring the row about the midpoint of the list.
 

Detailed Description

Proxy model that reverses row order for display (newest first).

WorkspaceState stores files oldest-first to match the on-disk file format. This proxy reverses the order so the UI shows the most recently used files at the top of the list.

Constructor & Destructor Documentation

◆ RecentCaptureFilesReverseProxyModel()

RecentCaptureFilesReverseProxyModel::RecentCaptureFilesReverseProxyModel ( QObject *  parent = nullptr)
explicit

Constructs the reverse-order proxy model.

Parameters
parentOptional parent QObject.

Member Function Documentation

◆ mapFromSource()

QModelIndex RecentCaptureFilesReverseProxyModel::mapFromSource ( const QModelIndex &  sourceIndex) const
override

Maps a source index to the corresponding proxy index by mirroring the row about the midpoint of the list.

Parameters
sourceIndexSource-model index to map.
Returns
Corresponding proxy-model index.

◆ mapToSource()

QModelIndex RecentCaptureFilesReverseProxyModel::mapToSource ( const QModelIndex &  proxyIndex) const
override

Maps a proxy index to the corresponding source index by mirroring the row about the midpoint of the list.

Parameters
proxyIndexProxy-model index to map.
Returns
Corresponding source-model index.

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