QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
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. More... | |
QgsMeshDatasetGroupTreeItem (const QDomElement &itemElement, const QgsReadWriteContext &context) | |
Constructor from a DOM element, constructs also the children. More... | |
QgsMeshDatasetGroupTreeItem (const QString &defaultName, const QString &sourceName, bool isVector, int index) | |
Constructor. More... | |
~QgsMeshDatasetGroupTreeItem () | |
Destructor, destructs also the children. More... | |
void | appendChild (QgsMeshDatasetGroupTreeItem *item) |
Appends a child item. More... | |
QgsMeshDatasetGroupTreeItem * | child (int row) const |
Returns a child. More... | |
int | childCount () const |
Returns the count of children. More... | |
QgsMeshDatasetGroupTreeItem * | childFromDatasetGroupIndex (int index) |
Returns the child with dataset group index Searches as depper as needed on the child hierarchy. More... | |
QgsMeshDatasetGroupTreeItem * | clone () const |
Clones the item. More... | |
int | datasetGroupIndex () const |
QgsMeshDatasetGroup::Type | datasetGroupType () const |
QString | defaultName () const |
QString | description () const |
Returns description about the dataset group (URI, formula,...) More... | |
QList< int > | enabledDatasetGroupIndexes () const |
Returns a list of enabled dataset group indexes, included deeper children. More... | |
QList< int > | groupIndexDependencies () const |
Returns a list of group index corresponding to dataset group that depends on the dataset group represented by this item. More... | |
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 (. More... | |
QgsMeshDatasetGroupTreeItem * | parentItem () const |
Returns the parent item, nullptr if it is root item. More... | |
QString | providerName () const |
Returns the name used by the provider to identify the dataset. More... | |
void | removeChild (QgsMeshDatasetGroupTreeItem *item) |
Removes a item child if exists. More... | |
int | row () const |
Returns the position of the item in the parent. More... | |
void | setDatasetGroup (QgsMeshDatasetGroup *datasetGroup) |
Set parameters of the item in accordance with the dataset group. More... | |
void | setIsEnabled (bool isEnabled) |
Sets whether the item is enabled, that is if it is displayed in view. More... | |
void | setName (const QString &name) |
Overrides the default name with the name to display. More... | |
void | setPersistentDatasetGroup (const QString &uri) |
Set parameters of the item in accordance with the persistent dataset group with uri. More... | |
int | totalChildCount () const |
Returns the total count of children, that is included deeper children and disabled items. More... | |
QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) |
Writes the item and its children in a DOM document. More... | |
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 788 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 446 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 456 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem::~QgsMeshDatasetGroupTreeItem | ( | ) |
Destructor, destructs also the children.
Definition at line 507 of file qgsmeshdataset.cpp.
void QgsMeshDatasetGroupTreeItem::appendChild | ( | QgsMeshDatasetGroupTreeItem * | item | ) |
Appends a child item.
Definition at line 535 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeItem::child | ( | int | row | ) | const |
Returns a child.
row | the position of the child |
Definition at line 547 of file qgsmeshdataset.cpp.
int QgsMeshDatasetGroupTreeItem::childCount | ( | ) | const |
Returns the count of children.
Definition at line 577 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 555 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeItem::clone | ( | ) | const |
int QgsMeshDatasetGroupTreeItem::datasetGroupIndex | ( | ) | const |
Definition at line 633 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroup::Type QgsMeshDatasetGroupTreeItem::datasetGroupType | ( | ) | const |
QString QgsMeshDatasetGroupTreeItem::defaultName | ( | ) | const |
Definition at line 648 of file qgsmeshdataset.cpp.
QString QgsMeshDatasetGroupTreeItem::description | ( | ) | const |
Returns description about the dataset group (URI, formula,...)
Definition at line 658 of file qgsmeshdataset.cpp.
QList< int > QgsMeshDatasetGroupTreeItem::enabledDatasetGroupIndexes | ( | ) | const |
Returns a list of enabled dataset group indexes, included deeper children.
Definition at line 593 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 723 of file qgsmeshdataset.cpp.
bool QgsMeshDatasetGroupTreeItem::isEnabled | ( | ) | const |
Definition at line 638 of file qgsmeshdataset.cpp.
bool QgsMeshDatasetGroupTreeItem::isVector | ( | ) | const |
Definition at line 628 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 620 of file qgsmeshdataset.cpp.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupTreeItem::parentItem | ( | ) | const |
Returns the parent item, nullptr if it is root item.
Definition at line 607 of file qgsmeshdataset.cpp.
QString QgsMeshDatasetGroupTreeItem::providerName | ( | ) | const |
Returns the name used by the provider to identify the dataset.
Definition at line 795 of file qgsmeshdataset.cpp.
void QgsMeshDatasetGroupTreeItem::removeChild | ( | QgsMeshDatasetGroupTreeItem * | item | ) |
Removes a item child if exists.
item | the item to append |
Definition at line 542 of file qgsmeshdataset.cpp.
int QgsMeshDatasetGroupTreeItem::row | ( | ) | const |
Returns the position of the item in the parent.
Definition at line 612 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 663 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 643 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 800 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 682 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 582 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 689 of file qgsmeshdataset.cpp.