File: qgslabelattributes.sip

package info (click to toggle)
qgis 2.18.28%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,007,948 kB
  • sloc: cpp: 671,774; python: 158,539; xml: 35,690; ansic: 8,346; sh: 1,766; perl: 1,669; sql: 999; yacc: 836; lex: 461; makefile: 292
file content (118 lines) | stat: -rw-r--r-- 2,962 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

class QgsLabelAttributes
{
%TypeHeaderCode
#include <qgslabelattributes.h>
%End

public:
    /** Constructor.
     *  @param def if true, defaults are set, if false all all attributes are unset
     */
    QgsLabelAttributes( bool def = true );

    /* Units type */
    enum Units
    {
      MapUnits,
      PointUnits
    };

    static QString unitsName( int units );
    static int unitsCode( const QString &name );

    static QString alignmentName( int alignment );
    static int alignmentCode( const QString &name );

    /* Text */
    void setText( const QString & text );
    bool textIsSet() const;
    const QString text() const;

    /* Font */
    void setFamily( const QString & family );
    bool familyIsSet() const;
    const QString family() const;

    void setBold( bool enable );
    bool boldIsSet() const;
    bool bold() const;

    void setItalic( bool enable );
    bool italicIsSet() const;
    bool italic() const;

    void setUnderline( bool enable );
    bool underlineIsSet() const;
    bool underline() const;

    void setStrikeOut( bool enable );
    bool strikeOutIsSet() const;
    bool strikeOut() const;

    void   setSize( double size, int type );
    bool   sizeIsSet() const;
    int    sizeType() const;
    double size() const;

    void  setColor( const QColor &color );
    bool  colorIsSet() const;
    const QColor & color() const;

    /* Offset */
    void   setOffset( double x, double y, int type );
    bool   offsetIsSet() const;
    int    offsetType() const;
    double xOffset() const;
    double yOffset() const;

    /* Angle */
    void   setAngle( double angle );
    bool   angleIsSet() const;
    double angle() const;

    bool   angleIsAuto() const;
    void   setAutoAngle( bool state );

    /* Alignment */
    void setAlignment( int alignment );
    bool alignmentIsSet() const;
    int  alignment() const;

    /* Buffer */
    bool   bufferEnabled() const;
    void   setBufferEnabled( bool useBufferFlag );
    void   setBufferSize( double size, int type );
    bool   bufferSizeIsSet() const;
    int    bufferSizeType() const;
    double bufferSize() const;

    void  setBufferColor( const QColor &color );
    bool  bufferColorIsSet() const;
    QColor bufferColor() const;

    void  setBufferStyle( Qt::BrushStyle style );
    bool  bufferStyleIsSet() const;
    Qt::BrushStyle bufferStyle() const;

    /* Border */
    void  setBorderColor( const QColor &color );
    bool  borderColorIsSet() const;
    QColor borderColor() const;

    void  setBorderWidth( int width );
    bool  borderWidthIsSet() const;
    int   borderWidth() const;

    void  setBorderStyle( Qt::PenStyle style );
    bool  borderStyleIsSet() const;
    Qt::PenStyle   borderStyle() const;

    bool  multilineEnabled() const;
    void  setMultilineEnabled( bool useMultiline );

    /* label only selected features */
    bool  selectedOnly() const;
    void  setSelectedOnly( bool selectedonly );
};