QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Tree item for display of the mesh dataset groups. More...
#include <qgsmeshdataset.h>
Public Member Functions | |
QgsMeshDatasetGroupTreeItem () | |
Constructor for an empty dataset group tree item. | |
QgsMeshDatasetGroupTreeItem (const QDomElement &itemElement, const QgsReadWriteContext &context) | |
Constructor from a DOM element, constructs also the children. | |
QgsMeshDatasetGroupTreeItem (const QString &defaultName, const QString &sourceName, bool isVector, int index) | |
Constructor. | |
~QgsMeshDatasetGroupTreeItem () | |
Destructor, destructs also the children. | |
void | appendChild (QgsMeshDatasetGroupTreeItem *item) |
Appends a child item. | |
QgsMeshDatasetGroupTreeItem * | child (int row) const |
Returns a child. | |
int | childCount () const |
Returns the count of children. | |
QgsMeshDatasetGroupTreeItem * | childFromDatasetGroupIndex (int index) |
Returns the child with dataset group index Searches as depper as needed on the child hierarchy. | |
QgsMeshDatasetGroupTreeItem * | clone () const |
Clones the item. | |
int | datasetGroupIndex () const |
QgsMeshDatasetGroup::Type | datasetGroupType () const |
QString | defaultName () const |
QString | description () const |
Returns description about the dataset group (URI, formula,...) | |
QList< int > | enabledDatasetGroupIndexes () const |
Returns a list of enabled dataset group indexes, included deeper children. | |
QList< int > | groupIndexDependencies () const |
Returns a list of group index corresponding to dataset group that depends on the dataset group represented by this item. | |
bool | isEnabled () const |
bool | isVector () const |
QString | name () const |
Returns the name of the item This name is the default name if the name has not been overridden (. | |
QgsMeshDatasetGroupTreeItem * | parentItem () const |
Returns the parent item, nullptr if it is root item. | |
QString | providerName () const |
Returns the name used by the provider to identify the dataset. | |
void | removeChild (QgsMeshDatasetGroupTreeItem *item) |
Removes and destroy a item child if exists. | |
int | row () const |
Returns the position of the item in the parent. | |
void | setDatasetGroup (QgsMeshDatasetGroup *datasetGroup) |
Set parameters of the item in accordance with the dataset group. | |
void | setIsEnabled (bool isEnabled) |
Sets whether the item is enabled, that is if it is displayed in view. | |
void | setName (const QString &name) |
Overrides the default name with the name to display. | |
void | setPersistentDatasetGroup (const QString &uri) |
Set parameters of the item in accordance with the persistent dataset group with uri. | |
int | totalChildCount () const |
Returns the total count of children, that is included deeper children and disabled items. | |
QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) |
Writes the item and its children in a DOM document. | |
Tree item for display of the mesh dataset groups.
Dataset group is set of datasets with the same name, but different control variable (e.g. time)
Support for multiple levels, because groups can have subgroups, for example
Groups: Depth Minimum Maximum Velocity Wind speed Minimum Maximum
Tree items handle also the dependencies between dataset groups represented by these items
Definition at line 855 of file qgsmeshdataset.h.
|
default |
Constructor for an empty dataset group tree item.
QgsMeshDatasetGroupTreeItem::QgsMeshDatasetGroupTreeItem | ( | const QString & | defaultName, |
const QString & | sourceName, | ||
bool | isVector, | ||
int | index | ||
) |
Constructor.
defaultName | the name that will be used to display the item if iot not overrides ( |
sourceName | the name used by the source (provider, dataset group store,...) |
isVector | whether the dataset group is a vector dataset group |
index | index of the dataset group |
Definition at line 463 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem::QgsMeshDatasetGroupTreeItem | ( | const QDomElement & | itemElement, |
const QgsReadWriteContext & | context | ||
) |
Constructor from a DOM element, constructs also the children.
itemElement | the DOM element |
context | writing context (e.g. for conversion between relative and absolute paths) |
Definition at line 473 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem::~QgsMeshDatasetGroupTreeItem | ( | ) |
Destructor, destructs also the children.
Definition at line 524 of file qgsmeshdataset.cpp.
void QgsMeshDatasetGroupTreeItem::appendChild | ( | QgsMeshDatasetGroupTreeItem * | item | ) |
Appends a child item.
Definition at line 552 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeItem::child | ( | int | row | ) | const |
Returns a child.
row | the position of the child |
Definition at line 564 of file qgsmeshdataset.cpp.
int QgsMeshDatasetGroupTreeItem::childCount | ( | ) | const |
Returns the count of children.
Definition at line 594 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeItem::childFromDatasetGroupIndex | ( | int | index | ) |
Returns the child with dataset group index Searches as depper as needed on the child hierarchy.
index | the index of the dataset group index |
Definition at line 572 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeItem::clone | ( | ) | const |
int QgsMeshDatasetGroupTreeItem::datasetGroupIndex | ( | ) | const |
Definition at line 650 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroup::Type QgsMeshDatasetGroupTreeItem::datasetGroupType | ( | ) | const |
QString QgsMeshDatasetGroupTreeItem::defaultName | ( | ) | const |
Definition at line 665 of file qgsmeshdataset.cpp.
QString QgsMeshDatasetGroupTreeItem::description | ( | ) | const |
Returns description about the dataset group (URI, formula,...)
Definition at line 675 of file qgsmeshdataset.cpp.
QList< int > QgsMeshDatasetGroupTreeItem::enabledDatasetGroupIndexes | ( | ) | const |
Returns a list of enabled dataset group indexes, included deeper children.
Definition at line 610 of file qgsmeshdataset.cpp.
QList< int > QgsMeshDatasetGroupTreeItem::groupIndexDependencies | ( | ) | const |
Returns a list of group index corresponding to dataset group that depends on the dataset group represented by this item.
Definition at line 740 of file qgsmeshdataset.cpp.
bool QgsMeshDatasetGroupTreeItem::isEnabled | ( | ) | const |
Definition at line 655 of file qgsmeshdataset.cpp.
bool QgsMeshDatasetGroupTreeItem::isVector | ( | ) | const |
Definition at line 645 of file qgsmeshdataset.cpp.
QString QgsMeshDatasetGroupTreeItem::name | ( | ) | const |
Returns the name of the item This name is the default name if the name has not been overridden (.
Definition at line 637 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeItem::parentItem | ( | ) | const |
Returns the parent item, nullptr if it is root item.
Definition at line 624 of file qgsmeshdataset.cpp.
QString QgsMeshDatasetGroupTreeItem::providerName | ( | ) | const |
Returns the name used by the provider to identify the dataset.
Definition at line 812 of file qgsmeshdataset.cpp.
void QgsMeshDatasetGroupTreeItem::removeChild | ( | QgsMeshDatasetGroupTreeItem * | item | ) |
Removes and destroy a item child if exists.
item | the item to append |
Definition at line 559 of file qgsmeshdataset.cpp.
int QgsMeshDatasetGroupTreeItem::row | ( | ) | const |
Returns the position of the item in the parent.
Definition at line 629 of file qgsmeshdataset.cpp.
void QgsMeshDatasetGroupTreeItem::setDatasetGroup | ( | QgsMeshDatasetGroup * | datasetGroup | ) |
Set parameters of the item in accordance with the dataset group.
datasetGroup | pointer to the dataset group to accord with |
Definition at line 680 of file qgsmeshdataset.cpp.
void QgsMeshDatasetGroupTreeItem::setIsEnabled | ( | bool | isEnabled | ) |
Sets whether the item is enabled, that is if it is displayed in view.
isEnabled | whether the item is enabled |
Definition at line 660 of file qgsmeshdataset.cpp.
void QgsMeshDatasetGroupTreeItem::setName | ( | const QString & | name | ) |
Overrides the default name with the name to display.
The default name is still stored in the item but will not be displayed anymore except if the empty string is set.
name | to display |
Definition at line 817 of file qgsmeshdataset.cpp.
void QgsMeshDatasetGroupTreeItem::setPersistentDatasetGroup | ( | const QString & | uri | ) |
Set parameters of the item in accordance with the persistent dataset group with uri.
uri | uri of the persistent dataset group |
Definition at line 699 of file qgsmeshdataset.cpp.
int QgsMeshDatasetGroupTreeItem::totalChildCount | ( | ) | const |
Returns the total count of children, that is included deeper children and disabled items.
Definition at line 599 of file qgsmeshdataset.cpp.
QDomElement QgsMeshDatasetGroupTreeItem::writeXml | ( | QDomDocument & | doc, |
const QgsReadWriteContext & | context | ||
) |
Writes the item and its children in a DOM document.
doc | the DOM document |
context | writing context (e.g. for conversion between relative and absolute paths) |
Definition at line 706 of file qgsmeshdataset.cpp.