LCOV - code coverage report
Current view: top level - analysis/vector/geometry_checker - qgsgeometrycheckregistry.h (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 0 1 0.0 %
Date: 2021-03-26 12:19:53 Functions: 0 0 -
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /***************************************************************************
       2                 :            :     qgsgeometrycheckregistry.h
       3                 :            :      --------------------------------------
       4                 :            :     Date                 : September 2018
       5                 :            :     Copyright            : (C) 2018 Matthias Kuhn
       6                 :            :     Email                : matthias@opengis.ch
       7                 :            :  ***************************************************************************
       8                 :            :  *                                                                         *
       9                 :            :  *   This program is free software; you can redistribute it and/or modify  *
      10                 :            :  *   it under the terms of the GNU General Public License as published by  *
      11                 :            :  *   the Free Software Foundation; either version 2 of the License, or     *
      12                 :            :  *   (at your option) any later version.                                   *
      13                 :            :  *                                                                         *
      14                 :            :  ***************************************************************************/
      15                 :            : 
      16                 :            : #ifndef QGSGEOMETRYCHECKREGISTRY_H
      17                 :            : #define QGSGEOMETRYCHECKREGISTRY_H
      18                 :            : 
      19                 :            : #include <QString>
      20                 :            : #include <QMap>
      21                 :            : #include <QVariant>
      22                 :            : 
      23                 :            : #include "qgis_sip.h"
      24                 :            : #include "qgis_analysis.h"
      25                 :            : #include "qgsgeometrycheck.h"
      26                 :            : 
      27                 :            : class QgsGeometryCheckFactory;
      28                 :            : class QgsGeometryCheckContext;
      29                 :            : 
      30                 :            : 
      31                 :            : /**
      32                 :            :  * \ingroup analysis
      33                 :            :  * \brief This class manages all known geometry check factories.
      34                 :            :  *
      35                 :            :  * QgsGeometryCheckRegistry is not usually directly created, but rather accessed through
      36                 :            :  * QgsAnalysis::geometryCheckRegistry().
      37                 :            :  *
      38                 :            :  * \note This class is a technology preview and unstable API.
      39                 :            :  * \since QGIS 3.4
      40                 :            :  */
      41                 :            : class ANALYSIS_EXPORT QgsGeometryCheckRegistry
      42                 :            : {
      43                 :            :   public:
      44                 :            : 
      45                 :            :     /**
      46                 :            :      * Constructor for QgsGeometryCheckRegistry. QgsGeometryCheckRegistry is not usually directly created, but rather accessed through
      47                 :            :      * QgsAnalysis::geometryCheckRegistry().
      48                 :            :      */
      49                 :          0 :     QgsGeometryCheckRegistry() = default;
      50                 :            : 
      51                 :            :     /**
      52                 :            :      * Destructor
      53                 :            :      *
      54                 :            :      * Deletes all the registered checks
      55                 :            :      */
      56                 :            :     ~QgsGeometryCheckRegistry();
      57                 :            : 
      58                 :            :     /**
      59                 :            :      * Create a new geometryCheck of type \a checkId
      60                 :            :      * Pass the \a context and \a geometryCheckConfiguration to the newly created check.
      61                 :            :      * Ownership is transferred to the caller.
      62                 :            :      *
      63                 :            :      * \since QGIS 3.4
      64                 :            :      */
      65                 :            :     QgsGeometryCheck *geometryCheck( const QString &checkId, QgsGeometryCheckContext *context, const QVariantMap &geometryCheckConfig ) SIP_FACTORY;
      66                 :            : 
      67                 :            :     /**
      68                 :            :      * Returns all geometry check factories that are compatible with \a layer and have all of the \a flags set.
      69                 :            :      *
      70                 :            :      * \since QGIS 3.4
      71                 :            :      */
      72                 :            :     QList<QgsGeometryCheckFactory *> geometryCheckFactories( QgsVectorLayer *layer,  QgsGeometryCheck::CheckType type, QgsGeometryCheck::Flags flags = QgsGeometryCheck::Flags() ) const;
      73                 :            : 
      74                 :            :     /**
      75                 :            :      * Registers a new geometry check factory.
      76                 :            :      *
      77                 :            :      * \since QGIS 3.4
      78                 :            :      */
      79                 :            :     void registerGeometryCheck( QgsGeometryCheckFactory *checkFactory SIP_TRANSFER );
      80                 :            : 
      81                 :            :   private:
      82                 :            :     QMap<QString, QgsGeometryCheckFactory *> mGeometryCheckFactories;
      83                 :            : };
      84                 :            : 
      85                 :            : #endif // QGSGEOMETRYCHECKREGISTRY_H

Generated by: LCOV version 1.14