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 );
972 bool datasetsPathUnique(
const QString &path );
1018 bool isReadOnly()
const override {
return true;}
1031 void fillNativeMesh();
1032 void assignDefaultStyleToDatasetGroup(
int groupIndex );
1033 void createSimplifiedMeshes();
1034 int levelsOfDetailsIndex(
double partOfMeshInView )
const;
1036 bool hasSimplifiedMeshes()
const;
1042 void onDatasetGroupsAdded(
const QList<int> &datasetGroupIndexes );
1043 void onMeshEdited();
1050 QStringList mExtraDatasetUri;
1052 std::unique_ptr<QgsMeshDatasetGroupStore> mDatasetGroupStore;
1055 std::unique_ptr<QgsMesh> mNativeMesh;
1058 std::vector<std::unique_ptr<QgsTriangularMesh>> mTriangularMeshes;
1061 std::unique_ptr<QgsMeshLayerRendererCache> mRendererCache;
1078 int mStaticScalarDatasetIndex = 0;
1079 int mStaticVectorDatasetIndex = 0;
1084 bool mLabelsEnabled =
false;
1089 int closestEdge(
const QgsPointXY &point,
double searchRadius,
QgsPointXY &projectedPoint )
const;
1100 void updateActiveDatasetGroups();
1103 void checkSymbologyConsistency();
1105 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.