Skip to content

Commit a168b90

Browse files
committed
sip sync and indentation update
1 parent 7e5b6f7 commit a168b90

8 files changed

+308
-275
lines changed

python/core/symbology-ng/qgsinvertedpolygonrenderer.sip

+57-53
Original file line numberDiff line numberDiff line change
@@ -5,66 +5,70 @@ class QgsInvertedPolygonRenderer : QgsFeatureRendererV2
55
%End
66
public:
77

8-
/** Constructor
9-
* @param embeddedRenderer optional embeddedRenderer. If null, a default one will be assigned
10-
*/
11-
QgsInvertedPolygonRenderer( const QgsFeatureRendererV2* embeddedRenderer /Transfer/ = 0 );
12-
virtual ~QgsInvertedPolygonRenderer();
8+
/** Constructor
9+
* @param embeddedRenderer optional embeddedRenderer. If null, a default one will be assigned
10+
*/
11+
QgsInvertedPolygonRenderer( const QgsFeatureRendererV2* embeddedRenderer /Transfer/ = 0 );
12+
virtual ~QgsInvertedPolygonRenderer();
1313

14-
/** Used to clone this feature renderer.*/
15-
virtual QgsFeatureRendererV2* clone() /Factory/;
14+
/** Used to clone this feature renderer.*/
15+
virtual QgsFeatureRendererV2* clone() /Factory/;
1616

17-
virtual void startRender( QgsRenderContext& context, const QgsFields& fields );
17+
virtual void startRender( QgsRenderContext& context, const QgsFields& fields );
1818

19-
/** Renders a given feature.
20-
* This will here collect features. The actual rendering will be postponed to stopRender()
21-
* @param feature the feature to render
22-
* @param context the rendering context
23-
* @param layer the symbol layer to render, if that makes sense
24-
* @param selected whether this feature has been selected (this will add decorations)
25-
* @param drawVertexMarker whether this feature has vertex markers (in edit mode usually)
26-
* @returns true if the rendering was ok
27-
*/
28-
virtual bool renderFeature( QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false );
19+
/** Renders a given feature.
20+
* This will here collect features. The actual rendering will be postponed to stopRender()
21+
* @param feature the feature to render
22+
* @param context the rendering context
23+
* @param layer the symbol layer to render, if that makes sense
24+
* @param selected whether this feature has been selected (this will add decorations)
25+
* @param drawVertexMarker whether this feature has vertex markers (in edit mode usually)
26+
* @returns true if the rendering was ok
27+
*/
28+
virtual bool renderFeature( QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false );
2929

30-
/**
31-
* The actual rendering will take place here.
32-
* Features collected during renderFeature() are rendered using the embedded feature renderer
33-
*/
34-
virtual void stopRender( QgsRenderContext& context );
30+
/**
31+
* The actual rendering will take place here.
32+
* Features collected during renderFeature() are rendered using the embedded feature renderer
33+
*/
34+
virtual void stopRender( QgsRenderContext& context );
3535

36-
/** @returns a textual reprensation of the renderer */
37-
virtual QString dump() const;
36+
/** @returns a textual representation of the renderer */
37+
virtual QString dump() const;
3838

39-
/** Proxy that will call this method on the embedded renderer. */
40-
virtual QList<QString> usedAttributes();
41-
/** Proxy that will call this method on the embedded renderer. */
42-
virtual int capabilities();
43-
/** Proxy that will call this method on the embedded renderer. */
44-
virtual QgsSymbolV2List symbols();
45-
/** Proxy that will call this method on the embedded renderer. */
46-
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
47-
/** Proxy that will call this method on the embedded renderer. */
48-
virtual QgsSymbolV2List symbolsForFeature( QgsFeature& feat );
49-
/** Proxy that will call this method on the embedded renderer. */
50-
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
51-
/** Proxy that will call this method on the embedded renderer. */
52-
virtual bool willRenderFeature( QgsFeature& feat );
39+
/** Proxy that will call this method on the embedded renderer. */
40+
virtual QList<QString> usedAttributes();
41+
/** Proxy that will call this method on the embedded renderer. */
42+
virtual int capabilities();
43+
/** Proxy that will call this method on the embedded renderer. */
44+
virtual QgsSymbolV2List symbols();
45+
/** Proxy that will call this method on the embedded renderer. */
46+
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
47+
/** Proxy that will call this method on the embedded renderer. */
48+
virtual QgsSymbolV2List symbolsForFeature( QgsFeature& feat );
49+
/** Proxy that will call this method on the embedded renderer. */
50+
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
51+
/** Proxy that will call this method on the embedded renderer.
52+
@note not available in python bindings
53+
*/
54+
// virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QString rule = "" );
55+
/** Proxy that will call this method on the embedded renderer. */
56+
virtual bool willRenderFeature( QgsFeature& feat );
5357

54-
/** Creates a renderer out of an XML, for loading*/
55-
static QgsFeatureRendererV2* create( QDomElement& element ) /Factory/;
58+
/** Creates a renderer out of an XML, for loading*/
59+
static QgsFeatureRendererV2* create( QDomElement& element ) /Factory/;
5660

57-
/** Creates an XML representation of the renderer. Used for saving purpose
58-
* @param doc the XML document where to create the XML subtree
59-
* @returns the created XML subtree
60-
*/
61-
virtual QDomElement save( QDomDocument& doc );
61+
/** Creates an XML representation of the renderer. Used for saving purpose
62+
* @param doc the XML document where to create the XML subtree
63+
* @returns the created XML subtree
64+
*/
65+
virtual QDomElement save( QDomDocument& doc );
6266

