116 : transformContext( transformContext )
128 bool loadDefaultStyle =
true;
143 bool skipCrsValidation =
false;
159 explicit QgsMeshLayer(
const QString &path = QString(),
const QString &baseName = QString(),
const QString &providerLib = QStringLiteral(
"mesh_memory" ),
168 SIP_PYOBJECT __repr__();
170 QString
str = QStringLiteral(
"<QgsMeshLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral(
"Invalid" ) );
171 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
181 bool readSymbology( const QDomNode &node, QString &errorMessage,
183 bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage,
185 bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const
QgsReadWriteContext &context,
StyleCategories categories = AllStyleCategories ) const override;
187 QString encodedSource( const QString &source, const
QgsReadWriteContext &context ) const override;
188 QString decodedSource( const QString &source, const QString &provider, const
QgsReadWriteContext &context ) const override;
190 bool writeXml( QDomNode &layer_node, QDomDocument &doc, const
QgsReadWriteContext &context ) const override;
193 void reload() override;
194 QStringList subLayers() const override;
195 QString htmlMetadata() const override;
196 bool isEditable() const override;
197 bool supportsEditing() const override;
198 QString loadDefaultStyle(
bool &resultFlag
SIP_OUT )
FINAL;
201 QString providerType() const;
212 bool addDatasets( const QString &path, const QDateTime &defaultReferenceTime = QDateTime() );
234 bool saveDataset( const QString &path,
int datasetGroupIndex, QString driver );
270 int triangularMeshLevelOfDetailCount() const
SIP_SKIP;
298 QgsMeshLayerRendererCache *rendererCache()
SIP_SKIP;
339 QString formatTime(
double hours );
346 int datasetGroupCount() const;
353 int extraDatasetGroupCount() const;
363 QList<
int> datasetGroupsIndexes() const;
373 QList<
int> enabledDatasetGroupsIndexes() const;
676 void setReferenceTime( const QDateTime &referenceTime );
718 QList<
int> selectVerticesByExpression(
QgsExpression expression );
728 QList<
int> selectFacesByExpression(
QgsExpression expression );
759 void resetDatasetGroupTreeItem();
856 bool isModified() const override;
862 bool contains( const
QgsMesh::ElementType &type ) const;
871 int meshVertexCount() const;
880 int meshFaceCount() const;
887 int meshEdgeCount() const;
897 bool labelsEnabled() const;
909 void setLabelsEnabled(
bool enabled );
980 bool isReadOnly()
const override {
return true;}
994 void fillNativeMesh();
995 void assignDefaultStyleToDatasetGroup(
int groupIndex );
996 void createSimplifiedMeshes();
997 int levelsOfDetailsIndex(
double partOfMeshInView )
const;
999 bool hasSimplifiedMeshes()
const;
1005 void onDatasetGroupsAdded(
const QList<int> &datasetGroupIndexes );
1006 void onMeshEdited();
1013 QStringList mExtraDatasetUri;
1015 std::unique_ptr<QgsMeshDatasetGroupStore> mDatasetGroupStore;
1018 std::unique_ptr<QgsMesh> mNativeMesh;
1021 std::vector<std::unique_ptr<QgsTriangularMesh>> mTriangularMeshes;
1024 std::unique_ptr<QgsMeshLayerRendererCache> mRendererCache;
1041 int mStaticScalarDatasetIndex = 0;
1042 int mStaticVectorDatasetIndex = 0;
1047 bool mLabelsEnabled =
false;
1052 int closestEdge(
const QgsPointXY &point,
double searchRadius,
QgsPointXY &projectedPoint )
const;
1063 void updateActiveDatasetGroups();
1066 void checkSymbologyConsistency();
1068 void setDataSourcePrivate(
const QString &dataSource,
const QString &baseName,
const QString &provider,
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.