Skip to content

Commit

Permalink
[composer] Add frameOutlineWidth property for composer items (sponsor…
Browse files Browse the repository at this point in the history
…ed by City of Uster, Switzerland)
  • Loading branch information
nyalldawson committed Apr 28, 2014
1 parent e9b253d commit de301e9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions python/core/composer/qgscomposeritem.sip
Expand Up @@ -236,6 +236,14 @@ class QgsComposerItem : QObject, QGraphicsRectItem
* @see setFrameEnabled
*/
virtual void setFrameOutlineWidth( double outlineWidth );

/** Returns the frame's outline width. Only used if hasFrame is true.
* @returns Frame outline width
* @note introduced in 2.3
* @see hasFrame
* @see setFrameOutlineWidth
*/
double frameOutlineWidth() const;

/** Returns the join style used for drawing the item's frame
* @returns Join style for outline frame
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposeritemwidget.cpp
Expand Up @@ -357,7 +357,7 @@ void QgsComposerItemWidget::setValuesForGuiNonPositionElements()

mBackgroundColorButton->setColor( mItem->brush().color() );
mFrameColorButton->setColor( mItem->pen().color() );
mOutlineWidthSpinBox->setValue( mItem->pen().widthF() );
mOutlineWidthSpinBox->setValue( mItem->frameOutlineWidth() );
mFrameJoinStyleCombo->setPenJoinStyle( mItem->frameJoinStyle() );
mItemIdLineEdit->setText( mItem->id() );
mFrameGroupBox->setChecked( mItem->hasFrame() );
Expand Down
8 changes: 8 additions & 0 deletions src/core/composer/qgscomposeritem.h
Expand Up @@ -197,6 +197,14 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
*/
virtual void setFrameOutlineWidth( double outlineWidth );

/** Returns the frame's outline width. Only used if hasFrame is true.
* @returns Frame outline width
* @note introduced in 2.3
* @see hasFrame
* @see setFrameOutlineWidth
*/
double frameOutlineWidth() const { return pen().widthF(); }

/** Returns the join style used for drawing the item's frame
* @returns Join style for outline frame
* @note introduced in 2.3
Expand Down

0 comments on commit de301e9

Please sign in to comment.