mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			107 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			107 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
 | 
						|
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 );
 | 
						|
 | 
						|
    ~QgsLabelAttributes();
 | 
						|
 | 
						|
    /* Units type */
 | 
						|
    enum Units { 
 | 
						|
	MapUnits = 0,
 | 
						|
	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   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;
 | 
						|
 | 
						|
    /* 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;
 | 
						|
    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;
 | 
						|
    
 | 
						|
};
 | 
						|
 |