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

Item Model for QgsMeshDatasetGroupTreeItem. More...

#include <qgsmeshdatasetgrouptreeview.h>

Inheritance diagram for QgsMeshDatasetGroupTreeModel:
Inheritance graph
[legend]

Public Types

enum  Roles {
  Name = Qt::UserRole , IsVector , IsActiveScalarDatasetGroup , IsActiveVectorDatasetGroup ,
  DatasetGroupIndex
}
 

Public Member Functions

 QgsMeshDatasetGroupTreeModel (QObject *parent=nullptr)
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
QgsMeshDatasetGroupTreeItemdatasetGroupTreeItem (int groupIndex)
 Returns the dataset group tree item with index, keeps ownership.
 
QgsMeshDatasetGroupTreeItemdatasetGroupTreeItem (QModelIndex index)
 Returns the dataset group tree item corresponding to index, keeps ownership.
 
QgsMeshDatasetGroupTreeItemdatasetGroupTreeRootItem ()
 Returns the dataset group root tree item, keeps ownership.
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
bool isEnabled (const QModelIndex &index) const
 Returns whether the dataset groups related to the QModelIndex is set as enabled.
 
QModelIndex parent (const QModelIndex &index) const override
 
void removeItem (const QModelIndex &index)
 Removes an item from the tree.
 
void resetDefault (QgsMeshLayer *meshLayer)
 Resets all groups with default state from the mesh layer.
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
void setAllGroupsAsEnabled (bool isEnabled)
 Sets all groups as enabled.
 
void setPersistentDatasetGroup (const QModelIndex &index, const QString &uri)
 Sets the dataset group as persistent with specified uri and for specified index.
 
void syncToLayer (QgsMeshLayer *layer)
 Synchronizes groups to the model from mesh layer.
 

Detailed Description

Item Model for QgsMeshDatasetGroupTreeItem.

Definition at line 66 of file qgsmeshdatasetgrouptreeview.h.

Member Enumeration Documentation

◆ Roles

Enumerator
Name 
IsVector 
IsActiveScalarDatasetGroup 
IsActiveVectorDatasetGroup 
DatasetGroupIndex 

Definition at line 70 of file qgsmeshdatasetgrouptreeview.h.

Constructor & Destructor Documentation

◆ QgsMeshDatasetGroupTreeModel()

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

Definition at line 34 of file qgsmeshdatasetgrouptreeview.cpp.

Member Function Documentation

◆ columnCount()

int QgsMeshDatasetGroupTreeModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 40 of file qgsmeshdatasetgrouptreeview.cpp.

◆ data()

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

Definition at line 46 of file qgsmeshdatasetgrouptreeview.cpp.

◆ datasetGroupTreeItem() [1/2]

QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeModel::datasetGroupTreeItem ( int  groupIndex)

Returns the dataset group tree item with index, keeps ownership.

Definition at line 159 of file qgsmeshdatasetgrouptreeview.cpp.

◆ datasetGroupTreeItem() [2/2]

QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeModel::datasetGroupTreeItem ( QModelIndex  index)

Returns the dataset group tree item corresponding to index, keeps ownership.

Definition at line 167 of file qgsmeshdatasetgrouptreeview.cpp.

◆ datasetGroupTreeRootItem()

QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeModel::datasetGroupTreeRootItem ( )

Returns the dataset group root tree item, keeps ownership.

Definition at line 154 of file qgsmeshdatasetgrouptreeview.cpp.

◆ flags()

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

Definition at line 73 of file qgsmeshdatasetgrouptreeview.cpp.

◆ headerData()

QVariant QgsMeshDatasetGroupTreeModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

Definition at line 81 of file qgsmeshdatasetgrouptreeview.cpp.

◆ index()

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

Definition at line 93 of file qgsmeshdatasetgrouptreeview.cpp.

◆ isEnabled()

bool QgsMeshDatasetGroupTreeModel::isEnabled ( const QModelIndex &  index) const

Returns whether the dataset groups related to the QModelIndex is set as enabled.

Definition at line 175 of file qgsmeshdatasetgrouptreeview.cpp.

◆ parent()

QModelIndex QgsMeshDatasetGroupTreeModel::parent ( const QModelIndex &  index) const
override

Definition at line 113 of file qgsmeshdatasetgrouptreeview.cpp.

◆ removeItem()

void QgsMeshDatasetGroupTreeModel::removeItem ( const QModelIndex &  index)

Removes an item from the tree.

Definition at line 214 of file qgsmeshdatasetgrouptreeview.cpp.

◆ resetDefault()

void QgsMeshDatasetGroupTreeModel::resetDefault ( QgsMeshLayer meshLayer)

Resets all groups with default state from the mesh layer.

Definition at line 185 of file qgsmeshdatasetgrouptreeview.cpp.

◆ rowCount()

int QgsMeshDatasetGroupTreeModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 127 of file qgsmeshdatasetgrouptreeview.cpp.

◆ setAllGroupsAsEnabled()

void QgsMeshDatasetGroupTreeModel::setAllGroupsAsEnabled ( bool  isEnabled)

Sets all groups as enabled.

Definition at line 196 of file qgsmeshdatasetgrouptreeview.cpp.

◆ setPersistentDatasetGroup()

void QgsMeshDatasetGroupTreeModel::setPersistentDatasetGroup ( const QModelIndex &  index,
const QString &  uri 
)

Sets the dataset group as persistent with specified uri and for specified index.

Definition at line 229 of file qgsmeshdatasetgrouptreeview.cpp.

◆ syncToLayer()

void QgsMeshDatasetGroupTreeModel::syncToLayer ( QgsMeshLayer layer)

Synchronizes groups to the model from mesh layer.

Definition at line 144 of file qgsmeshdatasetgrouptreeview.cpp.


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