QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
QgsSettingsTreeModel Class Reference

QgsSettingsTreeModel is a tree model for the settings tree. More...

#include <qgssettingstreemodel.h>

Inheritance diagram for QgsSettingsTreeModel:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

 QgsSettingsTreeModel (QgsSettingsTreeNode *rootNode=nullptr, QObject *parent=nullptr)
 Constructor.
 
 ~QgsSettingsTreeModel ()
 
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

QgsSettingsTreeModel is 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 172 of file qgssettingstreemodel.h.

Constructor & Destructor Documentation

◆ QgsSettingsTreeModel()

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

Constructor.

Definition at line 173 of file qgssettingstreemodel.cpp.

◆ ~QgsSettingsTreeModel()

QgsSettingsTreeModel::~QgsSettingsTreeModel ( )

Definition at line 184 of file qgssettingstreemodel.cpp.

Member Function Documentation

◆ applyChanges()

void QgsSettingsTreeModel::applyChanges ( )

Apply pending changes in the model to the corresponding settings.

Definition at line 189 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 406 of file qgssettingstreemodel.cpp.

◆ headerData()

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

Definition at line 388 of file qgssettingstreemodel.cpp.

◆ index()

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

Definition at line 218 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 196 of file qgssettingstreemodel.cpp.

◆ node2index()

QModelIndex QgsSettingsTreeModel::node2index ( QgsSettingsTreeModelNodeData *  node) const

Returns the index from the settings tree node.

Definition at line 205 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 430 of file qgssettingstreemodel.cpp.


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