63-
/** sets the embedded renderer
64-
* @param subRenderer the embedded renderer (will be cloned)
65-
*/
66-
void setEmbeddedRenderer( const QgsFeatureRendererV2* subRenderer );
67-
/** @returns the current embedded renderer
68-
*/
69-
const QgsFeatureRendererV2* embeddedRenderer() const;
67+
/** sets the embedded renderer
68+
* @param subRenderer the embedded renderer (will be cloned)
69+
*/
70+
void setEmbeddedRenderer( const QgsFeatureRendererV2* subRenderer );
71+
/** @returns the current embedded renderer
72+
*/
73+
const QgsFeatureRendererV2* embeddedRenderer() const;
7074
};

python/gui/symbology-ng/qgsinvertedpolygonrendererwidget.sip

+15-15
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ class QgsInvertedPolygonRendererWidget : QgsRendererV2Widget
33
%TypeHeaderCode
44
#include <qgsinvertedpolygonrendererwidget.h>
55
%End
6-
public:
7-
/** static creation method
8-
* @param layer the layer where this renderer is applied
9-
* @param style
10-
* @param renderer the mask renderer (will take ownership)
11-
*/
12-
static QgsRendererV2Widget* create( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer ) /Factory/;
6+
public:
7+
/** static creation method
8+
* @param layer the layer where this renderer is applied
9+
* @param style
10+
* @param renderer the mask renderer (will take ownership)
11+
*/
12+
static QgsRendererV2Widget* create( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer ) /Factory/;
1313

14-
/** Constructor
15-
* @param layer the layer where this renderer is applied
16-
* @param style
17-
* @param renderer the mask renderer (will take ownership)
18-
*/
19-
QgsInvertedPolygonRendererWidget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer );
14+
/** Constructor
15+
* @param layer the layer where this renderer is applied
16+
* @param style
17+
* @param renderer the mask renderer (will take ownership)
18+
*/
19+
QgsInvertedPolygonRendererWidget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer );
2020

21-
/** @returns the current feature renderer */
22-
virtual QgsFeatureRendererV2* renderer();
21+
/** @returns the current feature renderer */
22+
virtual QgsFeatureRendererV2* renderer();
2323
};

scripts/astyle-all.sh

+2-26
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,6 @@ set -e
2222
export elcr="$(tput el)$(tput cr)"
2323

2424
find python src tests -type f -print | while read f; do
25-
case "$f" in
26-
src/app/gps/qwtpolar-*|src/core/spatialite/*|src/core/spatialindex/src/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/ext-libs/*|src/providers/sqlanywhere/sqlanyconnection/*|src/providers/spatialite/qspatialite/*|src/plugins/dxf2shp_converter/dxflib/src/*|src/plugins/globe/osgEarthQt/*|src/plugins/globe/osgEarthUtil/*)
27-
echo $f skipped
28-
continue
29-
;;
30-
31-
*.cpp|*.h|*.c|*.h|*.cxx|*.hxx|*.c++|*.h++|*.cc|*.hh|*.C|*.H|*.hpp)
32-
cmd=astyle.sh
33-
;;
34-
35-
*.ui|*.qgm|*.txt|*.t2t|*.sip|resources/context_help/*)
36-
cmd="flip -ub"
37-
;;
38-
39-
*.py)
40-
cmd="perl -i.prepare -pe 's/[\r\t ]+$//;'"
41-
;;
42-
43-
*)
44-
echo -ne "$f skipped $elcr"
45-
continue
46-
;;
47-
esac
48-
4925
if [ -f "$f.astyle" ]; then
5026
# reformat backup
5127
cp "$f.astyle" "$f"
@@ -56,8 +32,8 @@ find python src tests -type f -print | while read f; do
5632
touch -r "$f" "$f.astyle"
5733
fi
5834

59-
echo -ne "Reformating $f $elcr"
60-
eval "$cmd '$f'"
35+
echo -ne "Reformatting $f $elcr"
36+
astyle.sh "$f"
6137
done
6238

6339
echo

scripts/astyle.sh

+25-1
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,36 @@ $ARTISTIC_STYLE_OPTIONS \
5959
--unpad=paren"
6060

6161
for f in "$@"; do
62+
case "$f" in
63+
src/app/gps/qwtpolar-*|src/core/spatialite/*|src/core/spatialindex/src/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/ext-libs/*|src/providers/sqlanywhere/sqlanyconnection/*|src/providers/spatialite/qspatialite/*|src/plugins/dxf2shp_converter/dxflib/src/*|src/plugins/globe/osgEarthQt/*|src/plugins/globe/osgEarthUtil/*)
64+
echo $f skipped
65+
continue
66+
;;
67+
68+
*.cpp|*.h|*.c|*.h|*.cxx|*.hxx|*.c++|*.h++|*.cc|*.hh|*.C|*.H|*.hpp)
69+
cmd="$ASTYLE $ARTISTIC_STYLE_OPTIONS"
70+
;;
71+
72+
*.ui|*.qgm|*.txt|*.t2t|*.sip|resources/context_help/*)
73+
cmd=:
74+
;;
75+
76+
*.py)
77+
cmd="perl -i.prepare -pe 's/[\r\t ]+$//;'"
78+
;;
79+
80+
*)
81+
echo -ne "$f skipped $elcr"
82+
continue
83+
;;
84+
esac
85+
6286
if ! [ -f "$f" ]; then
6387
echo "$f not found" >&2
6488
continue
6589
fi
6690

6791
flip -ub "$f"
6892
#qgsloggermig.pl "$f"
69-
$ASTYLE $ARTISTIC_STYLE_OPTIONS "$f"
93+
eval "$cmd '$f'"
7094
done

0 commit comments

Comments
 (0)