QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
QgsHistoryEntryModel Class Reference

An item model representing history entries in a hierarchical tree structure. More...

#include <qgshistoryentrymodel.h>

Inheritance diagram for QgsHistoryEntryModel:
Inheritance graph
[legend]

Public Member Functions

 QgsHistoryEntryModel (const QString &providerId=QString(), Qgis::HistoryProviderBackends backends=Qgis::HistoryProviderBackend::LocalProfile, QgsHistoryProviderRegistry *registry=nullptr, const QgsHistoryWidgetContext &context=QgsHistoryWidgetContext(), QObject *parent=nullptr)
 Constructor for QgsHistoryEntryModel, with the specified parent object.
 
 ~QgsHistoryEntryModel () override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const final
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const final
 
QgsHistoryEntryNodeindex2node (const QModelIndex &index) const
 Returns node for given index.
 
QModelIndex parent (const QModelIndex &child) const final
 
int rowCount (const QModelIndex &parent=QModelIndex()) const final
 

Friends

class QgsHistoryEntryRootNode
 

Detailed Description

An item model representing history entries in a hierarchical tree structure.

Since
QGIS 3.32

Definition at line 42 of file qgshistoryentrymodel.h.

Constructor & Destructor Documentation

◆ QgsHistoryEntryModel()

QgsHistoryEntryModel::QgsHistoryEntryModel ( const QString &  providerId = QString(),
Qgis::HistoryProviderBackends  backends = Qgis::HistoryProviderBackend::LocalProfile,
QgsHistoryProviderRegistry registry = nullptr,
const QgsHistoryWidgetContext context = QgsHistoryWidgetContext(),
QObject *  parent = nullptr 
)

Constructor for QgsHistoryEntryModel, with the specified parent object.

If providerId is specified then the model will contain only items from the matching history provider. If backends is specified then the model will be filtered to only matching backends.

If no registry is specified then the singleton QgsHistoryProviderRegistry from QgsGui::historyProviderRegistry() will be used.

Definition at line 83 of file qgshistoryentrymodel.cpp.

◆ ~QgsHistoryEntryModel()

QgsHistoryEntryModel::~QgsHistoryEntryModel ( )
override

Definition at line 112 of file qgshistoryentrymodel.cpp.

Member Function Documentation

◆ columnCount()

int QgsHistoryEntryModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
final

Definition at line 126 of file qgshistoryentrymodel.cpp.

◆ data()

QVariant QgsHistoryEntryModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

Definition at line 161 of file qgshistoryentrymodel.cpp.

◆ flags()

Qt::ItemFlags QgsHistoryEntryModel::flags ( const QModelIndex &  index) const
override

Definition at line 173 of file qgshistoryentrymodel.cpp.

◆ index()

QModelIndex QgsHistoryEntryModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
final

Definition at line 132 of file qgshistoryentrymodel.cpp.

◆ index2node()

QgsHistoryEntryNode * QgsHistoryEntryModel::index2node ( const QModelIndex &  index) const

Returns node for given index.

Returns root node for invalid index.

Definition at line 185 of file qgshistoryentrymodel.cpp.

◆ parent()

QModelIndex QgsHistoryEntryModel::parent ( const QModelIndex &  child) const
final

Definition at line 145 of file qgshistoryentrymodel.cpp.

◆ rowCount()

int QgsHistoryEntryModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
final

Definition at line 117 of file qgshistoryentrymodel.cpp.

Friends And Related Symbol Documentation

◆ QgsHistoryEntryRootNode

friend class QgsHistoryEntryRootNode
friend

Definition at line 99 of file qgshistoryentrymodel.h.


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