QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Item Model for QgsMeshDatasetGroupTreeItem. More...
#include <qgsmeshdatasetgrouptreeview.h>
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 |
QgsMeshDatasetGroupTreeItem * | datasetGroupTreeItem (int groupIndex) |
Returns the dataset group tree item with index, keeps ownership. | |
QgsMeshDatasetGroupTreeItem * | datasetGroupTreeItem (QModelIndex index) |
Returns the dataset group tree item corresponding to index, keeps ownership. | |
QgsMeshDatasetGroupTreeItem * | datasetGroupTreeRootItem () |
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. | |
Item Model for QgsMeshDatasetGroupTreeItem.
Definition at line 66 of file qgsmeshdatasetgrouptreeview.h.
Enumerator | |
---|---|
Name | |
IsVector | |
IsActiveScalarDatasetGroup | |
IsActiveVectorDatasetGroup | |
DatasetGroupIndex |
Definition at line 70 of file qgsmeshdatasetgrouptreeview.h.
|
explicit |
Definition at line 35 of file qgsmeshdatasetgrouptreeview.cpp.
|
override |
Definition at line 41 of file qgsmeshdatasetgrouptreeview.cpp.
|
override |
Definition at line 47 of file qgsmeshdatasetgrouptreeview.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeModel::datasetGroupTreeItem | ( | int | groupIndex | ) |
Returns the dataset group tree item with index, keeps ownership.
Definition at line 160 of file qgsmeshdatasetgrouptreeview.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeModel::datasetGroupTreeItem | ( | QModelIndex | index | ) |
Returns the dataset group tree item corresponding to index, keeps ownership.
Definition at line 168 of file qgsmeshdatasetgrouptreeview.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeModel::datasetGroupTreeRootItem | ( | ) |
Returns the dataset group root tree item, keeps ownership.
Definition at line 155 of file qgsmeshdatasetgrouptreeview.cpp.
|
override |
Definition at line 74 of file qgsmeshdatasetgrouptreeview.cpp.
|
override |
Definition at line 82 of file qgsmeshdatasetgrouptreeview.cpp.
|
override |
Definition at line 94 of file qgsmeshdatasetgrouptreeview.cpp.
bool QgsMeshDatasetGroupTreeModel::isEnabled | ( | const QModelIndex & | index | ) | const |
Returns whether the dataset groups related to the QModelIndex is set as enabled.
Definition at line 176 of file qgsmeshdatasetgrouptreeview.cpp.
|
override |
Definition at line 114 of file qgsmeshdatasetgrouptreeview.cpp.
void QgsMeshDatasetGroupTreeModel::removeItem | ( | const QModelIndex & | index | ) |
Removes an item from the tree.
Definition at line 215 of file qgsmeshdatasetgrouptreeview.cpp.
void QgsMeshDatasetGroupTreeModel::resetDefault | ( | QgsMeshLayer * | meshLayer | ) |
Resets all groups with default state from the mesh layer.
Definition at line 186 of file qgsmeshdatasetgrouptreeview.cpp.
|
override |
Definition at line 128 of file qgsmeshdatasetgrouptreeview.cpp.
void QgsMeshDatasetGroupTreeModel::setAllGroupsAsEnabled | ( | bool | isEnabled | ) |
Sets all groups as enabled.
Definition at line 197 of file qgsmeshdatasetgrouptreeview.cpp.
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 230 of file qgsmeshdatasetgrouptreeview.cpp.
void QgsMeshDatasetGroupTreeModel::syncToLayer | ( | QgsMeshLayer * | layer | ) |
Synchronizes groups to the model from mesh layer.
Definition at line 145 of file qgsmeshdatasetgrouptreeview.cpp.