115 : transformContext( transformContext )
127 bool loadDefaultStyle =
true;
142 bool skipCrsValidation =
false;
158 explicit QgsMeshLayer(
const QString &path = QString(),
const QString &baseName = QString(),
const QString &providerLib = QStringLiteral(
"mesh_memory" ),
169 SIP_PYOBJECT __repr__();
171 QString
str = QStringLiteral(
"<QgsMeshLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral(
"Invalid" ) );
172 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
182 bool readSymbology( const QDomNode &node, QString &errorMessage,
184 bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage,
186 bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const
QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const override;
187 bool readStyle( const QDomNode &node, QString &errorMessage,
QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) override;
188 QString encodedSource( const QString &source, const
QgsReadWriteContext &context ) const override;
189 QString decodedSource( const QString &source, const QString &provider, const
QgsReadWriteContext &context ) const override;
191 bool writeXml( QDomNode &layer_node, QDomDocument &doc, const
QgsReadWriteContext &context ) const override;
194 void reload() override;
195 QStringList subLayers() const override;
196 QString htmlMetadata() const override;
197 bool isEditable() const override;
198 bool supportsEditing() const override;
199 QString loadDefaultStyle(
bool &resultFlag
SIP_OUT )
FINAL;
202 QString providerType() const;
213 bool addDatasets( const QString &path, const QDateTime &defaultReferenceTime = QDateTime() );
235 bool saveDataset( const QString &path,
int datasetGroupIndex, QString driver );
271 int triangularMeshLevelOfDetailCount() const
SIP_SKIP;
299 QgsMeshLayerRendererCache *rendererCache()
SIP_SKIP;
340 QString formatTime(
double hours );
347 int datasetGroupCount() const;
354 int extraDatasetGroupCount() const;
364 QList<
int> datasetGroupsIndexes() const;
374 QList<
int> enabledDatasetGroupsIndexes() const;
671 void setReferenceTime( const QDateTime &referenceTime );
713 QList<
int> selectVerticesByExpression(
QgsExpression expression );
723 QList<
int> selectFacesByExpression(
QgsExpression expression );
754 void resetDatasetGroupTreeItem();
851 bool isModified() const override;
857 bool contains( const
QgsMesh::ElementType &type ) const;
866 int meshVertexCount() const;
875 int meshFaceCount() const;
882 int meshEdgeCount() const;
900 void activeScalarDatasetGroupChanged(
int index );
907 void activeVectorDatasetGroupChanged(
int index );
914 void timeSettingsChanged();
928 bool isReadOnly()
const override {
return true;}
936 bool setDataProvider( QString
const &provider,
const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
942 void fillNativeMesh();
943 void assignDefaultStyleToDatasetGroup(
int groupIndex );
944 void createSimplifiedMeshes();
945 int levelsOfDetailsIndex(
double partOfMeshInView )
const;
947 bool hasSimplifiedMeshes()
const;
953 void onDatasetGroupsAdded(
const QList<int> &datasetGroupIndexes );
961 QStringList mExtraDatasetUri;
963 std::unique_ptr<QgsMeshDatasetGroupStore> mDatasetGroupStore;
966 std::unique_ptr<QgsMesh> mNativeMesh;
969 std::vector<std::unique_ptr<QgsTriangularMesh>> mTriangularMeshes;
972 std::unique_ptr<QgsMeshLayerRendererCache> mRendererCache;
989 int mStaticScalarDatasetIndex = 0;
990 int mStaticVectorDatasetIndex = 0;
994 int closestEdge(
const QgsPointXY &point,
double searchRadius,
QgsPointXY &projectedPoint )
const;
1005 void updateActiveDatasetGroups();
1008 void checkSymbologyConsistency();
1010 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.