QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsSettingsTreeModel Class Reference

A tree model for the settings tree. More...

#include <qgssettingstreemodel.h>

Inheritance diagram for QgsSettingsTreeModel:

Public Types

enum class  Column { Name , Value , Description }
 Columns. More...

Public Member Functions

 QgsSettingsTreeModel (QgsSettingsTreeNode *rootNode=nullptr, QObject *parent=nullptr)
 Constructor.
 ~QgsSettingsTreeModel () override
void applyChanges ()
 Apply pending changes in the model to the corresponding settings.
int columnCount (const QModelIndex &parent) const override
QVariant data (const QModelIndex &index, int role) const override
Qt::ItemFlags flags (const QModelIndex &index) const override
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
QModelIndex index (int row, int column, const QModelIndex &parent) const override
QgsSettingsTreeModelNodeData * index2node (const QModelIndex &index) const
 Returns settings tree node for given index or the root node if the index is invalid.
QModelIndex node2index (QgsSettingsTreeModelNodeData *node) const
 Returns the index from the settings tree node.
QModelIndex parent (const QModelIndex &child) const override
int rowCount (const QModelIndex &parent) const override
bool setData (const QModelIndex &index, const QVariant &value, int role) override

Detailed Description

A tree model for the settings tree.

Since
QGIS 3.32

Definition at line 166 of file qgssettingstreemodel.h.

Member Enumeration Documentation

◆ Column

enum class QgsSettingsTreeModel::Column
strong

Columns.

Enumerator
Name 

Name.

Value 

Value.

Description 

Description.

Definition at line 171 of file qgssettingstreemodel.h.

Constructor & Destructor Documentation

◆ QgsSettingsTreeModel()

QgsSettingsTreeModel::QgsSettingsTreeModel ( QgsSettingsTreeNode * rootNode = nullptr,
QObject * parent = nullptr )

Constructor.

Definition at line 174 of file qgssettingstreemodel.cpp.

◆ ~QgsSettingsTreeModel()

QgsSettingsTreeModel::~QgsSettingsTreeModel ( )
override

Definition at line 185 of file qgssettingstreemodel.cpp.

Member Function Documentation

◆ applyChanges()

void QgsSettingsTreeModel::applyChanges ( )

Apply pending changes in the model to the corresponding settings.

Definition at line 190 of file qgssettingstreemodel.cpp.

◆ columnCount()

int QgsSettingsTreeModel::columnCount ( const QModelIndex & parent) const
override

Definition at line 271 of file qgssettingstreemodel.cpp.

◆ data()

QVariant QgsSettingsTreeModel::data ( const QModelIndex & index,
int role ) const
override

Definition at line 277 of file qgssettingstreemodel.cpp.

◆ flags()

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

Definition at line 402 of file qgssettingstreemodel.cpp.

◆ headerData()

QVariant QgsSettingsTreeModel::headerData ( int section,
Qt::Orientation orientation,
int role ) const
override

Definition at line 384 of file qgssettingstreemodel.cpp.

◆ index()

QModelIndex QgsSettingsTreeModel::index ( int row,
int column,
const QModelIndex & parent ) const
override

Definition at line 219 of file qgssettingstreemodel.cpp.

◆ index2node()

QgsSettingsTreeModelNodeData * QgsSettingsTreeModel::index2node ( const QModelIndex & index) const

Returns settings tree node for given index or the root node if the index is invalid.

Definition at line 197 of file qgssettingstreemodel.cpp.

◆ node2index()

QModelIndex QgsSettingsTreeModel::node2index ( QgsSettingsTreeModelNodeData * node) const

Returns the index from the settings tree node.

Definition at line 206 of file qgssettingstreemodel.cpp.

◆ parent()

QModelIndex QgsSettingsTreeModel::parent ( const QModelIndex & child) const
override

Definition at line 232 of file qgssettingstreemodel.cpp.

◆ rowCount()

int QgsSettingsTreeModel::rowCount ( const QModelIndex & parent) const
override

Definition at line 262 of file qgssettingstreemodel.cpp.

◆ setData()

bool QgsSettingsTreeModel::setData ( const QModelIndex & index,
const QVariant & value,
int role )
override

Definition at line 426 of file qgssettingstreemodel.cpp.


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