LCOV - code coverage report
Current view: top level - core/mesh - qgsmeshsimplificationsettings.cpp (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 0 29 0.0 %
Date: 2021-03-26 12:19:53 Functions: 0 0 -
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /***************************************************************************
       2                 :            :                          qgsmeshsimplificationsettings.cpp
       3                 :            :                          ---------------------
       4                 :            :     begin                : February 2020
       5                 :            :     copyright            : (C) 2020 by Vincent Cloarec
       6                 :            :     email                : vcloarec at gmail dot com
       7                 :            :  ***************************************************************************/
       8                 :            : 
       9                 :            : /***************************************************************************
      10                 :            :  *                                                                         *
      11                 :            :  *   This program is free software; you can redistribute it and/or modify  *
      12                 :            :  *   it under the terms of the GNU General Public License as published by  *
      13                 :            :  *   the Free Software Foundation; either version 2 of the License, or     *
      14                 :            :  *   (at your option) any later version.                                   *
      15                 :            :  *                                                                         *
      16                 :            :  ***************************************************************************/
      17                 :            : 
      18                 :            : #include "qgsmeshsimplificationsettings.h"
      19                 :            : 
      20                 :          0 : bool QgsMeshSimplificationSettings::isEnabled() const
      21                 :            : {
      22                 :          0 :   return mEnabled;
      23                 :            : }
      24                 :            : 
      25                 :          0 : void QgsMeshSimplificationSettings::setEnabled( bool active )
      26                 :            : {
      27                 :          0 :   mEnabled = active;
      28                 :          0 : }
      29                 :            : 
      30                 :          0 : double QgsMeshSimplificationSettings::reductionFactor() const
      31                 :            : {
      32                 :          0 :   return mReductionFactor;
      33                 :            : }
      34                 :            : 
      35                 :          0 : void QgsMeshSimplificationSettings::setReductionFactor( double value )
      36                 :            : {
      37                 :          0 :   mReductionFactor = value;
      38                 :          0 : }
      39                 :            : 
      40                 :          0 : QDomElement QgsMeshSimplificationSettings::writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const
      41                 :            : {
      42                 :          0 :   Q_UNUSED( context )
      43                 :          0 :   QDomElement elem = doc.createElement( QStringLiteral( "mesh-simplify-settings" ) );
      44                 :          0 :   elem.setAttribute( QStringLiteral( "enabled" ), mEnabled ? QStringLiteral( "1" ) : QStringLiteral( "0" ) );
      45                 :          0 :   elem.setAttribute( QStringLiteral( "reduction-factor" ), mReductionFactor );
      46                 :          0 :   elem.setAttribute( QStringLiteral( "mesh-resolution" ), mMeshResolution );
      47                 :          0 :   return elem;
      48                 :          0 : }
      49                 :            : 
      50                 :          0 : void QgsMeshSimplificationSettings::readXml( const QDomElement &elem, const QgsReadWriteContext &context )
      51                 :            : {
      52                 :          0 :   Q_UNUSED( context )
      53                 :          0 :   mEnabled = elem.attribute( QStringLiteral( "enabled" ) ).toInt();
      54                 :          0 :   mReductionFactor = elem.attribute( QStringLiteral( "reduction-factor" ) ).toDouble();
      55                 :          0 :   mMeshResolution = elem.attribute( QStringLiteral( "mesh-resolution" ) ).toInt();
      56                 :          0 : }
      57                 :            : 
      58                 :          0 : int QgsMeshSimplificationSettings::meshResolution() const
      59                 :            : {
      60                 :          0 :   return mMeshResolution;
      61                 :            : }
      62                 :            : 
      63                 :          0 : void QgsMeshSimplificationSettings::setMeshResolution( int meshResolution )
      64                 :            : {
      65                 :          0 :   mMeshResolution = meshResolution;
      66                 :          0 : }

Generated by: LCOV version 1.14