mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
Add icons to geometry validation checks
This commit is contained in:
parent
dcc92de5d0
commit
04cdf63818
@ -75,6 +75,10 @@
|
||||
<file>north_arrows/gpsarrow2.svg</file>
|
||||
<file>splash/splash.png</file>
|
||||
<file>composer/missing_image.svg</file>
|
||||
<file>themes/default/checks/SliverOrGap.svg</file>
|
||||
<file>themes/default/checks/InvalidGeometry.svg</file>
|
||||
<file>themes/default/checks/MissingVertex.svg</file>
|
||||
<file>themes/default/checks/Overlap.svg</file>
|
||||
<file>themes/default/algorithms/mAlgorithmAddGeometryAttributes.svg</file>
|
||||
<file>themes/default/algorithms/mAlgorithmBasicStatistics.svg</file>
|
||||
<file>themes/default/algorithms/mAlgorithmBuffer.svg</file>
|
||||
|
77
images/themes/default/checks/InvalidGeometry.svg
Normal file
77
images/themes/default/checks/InvalidGeometry.svg
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 6.35 6.35"
|
||||
id="svg3025"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="InvalidGeometry.svg">
|
||||
<metadata
|
||||
id="metadata3043">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3041" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview3039"
|
||||
showgrid="true"
|
||||
inkscape:zoom="29.043334"
|
||||
inkscape:cx="-0.85834923"
|
||||
inkscape:cy="11.823933"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3824" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="Polygon"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:#84a8de;fill-opacity:1;stroke:#2e2e2e;stroke-width:0.29342290999999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 1.1621319,0.42475143 5.1634228,1.0613205 1.0711934,5.8709533 4.8501906,5.2343841 z"
|
||||
id="path3074"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="SelfIntersect">
|
||||
<path
|
||||
style="fill:none;stroke:#901919;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 2.769425,2.6695798 1.1023039,0.00911 0,1.1114137 -1.1023039,0 z"
|
||||
id="path3865"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
103
images/themes/default/checks/MissingVertex.svg
Normal file
103
images/themes/default/checks/MissingVertex.svg
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 6.35 6.35"
|
||||
id="svg3025"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.4 (unknown)"
|
||||
sodipodi:docname="MissingVertex.svg">
|
||||
<metadata
|
||||
id="metadata3043">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3041" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1376"
|
||||
id="namedview3039"
|
||||
showgrid="true"
|
||||
inkscape:zoom="20.95685"
|
||||
inkscape:cx="9.9392211"
|
||||
inkscape:cy="27.399107"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3898" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="Polygon fill"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:#8cbe8c;fill-opacity:1;stroke:none"
|
||||
d="M -5,11 H 30 V -1 H -5 v 12"
|
||||
id="path3796"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333)" />
|
||||
<path
|
||||
style="fill:#84a8de;fill-opacity:1;stroke:none"
|
||||
d="M -5,24 H 30 V 11 H -5 v 13"
|
||||
id="path3798"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333)" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Polygon outline"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:none;stroke:#2e2e2e;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M -5,11 H 30"
|
||||
id="path4344"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333)" />
|
||||
<path
|
||||
style="display:inline;fill:none;stroke:#2e2e2e;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 3.175,-0.26458333 V 2.9104167"
|
||||
id="path4344-3"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="Node"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:none;stroke:#901919;stroke-width:1.12806368;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3.175,3.4395833 V 2.38125"
|
||||
id="path4340"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
128
images/themes/default/checks/Overlap.svg
Normal file
128
images/themes/default/checks/Overlap.svg
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 6.35 6.35"
|
||||
id="svg3025"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="Overlap.svg">
|
||||
<metadata
|
||||
id="metadata3043">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3041" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview3039"
|
||||
showgrid="true"
|
||||
inkscape:zoom="10.186873"
|
||||
inkscape:cx="-15.071365"
|
||||
inkscape:cy="11.706109"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer4">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3898" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="Polygon fill"
|
||||
style="display:inline"
|
||||
sodipodi:insensitive="true">
|
||||
<path
|
||||
style="fill:#84a8de;fill-opacity:1;stroke:none"
|
||||
d="m 28,-1 0,25 -31,0 6,-6 6.0000001,0 z"
|
||||
id="path4446"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333,0.26458333)"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
style="fill:#8cbe8c;fill-opacity:1;stroke:none"
|
||||
d="m -3,24 18,-17.9999999 6,0 L 28,-1 -3,-1 z"
|
||||
id="path4448"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333,0.26458333)"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="Overlap_Fill">
|
||||
<path
|
||||
style="fill:#8cbe8c;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||
d="m 3,18 6,0 3,-3 -6,0 z"
|
||||
id="path5432"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333,0.26458333)" />
|
||||
<path
|
||||
style="fill:#84a8de;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||
d="m 6,15 6,0 3,-3 -6,0 -3,3"
|
||||
id="path5434"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333,0.26458333)" />
|
||||
<path
|
||||
style="fill:#8cbe8c;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||
d="M 15,12 18,9 12,9 9,12 z"
|
||||
id="path5436"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333,0.26458333)" />
|
||||
<path
|
||||
style="fill:#84a8de;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
||||
d="m 21,6 -3,3 -6,0 3,-3 6,0"
|
||||
id="path5438"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333,0.26458333)" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Polygon outline"
|
||||
style="display:inline"
|
||||
sodipodi:insensitive="true">
|
||||
<g
|
||||
id="g5428"
|
||||
transform="translate(0.26458343,-8.3333332e-8)">
|
||||
<path
|
||||
sodipodi:nodetypes="ccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3930"
|
||||
d="M 7.1437499,-0.26458325 2.1166667,4.7625 l -1.58750003,0"
|
||||
style="fill:none;stroke:#2e2e2e;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3932"
|
||||
d="m 5.2916667,1.5875 -1.5875,0 -4.7625,4.7625"
|
||||
style="fill:none;stroke:#2e2e2e;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
93
images/themes/default/checks/SliverOrGap.svg
Normal file
93
images/themes/default/checks/SliverOrGap.svg
Normal file
@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 6.35 6.35"
|
||||
id="svg3025"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.4 (unknown)"
|
||||
sodipodi:docname="SliverOrGap.svg">
|
||||
<metadata
|
||||
id="metadata3043">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3041" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1376"
|
||||
id="namedview3039"
|
||||
showgrid="true"
|
||||
inkscape:zoom="20.536738"
|
||||
inkscape:cx="16.213422"
|
||||
inkscape:cy="14.036282"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer3">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3898" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="Polygon fill"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:#84a8de;fill-opacity:1;stroke:none"
|
||||
d="M -5,-6 30,29 V -6 H -5 L 2,1 6.0000001,18 23,22 30,29 H -5.0000001 L -5,-6"
|
||||
id="path4466"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333)" />
|
||||
<path
|
||||
style="fill:#8cbe8c;fill-opacity:1;stroke:none"
|
||||
d="M -5,29 H 30 L 19,18 H 6 L 7.0000001,6.0000001 -5,-6 v 35"
|
||||
id="path4468"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333)"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Polygon outline"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:none;stroke:#2e2e2e;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M -5,-6 30,29"
|
||||
id="path4462"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="scale(0.26458333)" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e2e2e;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 7.0000001,6.0000001 6,18 h 13"
|
||||
id="path4464"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc"
|
||||
transform="scale(0.26458333)" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
@ -163,6 +163,12 @@ Will be used to update existing errors whenever they are re-checked.
|
||||
|
||||
|
||||
|
||||
virtual QIcon icon() const;
|
||||
%Docstring
|
||||
Returns an icon that should be shown for this kind of error.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
%End
|
||||
protected:
|
||||
|
||||
QgsGeometryCheckError( const QgsGeometryCheck *check,
|
||||
|
@ -16,6 +16,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "qgsgeometrycheckerror.h"
|
||||
#include "qgsapplication.h"
|
||||
|
||||
QgsGeometryCheckError::QgsGeometryCheckError( const QgsGeometryCheck *check,
|
||||
const QString &layerId,
|
||||
@ -186,6 +187,14 @@ QMap<QString, QgsFeatureIds> QgsGeometryCheckError::involvedFeatures() const
|
||||
return QMap<QString, QSet<QgsFeatureId> >();
|
||||
}
|
||||
|
||||
QIcon QgsGeometryCheckError::icon() const
|
||||
{
|
||||
if ( status() == QgsGeometryCheckError::StatusFixed )
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmCheckGeometry.svg" ) );
|
||||
else
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmLineIntersections.svg" ) );
|
||||
}
|
||||
|
||||
void QgsGeometryCheckError::update( const QgsGeometryCheckError *other )
|
||||
{
|
||||
Q_ASSERT( mCheck == other->mCheck );
|
||||
|
@ -188,6 +188,12 @@ class ANALYSIS_EXPORT QgsGeometryCheckError
|
||||
*/
|
||||
virtual QMap<QString, QgsFeatureIds > involvedFeatures() const SIP_SKIP;
|
||||
|
||||
/**
|
||||
* Returns an icon that should be shown for this kind of error.
|
||||
*
|
||||
* \since QGIS 3.8
|
||||
*/
|
||||
virtual QIcon icon() const;
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "qgsfeaturepool.h"
|
||||
#include "qgsvectorlayer.h"
|
||||
#include "qgsfeedback.h"
|
||||
#include "qgsapplication.h"
|
||||
|
||||
#include "geos_c.h"
|
||||
|
||||
@ -328,3 +329,12 @@ QMap<QString, QgsFeatureIds> QgsGeometryGapCheckError::involvedFeatures() const
|
||||
{
|
||||
return mNeighbors;
|
||||
}
|
||||
|
||||
QIcon QgsGeometryGapCheckError::icon() const
|
||||
{
|
||||
|
||||
if ( status() == QgsGeometryCheckError::StatusFixed )
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmCheckGeometry.svg" ) );
|
||||
else
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/checks/SliverOrGap.svg" ) );
|
||||
}
|
||||
|
@ -67,6 +67,8 @@ class ANALYSIS_EXPORT QgsGeometryGapCheckError : public QgsGeometryCheckError
|
||||
|
||||
QMap<QString, QgsFeatureIds > involvedFeatures() const override;
|
||||
|
||||
QIcon icon() const override;
|
||||
|
||||
private:
|
||||
QMap<QString, QgsFeatureIds> mNeighbors;
|
||||
QgsRectangle mGapAreaBBox;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "qgslinestring.h"
|
||||
#include "qgsgeometryengine.h"
|
||||
#include "qgsgeometryutils.h"
|
||||
#include "qgsapplication.h"
|
||||
|
||||
QgsGeometryMissingVertexCheck::QgsGeometryMissingVertexCheck( const QgsGeometryCheckContext *context, const QVariantMap &geometryCheckConfiguration )
|
||||
: QgsGeometryCheck( context, geometryCheckConfiguration )
|
||||
@ -289,3 +290,12 @@ void QgsGeometryMissingVertexCheckError::setInvolvedFeatures( const QMap<QString
|
||||
{
|
||||
mInvolvedFeatures = involvedFeatures;
|
||||
}
|
||||
|
||||
QIcon QgsGeometryMissingVertexCheckError::icon() const
|
||||
{
|
||||
|
||||
if ( status() == QgsGeometryCheckError::StatusFixed )
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmCheckGeometry.svg" ) );
|
||||
else
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/checks/MissingVertex.svg" ) );
|
||||
}
|
||||
|
@ -66,6 +66,8 @@ class ANALYSIS_EXPORT QgsGeometryMissingVertexCheckError : public QgsGeometryChe
|
||||
*/
|
||||
void setInvolvedFeatures( const QMap<QString, QgsFeatureIds> &involvedFeatures );
|
||||
|
||||
QIcon icon() const override;
|
||||
|
||||
private:
|
||||
QgsRectangle mAffectedAreaBBox;
|
||||
QMap<QString, QgsFeatureIds> mInvolvedFeatures;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "qgsfeaturepool.h"
|
||||
#include "qgsvectorlayer.h"
|
||||
#include "qgsfeedback.h"
|
||||
#include "qgsapplication.h"
|
||||
|
||||
QgsGeometryOverlapCheck::QgsGeometryOverlapCheck( const QgsGeometryCheckContext *context, const QVariantMap &configuration )
|
||||
: QgsGeometryCheck( context, configuration )
|
||||
@ -312,3 +313,12 @@ QMap<QString, QgsFeatureIds> QgsGeometryOverlapCheckError::involvedFeatures() co
|
||||
features[mOverlappedFeature.layerId()].insert( mOverlappedFeature.featureId() );
|
||||
return features;
|
||||
}
|
||||
|
||||
QIcon QgsGeometryOverlapCheckError::icon() const
|
||||
{
|
||||
|
||||
if ( status() == QgsGeometryCheckError::StatusFixed )
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmCheckGeometry.svg" ) );
|
||||
else
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/checks/Overlap.svg" ) );
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckErro
|
||||
QString description() const override;
|
||||
|
||||
QMap<QString, QgsFeatureIds > involvedFeatures() const override;
|
||||
QIcon icon() const override;
|
||||
|
||||
private:
|
||||
OverlappedFeature mOverlappedFeature;
|
||||
|
@ -72,10 +72,7 @@ QVariant QgsGeometryValidationModel::data( const QModelIndex &index, int role )
|
||||
switch ( role )
|
||||
{
|
||||
case Qt::DecorationRole:
|
||||
if ( topologyError->status() == QgsGeometryCheckError::StatusFixed )
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmCheckGeometry.svg" ) );
|
||||
else
|
||||
return QgsApplication::getThemeIcon( QStringLiteral( "/algorithms/mAlgorithmLineIntersections.svg" ) );
|
||||
return topologyError->icon();
|
||||
|
||||
case Qt::DisplayRole:
|
||||
case DetailsRole:
|
||||
@ -166,13 +163,7 @@ QVariant QgsGeometryValidationModel::data( const QModelIndex &index, int role )
|
||||
|
||||
case Qt::DecorationRole:
|
||||
{
|
||||
#if 0
|
||||
if ( mGeometryValidationService->validationActive( mCurrentLayer, featureItem.fid ) )
|
||||
return QgsApplication::getThemeIcon( "/mActionTracing.svg" );
|
||||
else
|
||||
return QVariant();
|
||||
#endif
|
||||
break;
|
||||
return QgsApplication::getThemeIcon( "/checks/InvalidGeometry.svg" );
|
||||
}
|
||||
|
||||
case GeometryCheckErrorRole:
|
||||
|
Loading…
x
Reference in New Issue
Block a user