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 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitemscalebar.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayoutItemScaleBar: QgsLayoutItem
{
%Docstring(signature="appended")
A layout item subclass for scale bars.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayoutitemscalebar.h"
%End
public:
QgsLayoutItemScaleBar( QgsLayout *layout );
%Docstring
Constructor for QgsLayoutItemScaleBar, with the specified parent ``layout``.
%End
virtual int type() const;
virtual QIcon icon() const;
static QgsLayoutItemScaleBar *create( QgsLayout *layout ) /Factory/;
%Docstring
Returns a new scale bar item for the specified ``layout``.
The caller takes responsibility for deleting the returned object.
%End
virtual QgsLayoutSize minimumSize() const;
int numberOfSegments() const;
%Docstring
Returns the number of segments included in the scalebar.
.. seealso:: :py:func:`setNumberOfSegments`
.. seealso:: :py:func:`numberOfSegmentsLeft`
%End
void setNumberOfSegments( int segments );
%Docstring
Sets the number of ``segments`` included in the scalebar.
.. seealso:: :py:func:`numberOfSegments`
.. seealso:: :py:func:`setNumberOfSegmentsLeft`
%End
int numberOfSegmentsLeft() const;
%Docstring
Returns the number of segments included in the left part of the scalebar.
.. seealso:: :py:func:`setNumberOfSegmentsLeft`
.. seealso:: :py:func:`numberOfSegments`
%End
void setNumberOfSegmentsLeft( int segments );
%Docstring
Sets the number of ``segments`` included in the left part of the scalebar.
.. seealso:: :py:func:`numberOfSegmentsLeft`
.. seealso:: :py:func:`setNumberOfSegments`
%End
int numberOfSubdivisions() const;
%Docstring
Returns the number of subdivisions for segments included in the right part of the scalebar (only used for some scalebar types).
.. note::
The number of subdivisions represents the number of subdivision segments, not the number of subdivision lines. E.g.
if the number is 1 then NO subdivision lines will be shown.
.. seealso:: :py:func:`setNumberOfSubdivisions`
.. versionadded:: 3.14
%End
void setNumberOfSubdivisions( int subdivisions );
%Docstring
Sets the number of ``subdivisions`` for segments included in the right part of the scalebar (only used for some scalebar types).
.. note::
The number of subdivisions represents the number of subdivision segments, not the number of subdivision lines. E.g.
if the number is 1 then NO subdivision lines will be shown.
.. seealso:: :py:func:`numberOfSubdivisions`
.. versionadded:: 3.14
%End
double subdivisionsHeight() const;
%Docstring
Returns the scalebar subdivisions height (in millimeters) for segments included in the right part of the scalebar (only used for some scalebar types).
.. seealso:: :py:func:`setSubdivisionsHeight`
.. versionadded:: 3.14
%End
void setSubdivisionsHeight( double height );
%Docstring
Sets the scalebar subdivisions ``height`` (in millimeters) for segments included in the right part of the scalebar (only used for some scalebar types).
.. seealso:: :py:func:`subdivisionsHeight`
.. versionadded:: 3.14
%End
double unitsPerSegment() const;
%Docstring
Returns the number of scalebar units per segment.
.. seealso:: :py:func:`setUnitsPerSegment`
%End
void setUnitsPerSegment( double units );
%Docstring
Sets the number of scalebar ``units`` per segment.
.. seealso:: :py:func:`unitsPerSegment`
%End
QgsScaleBarSettings::SegmentSizeMode segmentSizeMode() const;
%Docstring
Returns the size mode for the scale bar segments.
.. seealso:: :py:func:`setSegmentSizeMode`
.. seealso:: :py:func:`minimumBarWidth`
.. seealso:: :py:func:`maximumBarWidth`
%End
void setSegmentSizeMode( QgsScaleBarSettings::SegmentSizeMode mode );
%Docstring
Sets the size ``mode`` for scale bar segments.
.. seealso:: :py:func:`segmentSizeMode`
.. seealso:: :py:func:`setMinimumBarWidth`
.. seealso:: :py:func:`setMaximumBarWidth`
%End
double minimumBarWidth() const;
%Docstring
Returns the minimum width (in millimeters) for scale bar segments. This
property is only effective if the :py:func:`~QgsLayoutItemScaleBar.segmentSizeMode` is set
to SegmentSizeFitWidth.
.. seealso:: :py:func:`segmentSizeMode`
.. seealso:: :py:func:`setMinimumBarWidth`
.. seealso:: :py:func:`maximumBarWidth`
%End
void setMinimumBarWidth( double minWidth );
%Docstring
Sets the minimum ``width`` (in millimeters) for scale bar segments. This
property is only effective if the :py:func:`~QgsLayoutItemScaleBar.segmentSizeMode` is set
to SegmentSizeFitWidth.
.. seealso:: :py:func:`minimumBarWidth`
.. seealso:: :py:func:`setMaximumBarWidth`
.. seealso:: :py:func:`setSegmentSizeMode`
%End
double maximumBarWidth() const;
%Docstring
Returns the maximum width (in millimeters) for scale bar segments. This
property is only effective if the :py:func:`~QgsLayoutItemScaleBar.segmentSizeMode` is set
to SegmentSizeFitWidth.
.. seealso:: :py:func:`segmentSizeMode`
.. seealso:: :py:func:`setMaximumBarWidth`
.. seealso:: :py:func:`minimumBarWidth`
%End
void setMaximumBarWidth( double maxWidth );
%Docstring
Sets the maximum ``width`` (in millimeters) for scale bar segments. This
property is only effective if the :py:func:`~QgsLayoutItemScaleBar.segmentSizeMode` is set
to SegmentSizeFitWidth.
.. seealso:: :py:func:`minimumBarWidth`
.. seealso:: :py:func:`setMinimumBarWidth`
.. seealso:: :py:func:`setSegmentSizeMode`
%End
double mapUnitsPerScaleBarUnit() const;
%Docstring
Returns the number of map units per scale bar unit used by the scalebar.
.. seealso:: :py:func:`setMapUnitsPerScaleBarUnit`
%End
void setMapUnitsPerScaleBarUnit( double units );
%Docstring
Sets the number of map ``units`` per scale bar unit used by the scalebar.
.. seealso:: :py:func:`mapUnitsPerScaleBarUnit`
%End
QString unitLabel() const;
%Docstring
Returns the label for units.
.. seealso:: :py:func:`setUnitLabel`
%End
void setUnitLabel( const QString &label );
%Docstring
Sets the ``label`` for units.
.. seealso:: :py:func:`unitLabel`
%End
QgsTextFormat textFormat() const;
%Docstring
Returns the text format used for drawing text in the scalebar.
.. seealso:: :py:func:`setTextFormat`
.. versionadded:: 3.2
%End
void setTextFormat( const QgsTextFormat &format );
%Docstring
Sets the text ``format`` used for drawing text in the scalebar.
.. seealso:: :py:func:`textFormat`
.. versionadded:: 3.2
%End
QgsLineSymbol *lineSymbol() const;
%Docstring
Returns the line symbol used to render the scalebar (only used for some scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setLineSymbol`
.. seealso:: :py:func:`divisionLineSymbol`
.. seealso:: :py:func:`subdivisionLineSymbol`
.. versionadded:: 3.14
%End
void setLineSymbol( QgsLineSymbol *symbol /Transfer/ );
%Docstring
Sets the line ``symbol`` used to render the scalebar (only used for some scalebar types). Ownership of ``symbol`` is
transferred to the scalebar.
.. seealso:: :py:func:`lineSymbol`
.. seealso:: :py:func:`setDivisionLineSymbol`
.. seealso:: :py:func:`setSubdivisionLineSymbol`
.. versionadded:: 3.14
%End
QgsLineSymbol *divisionLineSymbol() const;
%Docstring
Returns the line symbol used to render the scalebar divisions (only used for some scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setDivisionLineSymbol`
.. seealso:: :py:func:`lineSymbol`
.. seealso:: :py:func:`subdivisionLineSymbol`
.. versionadded:: 3.14
%End
void setDivisionLineSymbol( QgsLineSymbol *symbol /Transfer/ );
%Docstring
Sets the line ``symbol`` used to render the scalebar divisions (only used for some scalebar types). Ownership of ``symbol`` is
transferred to the scalebar.
.. seealso:: :py:func:`divisionLineSymbol`
.. seealso:: :py:func:`setLineSymbol`
.. seealso:: :py:func:`setSubdivisionLineSymbol`
.. versionadded:: 3.14
%End
QgsLineSymbol *subdivisionLineSymbol() const;
%Docstring
Returns the line symbol used to render the scalebar subdivisions (only used for some scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setSubdivisionLineSymbol`
.. seealso:: :py:func:`lineSymbol`
.. seealso:: :py:func:`divisionLineSymbol`
.. versionadded:: 3.14
%End
void setSubdivisionLineSymbol( QgsLineSymbol *symbol /Transfer/ );
%Docstring
Sets the line ``symbol`` used to render the scalebar subdivisions (only used for some scalebar types). Ownership of ``symbol`` is
transferred to the scalebar.
.. seealso:: :py:func:`subdivisionLineSymbol`
.. seealso:: :py:func:`setLineSymbol`
.. seealso:: :py:func:`setDivisionLineSymbol`
.. versionadded:: 3.14
%End
QgsFillSymbol *fillSymbol() const;
%Docstring
Returns the primary fill symbol used to render the scalebar (only used for some scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setFillSymbol`
.. seealso:: :py:func:`alternateFillSymbol`
.. versionadded:: 3.14
%End
void setFillSymbol( QgsFillSymbol *symbol /Transfer/ );
%Docstring
Sets the primary fill ``symbol`` used to render the scalebar (only used for some scalebar types). Ownership of ``symbol`` is
transferred to the scalebar.
.. seealso:: :py:func:`fillSymbol`
.. seealso:: :py:func:`setAlternateFillSymbol`
.. versionadded:: 3.14
%End
QgsFillSymbol *alternateFillSymbol() const;
%Docstring
Returns the secondary fill symbol used to render the scalebar (only used for some scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setAlternateFillSymbol`
.. seealso:: :py:func:`fillSymbol`
.. versionadded:: 3.14
%End
void setAlternateFillSymbol( QgsFillSymbol *symbol /Transfer/ );
%Docstring
Sets the secondary fill ``symbol`` used to render the scalebar (only used for some scalebar types). Ownership of ``symbol`` is
transferred to the scalebar.
.. seealso:: :py:func:`alternateFillSymbol`
.. seealso:: :py:func:`setFillSymbol`
.. versionadded:: 3.14
%End
QFont font() const /Deprecated/;
%Docstring
Returns the font used for drawing text in the scalebar.
.. seealso:: :py:func:`setFont`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.textFormat` instead
%End
void setFont( const QFont &font ) /Deprecated/;
%Docstring
Sets the ``font`` used for drawing text in the scalebar.
.. seealso:: :py:func:`font`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.setTextFormat` instead
%End
QColor fontColor() const /Deprecated/;
%Docstring
Returns the color used for drawing text in the scalebar.
.. seealso:: :py:func:`setFontColor`
.. seealso:: :py:func:`font`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.textFormat` instead
%End
void setFontColor( const QColor &color ) /Deprecated/;
%Docstring
Sets the ``color`` used for drawing text in the scalebar.
.. seealso:: :py:func:`fontColor`
.. seealso:: :py:func:`setFont`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.setTextFormat` instead
%End
QColor fillColor() const /Deprecated/;
%Docstring
Returns the color used for fills in the scalebar.
.. seealso:: :py:func:`setFillColor`
.. seealso:: :py:func:`fillColor2`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.fillSymbol` instead
%End
void setFillColor( const QColor &color ) /Deprecated/;
%Docstring
Sets the ``color`` used for fills in the scalebar.
.. seealso:: :py:func:`fillColor`
.. seealso:: :py:func:`setFillColor2`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.setFillSymbol` instead
%End
QColor fillColor2() const /Deprecated/;
%Docstring
Returns the secondary color used for fills in the scalebar.
.. seealso:: :py:func:`setFillColor2`
.. seealso:: :py:func:`fillColor`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.alternateFillSymbol` instead
%End
void setFillColor2( const QColor &color ) /Deprecated/;
%Docstring
Sets the secondary ``color`` used for fills in the scalebar.
.. seealso:: :py:func:`fillColor2`
.. seealso:: :py:func:`setFillColor2`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.setAlternateFillSymbol` instead
%End
QColor lineColor() const /Deprecated/;
%Docstring
Returns the color used for lines in the scalebar.
.. seealso:: :py:func:`setLineColor`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.lineSymbol` instead
%End
void setLineColor( const QColor &color ) /Deprecated/;
%Docstring
Sets the ``color`` used for lines in the scalebar.
.. seealso:: :py:func:`lineColor`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.setLineSymbol` instead
%End
double lineWidth() const /Deprecated/;
%Docstring
Returns the line width in millimeters for lines in the scalebar.
.. seealso:: :py:func:`setLineWidth`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.lineSymbol` instead
%End
void setLineWidth( double width ) /Deprecated/;
%Docstring
Sets the line ``width`` in millimeters for lines in the scalebar.
.. seealso:: :py:func:`lineWidth`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.setLineSymbol` instead
%End
QPen pen() const /Deprecated/;
%Docstring
Returns the pen used for drawing outlines in the scalebar.
.. seealso:: :py:func:`brush`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.lineSymbol` instead
%End
QBrush brush() const /Deprecated/;
%Docstring
Returns the primary brush for the scalebar.
:return: QBrush used for filling the scalebar
.. seealso:: :py:func:`brush2`
.. seealso:: :py:func:`pen`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.fillSymbol` instead
%End
QBrush brush2() const /Deprecated/;
%Docstring
Returns the secondary brush for the scalebar. This is used for alternating color style scalebars, such
as single and double box styles.
:return: QBrush used for secondary color areas
.. seealso:: :py:func:`brush`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.alternateFillSymbol` instead
%End
double height() const;
%Docstring
Returns the scalebar height (in millimeters).
.. seealso:: :py:func:`setHeight`
%End
void setHeight( double height );
%Docstring
Sets the scalebar ``height`` (in millimeters).
.. seealso:: :py:func:`height`
%End
void setLinkedMap( QgsLayoutItemMap *map );
%Docstring
Sets the ``map`` item linked to the scalebar.
.. seealso:: :py:func:`linkedMap`
%End
QgsLayoutItemMap *linkedMap() const;
%Docstring
Returns the map item linked to the scalebar.
.. seealso:: :py:func:`setLinkedMap`
%End
double labelBarSpace() const;
%Docstring
Returns the spacing (in millimeters) between labels and the scalebar.
.. seealso:: :py:func:`setLabelBarSpace`
%End
void setLabelBarSpace( double space );
%Docstring
Sets the spacing (in millimeters) between labels and the scalebar.
.. seealso:: :py:func:`labelBarSpace`
%End
double boxContentSpace() const;
%Docstring
Returns the spacing (margin) between the scalebar box and content in millimeters.
.. seealso:: :py:func:`setBoxContentSpace`
%End
void setBoxContentSpace( double space );
%Docstring
Sets the ``space`` (margin) between the scalebar box and content in millimeters.
.. seealso:: :py:func:`boxContentSpace`
%End
QgsScaleBarSettings::LabelVerticalPlacement labelVerticalPlacement() const;
%Docstring
Returns the vertical placement of text labels.
.. seealso:: :py:func:`setLabelVerticalPlacement`
.. versionadded:: 3.10
%End
void setLabelVerticalPlacement( QgsScaleBarSettings::LabelVerticalPlacement placement );
%Docstring
Sets the vertical ``placement`` of text labels.
.. seealso:: :py:func:`labelVerticalPlacement`
.. versionadded:: 3.10
%End
QgsScaleBarSettings::LabelHorizontalPlacement labelHorizontalPlacement() const;
%Docstring
Returns the horizontal placement of text labels.
.. seealso:: :py:func:`setLabelHorizontalPlacement`
.. versionadded:: 3.10
%End
void setLabelHorizontalPlacement( QgsScaleBarSettings::LabelHorizontalPlacement placement );
%Docstring
Sets the horizontal ``placement`` of text labels.
.. seealso:: :py:func:`labelHorizontalPlacement`
.. versionadded:: 3.10
%End
QgsScaleBarSettings::Alignment alignment() const;
%Docstring
Returns the scalebar alignment.
.. seealso:: :py:func:`setAlignment`
%End
void setAlignment( QgsScaleBarSettings::Alignment alignment );
%Docstring
Sets the scalebar ``alignment``.
.. seealso:: :py:func:`alignment`
%End
Qgis::DistanceUnit units() const;
%Docstring
Returns the distance units used by the scalebar.
.. seealso:: :py:func:`setUnits`
%End
void setUnits( Qgis::DistanceUnit units );
%Docstring
Sets the distance ``units`` used by the scalebar.
.. seealso:: :py:func:`units`
%End
Qt::PenJoinStyle lineJoinStyle() const /Deprecated/;
%Docstring
Returns the join style used for drawing lines in the scalebar.
.. seealso:: :py:func:`setLineJoinStyle`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.lineSymbol` instead
%End
void setLineJoinStyle( Qt::PenJoinStyle style ) /Deprecated/;
%Docstring
Sets the join ``style`` used when drawing the lines in the scalebar
.. seealso:: :py:func:`lineJoinStyle`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.setLineSymbol` instead
%End
Qt::PenCapStyle lineCapStyle() const /Deprecated/;
%Docstring
Returns the cap style used for drawing lines in the scalebar.
.. seealso:: :py:func:`setLineCapStyle`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.lineSymbol` instead
%End
void setLineCapStyle( Qt::PenCapStyle style ) /Deprecated/;
%Docstring
Sets the cap ``style`` used when drawing the lines in the scalebar.
.. seealso:: :py:func:`lineCapStyle`
.. deprecated::
use :py:func:`~QgsLayoutItemScaleBar.setLineSymbol` instead
%End
void applyDefaultSettings();
%Docstring
Applies the default scalebar settings to the scale bar.
.. seealso:: :py:func:`applyDefaultSize`
%End
bool applyDefaultRendererSettings( QgsScaleBarRenderer *renderer );
%Docstring
Applies any default settings relating to the specified ``renderer`` to the item.
Returns ``True`` if settings were applied.
.. versionadded:: 3.14
%End
Qgis::DistanceUnit guessUnits() const;
%Docstring
Attempts to guess the most reasonable unit choice for the scalebar, given
the current linked map's scale.
This method also considers the linked map's CRS, in order to determine if
metric or imperial units are more appropriate.
%End
void applyDefaultSize( Qgis::DistanceUnit units = Qgis::DistanceUnit::Meters );
%Docstring
Applies the default size to the scale bar (scale bar 1/5 of map item width)
.. seealso:: :py:func:`applyDefaultSettings`
%End
void resizeToMinimumWidth();
%Docstring
Resizes the scale bar to its minimum width, without changing the height.
%End
void setStyle( const QString &name );
%Docstring
Sets the scale bar style by ``name``.
The ``name`` parameter gives the (untranslated) style name.
Possibilities are: 'Single Box', 'Double Box', 'Line Ticks Middle',
'Line Ticks Down', 'Line Ticks Up', 'Stepped Line', 'Hollow', 'Numeric'.
.. seealso:: :py:func:`style`
%End
QString style() const;
%Docstring
Returns the scale bar style name.
.. seealso:: :py:func:`setStyle`
%End
const QgsNumericFormat *numericFormat() const;
%Docstring
Returns the numeric format used for numbers in the scalebar.
.. seealso:: :py:func:`setNumericFormat`
.. versionadded:: 3.12
%End
void setNumericFormat( QgsNumericFormat *format /Transfer/ );
%Docstring
Sets the numeric ``format`` used for numbers in the scalebar.
Ownership of ``format`` is transferred to the scalebar.
.. seealso:: :py:func:`numericFormat`
.. versionadded:: 3.12
%End
void update();
%Docstring
Adjusts the scale bar box size and updates the item.
%End
virtual void refreshDataDefinedProperty( QgsLayoutObject::DataDefinedProperty property = QgsLayoutObject::AllProperties );
virtual void finalizeRestoreFromXml();
virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
virtual ExportLayerBehavior exportLayerBehavior() const;
protected:
virtual void draw( QgsLayoutItemRenderContext &context );
virtual bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const;
virtual bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitemscalebar.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
|