Skip to content

Commit 3ecb154

Browse files
committed
Add missing fox for QgsFontMarkerSymbolLayer, improve existing dox
1 parent 644ea71 commit 3ecb154

File tree

2 files changed

+165
-24
lines changed

2 files changed

+165
-24
lines changed

python/core/auto_generated/symbology/qgsmarkersymbollayer.sip.in

+77-8
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,14 @@ class QgsFontMarkerSymbolLayer : QgsMarkerSymbolLayer
715715

716716

717717
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
718+
%Docstring
719+
Creates a new QgsFontMarkerSymbolLayer from a property map (see properties())
720+
%End
721+
718722
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
723+
%Docstring
724+
Creates a new QgsFontMarkerSymbolLayer from an SLD XML ``element``.
725+
%End
719726

720727

721728
virtual QString layerType() const;
@@ -741,66 +748,128 @@ class QgsFontMarkerSymbolLayer : QgsMarkerSymbolLayer
741748

742749

743750
QString fontFamily() const;
751+
%Docstring
752+
Returns the font family name for the associated font which will be used to render the point.
753+
754+
.. seealso:: :py:func:`setFontFamily`
755+
%End
756+
744757
void setFontFamily( const QString &family );
758+
%Docstring
759+
Sets the font ``family`` for the font which will be used to render the point.
760+
761+
.. seealso:: :py:func:`fontFamily`
762+
%End
745763

746764
QChar character() const;
765+
%Docstring
766+
Returns the character used when rendering points.
767+
768+
.. seealso:: :py:func:`setCharacter`
769+
%End
770+
747771
void setCharacter( QChar ch );
772+
%Docstring
773+
Sets the character used when rendering points.
774+
775+
.. seealso:: :py:func:`character`
776+
%End
748777

749778
virtual QColor strokeColor() const;
750779
virtual void setStrokeColor( const QColor &color );
751780

752781
double strokeWidth() const;
753782
%Docstring
754-
Gets stroke width.
783+
Returns the marker's stroke width. Units are retrieved by strokeWidthUnit()
784+
785+
.. seealso:: :py:func:`setStrokeWidth`
786+
787+
.. seealso:: :py:func:`strokeWidthUnit`
788+
789+
.. seealso:: :py:func:`strokeWidthMapUnitScale`
755790

756791
.. versionadded:: 2.16
757792
%End
758793

759794
void setStrokeWidth( double width );
760795
%Docstring
761-
Set stroke width.
796+
Set's the marker's stroke ``width``. Units are set by setStrokeWidthUnit().
797+
798+
.. seealso:: :py:func:`strokeWidth`
799+
800+
.. seealso:: :py:func:`setStrokeWidthUnit`
801+
802+
.. seealso:: :py:func:`setStrokeWidthMapUnitScale`
762803

763804
.. versionadded:: 2.16
764805
%End
765806

766807
QgsUnitTypes::RenderUnit strokeWidthUnit() const;
767808
%Docstring
768-
Gets stroke width unit.
809+
Returns the stroke width unit.
810+
811+
.. seealso:: :py:func:`setStrokeWidthUnit`
812+
813+
.. seealso:: :py:func:`strokeWidth`
814+
815+
.. seealso:: :py:func:`strokeWidthMapUnitScale`
769816

770817
.. versionadded:: 2.16
771818
%End
772819

773820
void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit );
774821
%Docstring
775-
Set stroke width unit.
822+
Sets the stroke width ``unit``.
823+
824+
.. seealso:: :py:func:`strokeWidthUnit`
825+
826+
.. seealso:: :py:func:`setStrokeWidth`
827+
828+
.. seealso:: :py:func:`setStrokeWidthMapUnitScale`
776829

777830
.. versionadded:: 2.16
778831
%End
779832

780833
const QgsMapUnitScale &strokeWidthMapUnitScale() const;
781834
%Docstring
782-
Gets stroke width map unit scale.
835+
Returns the stroke width map unit scale.
836+
837+
.. seealso:: :py:func:`setStrokeWidthMapUnitScale`
838+
839+
.. seealso:: :py:func:`strokeWidth`
840+
841+
.. seealso:: :py:func:`strokeWidthUnit`
783842

784843
.. versionadded:: 2.16
785844
%End
786845

787846
void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale );
788847
%Docstring
789-
Set stroke width map unit scale.
848+
Sets the stroke width map unit ``scale``.
849+
850+
.. seealso:: :py:func:`strokeWidthMapUnitScale`
851+
852+
.. seealso:: :py:func:`setStrokeWidth`
853+
854+
.. seealso:: :py:func:`setStrokeWidthUnit`
790855

791856
.. versionadded:: 2.16
792857
%End
793858

794859
Qt::PenJoinStyle penJoinStyle() const;
795860
%Docstring
796-
Gets stroke join style.
861+
Returns the stroke join style.
862+
863+
.. seealso:: :py:func:`setPenJoinStyle`
797864

798865
.. versionadded:: 2.16
799866
%End
800867

