QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
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 172 of file qgssettingstreemodel.cpp.

◆ ~QgsSettingsTreeModel()

QgsSettingsTreeModel::~QgsSettingsTreeModel ( )

Definition at line 183 of file qgssettingstreemodel.cpp.

Member Function Documentation

◆ applyChanges()

void QgsSettingsTreeModel::applyChanges ( )

Apply pending changes in the model to the corresponding settings.

Definition at line 188 of file qgssettingstreemodel.cpp.

◆ columnCount()

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

Definition at line 270 of file qgssettingstreemodel.cpp.

◆ data()

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

Definition at line 276 of file qgssettingstreemodel.cpp.

◆ flags()

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

Definition at line 405 of file qgssettingstreemodel.cpp.

◆ headerData()

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

Definition at line 387 of file qgssettingstreemodel.cpp.

◆ index()

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

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

◆ node2index()

QModelIndex QgsSettingsTreeModel::node2index ( QgsSettingsTreeModelNodeData *  node) const

Returns the index from the settings tree node.

Definition at line 204 of file qgssettingstreemodel.cpp.

◆ parent()

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

Definition at line 231 of file qgssettingstreemodel.cpp.

◆ rowCount()

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

Definition at line 261 of file qgssettingstreemodel.cpp.

◆ setData()

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

Definition at line 429 of file qgssettingstreemodel.cpp.


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