24 mPen = QPen( mLineColor );
25 mPen.setJoinStyle( mLineJoinStyle );
26 mPen.setCapStyle( mLineCapStyle );
27 mPen.setWidthF( mLineWidth );
29 mBrush.setColor( mFillColor );
30 mBrush.setStyle( Qt::SolidPattern );
32 mBrush2.setColor( mFillColor2 );
33 mBrush2.setStyle( Qt::SolidPattern );
37 mTextFormat.
setColor( QColor( 0, 0, 0 ) );
39 mNumericFormat = qgis::make_unique< QgsBasicNumericFormat >();
43 : mNumSegments( other.mNumSegments )
44 , mNumSegmentsLeft( other.mNumSegmentsLeft )
45 , mNumUnitsPerSegment( other.mNumUnitsPerSegment )
46 , mNumMapUnitsPerScaleBarUnit( other.mNumMapUnitsPerScaleBarUnit )
47 , mSegmentSizeMode( other.mSegmentSizeMode )
48 , mMinBarWidth( other.mMinBarWidth )
49 , mMaxBarWidth( other.mMaxBarWidth )
50 , mUnitLabeling( other.mUnitLabeling )
51 , mTextFormat( other.mTextFormat )
52 , mFillColor( other.mFillColor )
53 , mFillColor2( other.mFillColor2 )
54 , mLineColor( other.mLineColor )
55 , mLineWidth( other.mLineWidth )
57 , mBrush( other.mBrush )
58 , mBrush2( other.mBrush2 )
59 , mHeight( other.mHeight )
60 , mLabelBarSpace( other.mLabelBarSpace )
61 , mLabelVerticalPlacement( other.mLabelVerticalPlacement )
62 , mLabelHorizontalPlacement( other.mLabelHorizontalPlacement )
63 , mBoxContentSpace( other.mBoxContentSpace )
64 , mAlignment( other.mAlignment )
65 , mUnits( other.mUnits )
66 , mLineJoinStyle( other.mLineJoinStyle )
67 , mLineCapStyle( other.mLineCapStyle )
68 , mNumericFormat( other.mNumericFormat->clone() )
75 mNumSegments = other.mNumSegments;
76 mNumSegmentsLeft = other.mNumSegmentsLeft;
77 mNumUnitsPerSegment = other.mNumUnitsPerSegment;
78 mNumMapUnitsPerScaleBarUnit = other.mNumMapUnitsPerScaleBarUnit;
79 mSegmentSizeMode = other.mSegmentSizeMode;
80 mMinBarWidth = other.mMinBarWidth;
81 mMaxBarWidth = other.mMaxBarWidth;
82 mUnitLabeling = other.mUnitLabeling;
83 mTextFormat = other.mTextFormat;
84 mFillColor = other.mFillColor;
85 mFillColor2 = other.mFillColor2;
86 mLineColor = other.mLineColor;
87 mLineWidth = other.mLineWidth;
89 mBrush = other.mBrush;
90 mBrush2 = other.mBrush2;
91 mHeight = other.mHeight;
92 mLabelBarSpace = other.mLabelBarSpace;
93 mLabelVerticalPlacement = other.mLabelVerticalPlacement;
94 mLabelHorizontalPlacement = other.mLabelHorizontalPlacement;
95 mBoxContentSpace = other.mBoxContentSpace;
96 mAlignment = other.mAlignment;
97 mUnits = other.mUnits;
98 mLineJoinStyle = other.mLineJoinStyle;
99 mLineCapStyle = other.mLineCapStyle;
100 mNumericFormat.reset( other.mNumericFormat->clone() );
106 return mNumericFormat.get();
111 mNumericFormat.reset( format );
void setNumericFormat(QgsNumericFormat *format)
Sets the numeric format used for numbers in the scalebar.
const QgsNumericFormat * numericFormat() const
Returns the numeric format used for numbers in the scalebar.
QgsScaleBarSettings & operator=(const QgsScaleBarSettings &other)
void setSize(double size)
Sets the size for rendered text.
void setColor(const QColor &color)
Sets the color that text will be rendered in.
void setSizeUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the size of rendered text.
QgsScaleBarSettings()
Constructor for QgsScaleBarSettings.
Points (e.g., for font sizes)
The QgsScaleBarSettings class stores the appearance and layout settings for scalebar drawing with Qgs...