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

           Branch data     Line data    Source code
       1                 :            : /***************************************************************************
       2                 :            :   qgslabellinesettings.cpp
       3                 :            :   ----------------------------
       4                 :            :   Date                 : August 2020
       5                 :            :   Copyright            : (C) 2020 by Nyall Dawson
       6                 :            :   Email                : nyall dot dawson at gmail dot com
       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                 :            : #include "qgslabellinesettings.h"
      17                 :            : #include "qgspropertycollection.h"
      18                 :            : #include "qgsexpressioncontext.h"
      19                 :            : #include "qgslabelingengine.h"
      20                 :            : #include "qgspallabeling.h"
      21                 :            : 
      22                 :            : 
      23                 :          0 : void QgsLabelLineSettings::updateDataDefinedProperties( const QgsPropertyCollection &properties, QgsExpressionContext &context )
      24                 :            : {
      25                 :          0 :   if ( properties.isActive( QgsPalLayerSettings::LinePlacementOptions ) )
      26                 :            :   {
      27                 :          0 :     context.setOriginalValueVariable( QgsLabelingUtils::encodeLinePlacementFlags( mPlacementFlags ) );
      28                 :          0 :     const QString dataDefinedLineArrangement = properties.valueAsString( QgsPalLayerSettings::LinePlacementOptions, context );
      29                 :          0 :     if ( !dataDefinedLineArrangement.isEmpty() )
      30                 :            :     {
      31                 :          0 :       mPlacementFlags = QgsLabelingUtils::decodeLinePlacementFlags( dataDefinedLineArrangement );
      32                 :          0 :     }
      33                 :          0 :   }
      34                 :            : 
      35                 :          0 :   if ( properties.isActive( QgsPalLayerSettings::OverrunDistance ) )
      36                 :            :   {
      37                 :          0 :     context.setOriginalValueVariable( mOverrunDistance );
      38                 :          0 :     mOverrunDistance = properties.valueAsDouble( QgsPalLayerSettings::OverrunDistance, context, mOverrunDistance );
      39                 :          0 :   }
      40                 :            : 
      41                 :          0 :   if ( properties.isActive( QgsPalLayerSettings::LineAnchorPercent ) )
      42                 :            :   {
      43                 :          0 :     context.setOriginalValueVariable( mLineAnchorPercent );
      44                 :          0 :     mLineAnchorPercent = properties.valueAsDouble( QgsPalLayerSettings::LineAnchorPercent, context, mLineAnchorPercent );
      45                 :          0 :   }
      46                 :          0 : }

Generated by: LCOV version 1.14