801868
void setPenJoinStyle( Qt::PenJoinStyle style );
802869
%Docstring
803-
Set stroke join style.
870+
Sets the stroke join ``style``.
871+
872+
.. seealso:: :py:func:`penJoinStyle`
804873

805874
.. versionadded:: 2.16
806875
%End

src/core/symbology/qgsmarkersymbollayer.h

+88-16
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,14 @@ class CORE_EXPORT QgsFontMarkerSymbolLayer : public QgsMarkerSymbolLayer
666666

667667
// static stuff
668668

669+
/**
670+
* Creates a new QgsFontMarkerSymbolLayer from a property map (see properties())
671+
*/
669672
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
673+
674+
/**
675+
* Creates a new QgsFontMarkerSymbolLayer from an SLD XML \a element.
676+
*/
670677
static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
671678

672679
// implemented from base classes
@@ -687,53 +694,118 @@ class CORE_EXPORT QgsFontMarkerSymbolLayer : public QgsMarkerSymbolLayer
687694

688695
// new methods
689696

697+
/**
698+
* Returns the font family name for the associated font which will be used to render the point.
699+
*
700+
* \see setFontFamily()
701+
*/
690702
QString fontFamily() const { return mFontFamily; }
703+
704+
/**
705+
* Sets the font \a family for the font which will be used to render the point.
706+
*
707+
* \see fontFamily()
708+
*/
691709
void setFontFamily( const QString &family ) { mFontFamily = family; }
692710

711+
/**
712+
* Returns the character used when rendering points.
713+
*
714+
* \see setCharacter()
715+
*/
693716
QChar character() const { return mChr; }
717+
718+
/**
719+
* Sets the character used when rendering points.
720+
*
721+
* \see character()
722+
*/
694723
void setCharacter( QChar ch ) { mChr = ch; }
695724

696725
QColor strokeColor() const override { return mStrokeColor; }
697726
void setStrokeColor( const QColor &color ) override { mStrokeColor = color; }
698727

699728
/**
700-
* Gets stroke width.
701-
* \since QGIS 2.16 */
729+
* Returns the marker's stroke width. Units are retrieved by strokeWidthUnit()
730+
*
731+
* \see setStrokeWidth()
732+
* \see strokeWidthUnit()
733+
* \see strokeWidthMapUnitScale()
734+
*
735+
* \since QGIS 2.16
736+
*/
702737
double strokeWidth() const { return mStrokeWidth; }
703738

704739
/**
705-
* Set stroke width.
706-
* \since QGIS 2.16 */
740+
* Set's the marker's stroke \a width. Units are set by setStrokeWidthUnit().
741+
*
742+
* \see strokeWidth()
743+
* \see setStrokeWidthUnit()
744+
* \see setStrokeWidthMapUnitScale()
745+
*
746+
* \since QGIS 2.16
747+
*/
707748
void setStrokeWidth( double width ) { mStrokeWidth = width; }
708749

709750
/**
710-
* Gets stroke width unit.
711-
* \since QGIS 2.16 */
751+
* Returns the stroke width unit.
752+
*
753+
* \see setStrokeWidthUnit()
754+
* \see strokeWidth()
755+
* \see strokeWidthMapUnitScale()
756+
*
757+
* \since QGIS 2.16
758+
*/
712759
QgsUnitTypes::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
713760

714761
/**
715-
* Set stroke width unit.
716-
* \since QGIS 2.16 */
762+
* Sets the stroke width \a unit.
763+
*
764+
* \see strokeWidthUnit()
765+
* \see setStrokeWidth()
766+
* \see setStrokeWidthMapUnitScale()
767+
* \since QGIS 2.16
768+
*/
717769
void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ) { mStrokeWidthUnit = unit; }
718770

719771
/**
720-
* Gets stroke width map unit scale.
721-
* \since QGIS 2.16 */
772+
* Returns the stroke width map unit scale.
773+
*
774+
* \see setStrokeWidthMapUnitScale()
775+
* \see strokeWidth()
776+
* \see strokeWidthUnit()
777+
*
778+
* \since QGIS 2.16
779+
*/
722780
const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
723781

724782
/**
725-
* Set stroke width map unit scale.
726-
* \since QGIS 2.16 */
783+
* Sets the stroke width map unit \a scale.
784+
*
785+
* \see strokeWidthMapUnitScale()
786+
* \see setStrokeWidth()
787+
* \see setStrokeWidthUnit()
788+
*
789+
* \since QGIS 2.16
790+
*/
727791
void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
728792

729793
/**
730-
* Gets stroke join style.
731-
* \since QGIS 2.16 */
794+
* Returns the stroke join style.
795+
*
796+
* \see setPenJoinStyle()
797+
*
798+
* \since QGIS 2.16
799+
*/
732800
Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
733801

734802
/**
735-
* Set stroke join style.
736-
* \since QGIS 2.16 */
803+
* Sets the stroke join \a style.
804+
*
805+
* \see penJoinStyle()
806+
*
807+
* \since QGIS 2.16
808+
*/
737809
void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
738810

739811
QRectF bounds( QPointF point, QgsSymbolRenderContext &context ) override;

0 commit comments

Comments
 (0)