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

           Branch data     Line data    Source code
       1                 :            : /***************************************************************************
       2                 :            :                qgspolymorphicrelation_p.h
       3                 :            :                --------------------------
       4                 :            :     begin                : December 2020
       5                 :            :     copyright            : (C) 2020 Ivan Ivanov
       6                 :            :     email                : ivan@opengis.ch
       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                 :            : #ifndef QGSPOLYMORPHICRELATION_P_H
      18                 :            : #define QGSPOLYMORPHICRELATION_P_H
      19                 :            : 
      20                 :            : #define SIP_NO_FILE
      21                 :            : 
      22                 :            : /// @cond PRIVATE
      23                 :            : 
      24                 :            : //
      25                 :            : //  W A R N I N G
      26                 :            : //  -------------
      27                 :            : //
      28                 :            : // This file is not part of the QGIS API.  It exists purely as an
      29                 :            : // implementation detail.  This header file may change from version to
      30                 :            : // version without notice, or even be removed.
      31                 :            : //
      32                 :            : 
      33                 :            : #include "qgspolymorphicrelation.h"
      34                 :            : #include "qgsrelation.h"
      35                 :            : 
      36                 :            : #include <QSharedData>
      37                 :            : #include <QPointer>
      38                 :            : 
      39                 :          0 : class QgsPolymorphicRelationPrivate : public QSharedData
      40                 :            : {
      41                 :            :   public:
      42                 :          0 :     QgsPolymorphicRelationPrivate() = default;
      43                 :            : 
      44                 :            :     //! Unique Id
      45                 :            :     QString mRelationId;
      46                 :            :     //! Human redable name
      47                 :            :     QString mRelationName;
      48                 :            :     //! The child layer
      49                 :            :     QString mReferencingLayerId;
      50                 :            :     //! The child layer
      51                 :            :     QPointer<QgsVectorLayer> mReferencingLayer;
      52                 :            :     //! The field in the child layer that stores the parent layer
      53                 :            :     QString mReferencedLayerField;
      54                 :            :     //! The expression to identify the referenced (parent) layer
      55                 :            :     QString mReferencedLayerExpression;
      56                 :            :     //! A list of layerids that are set as parents
      57                 :            :     QStringList mReferencedLayerIds;
      58                 :            : 
      59                 :            :     /**
      60                 :            :      * A list of fields which define the relation.
      61                 :            :      * In most cases there will be only one value, but multiple values
      62                 :            :      * are supported for composite foreign keys.
      63                 :            :      * The first field is on the referencing layer, the second on the referenced
      64                 :            :     */
      65                 :            :     QList< QgsRelation::FieldPair > mFieldPairs;
      66                 :            : 
      67                 :            :     //! A map of the layerIds and the respective layers
      68                 :            :     QMap<QString, QgsVectorLayer *> mReferencedLayersMap;
      69                 :            : 
      70                 :            :     //! The relation strength for all the generated normal relations
      71                 :            :     QgsRelation::RelationStrength mRelationStrength;
      72                 :            : 
      73                 :            :     //! Whether the polymorphic relation is valid
      74                 :          0 :     bool mValid = false;
      75                 :            : };
      76                 :            : 
      77                 :            : /// @endcond
      78                 :            : 
      79                 :            : #endif // QGSPOLYMORPHICRELATION_P_H

Generated by: LCOV version 1.14