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() );
222 bool removeDatasets( const QString &name );
244 bool saveDataset( const QString &path,
int datasetGroupIndex, QString driver );
280 int triangularMeshLevelOfDetailCount() const
SIP_SKIP;
308 QgsMeshLayerRendererCache *rendererCache()
SIP_SKIP;
349 QString formatTime(
double hours );
356 int datasetGroupCount() const;
363 int extraDatasetGroupCount() const;
373 QList<
int> datasetGroupsIndexes() const;
383 QList<
int> enabledDatasetGroupsIndexes() const;
686 void setReferenceTime( const QDateTime &referenceTime );
728 QList<
int> selectVerticesByExpression(
QgsExpression expression );
738 QList<
int> selectFacesByExpression(
QgsExpression expression );
769 void resetDatasetGroupTreeItem();
866 bool isModified() const override;
872 bool contains( const
QgsMesh::ElementType &type ) const;
881 int meshVertexCount() const;
890 int meshFaceCount() const;
897 int meshEdgeCount() const;
907 bool labelsEnabled() const;
919 void setLabelsEnabled(
bool enabled );
954 bool datasetsPathUnique(
const QString &path );
1000 bool isReadOnly()
const override {
return true;}
1013 void fillNativeMesh();
1014 void assignDefaultStyleToDatasetGroup(
int groupIndex );
1015 void createSimplifiedMeshes();
1016 int levelsOfDetailsIndex(
double partOfMeshInView )
const;
1018 bool hasSimplifiedMeshes()
const;
1024 void onDatasetGroupsAdded(
const QList<int> &datasetGroupIndexes );
1025 void onMeshEdited();
1032 QStringList mExtraDatasetUri;
1034 std::unique_ptr<QgsMeshDatasetGroupStore> mDatasetGroupStore;
1037 std::unique_ptr<QgsMesh> mNativeMesh;
1040 std::vector<std::unique_ptr<QgsTriangularMesh>> mTriangularMeshes;
1043 std::unique_ptr<QgsMeshLayerRendererCache> mRendererCache;
1060 int mStaticScalarDatasetIndex = 0;
1061 int mStaticVectorDatasetIndex = 0;
1066 bool mLabelsEnabled =
false;
1071 int closestEdge(
const QgsPointXY &point,
double searchRadius,
QgsPointXY &projectedPoint )
const;
1082 void updateActiveDatasetGroups();
1085 void checkSymbologyConsistency();
1087 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.