#include <qgscomposerlabel.h>
Inheritance diagram for QgsComposerLabel:


Definition at line 25 of file qgscomposerlabel.h.
Public Member Functions | |
| QgsComposerLabel (QgsComposition *composition) | |
| ~QgsComposerLabel () | |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget) |
| Reimplementation of QCanvasItem::paint. | |
| void | adjustSizeToText () |
| resizes the widget such that the text fits to the item. | |
| QString | text () |
| void | setText (const QString &text) |
| QFont | font () const |
| void | setFont (const QFont &f) |
| double | margin () |
| void | setMargin (double m) |
| bool | writeXML (QDomElement &elem, QDomDocument &doc) const |
| stores state in Dom node | |
| bool | readXML (const QDomElement &itemElem, const QDomDocument &doc) |
| sets state from Dom document | |
Private Attributes | |
| QString | mText |
| QFont | mFont |
| double | mMargin |
| QgsComposerLabel::QgsComposerLabel | ( | QgsComposition * | composition | ) |
| QgsComposerLabel::~QgsComposerLabel | ( | ) |
Definition at line 28 of file qgscomposerlabel.cpp.
| void QgsComposerLabel::paint | ( | QPainter * | painter, | |
| const QStyleOptionGraphicsItem * | itemStyle, | |||
| QWidget * | pWidget | |||
| ) |
Reimplementation of QCanvasItem::paint.
Definition at line 32 of file qgscomposerlabel.cpp.
References QgsComposerItem::drawBackground(), QgsComposerItem::drawFrame(), QgsComposerItem::drawSelectionBoxes(), QgsComposerItem::drawText(), mFont, mMargin, and mText.
| void QgsComposerLabel::adjustSizeToText | ( | ) |
resizes the widget such that the text fits to the item.
Keeps top left point
Definition at line 69 of file qgscomposerlabel.cpp.
References QgsComposerItem::fontAscentMillimeters(), mFont, mMargin, mText, QgsComposerItem::setSceneRect(), and QgsComposerItem::textWidthMillimeters().
Referenced by QgsComposerView::mousePressEvent().
| QString QgsComposerLabel::text | ( | void | ) | [inline] |
Definition at line 37 of file qgscomposerlabel.h.
| void QgsComposerLabel::setText | ( | const QString & | text | ) |
Definition at line 59 of file qgscomposerlabel.cpp.
References mText.
Referenced by QgsComposerView::mousePressEvent().
| QFont QgsComposerLabel::font | ( | ) | const |
| void QgsComposerLabel::setFont | ( | const QFont & | f | ) |
| double QgsComposerLabel::margin | ( | ) | [inline] |
Definition at line 41 of file qgscomposerlabel.h.
| void QgsComposerLabel::setMargin | ( | double | m | ) | [inline] |
Definition at line 42 of file qgscomposerlabel.h.
| bool QgsComposerLabel::writeXML | ( | QDomElement & | elem, | |
| QDomDocument & | doc | |||
| ) | const [virtual] |
stores state in Dom node
| node | is Dom node corresponding to 'Composer' tag | |
| temp | write template file |
Implements QgsComposerItem.
Definition at line 83 of file qgscomposerlabel.cpp.
References QgsComposerItem::_writeXML(), mFont, mMargin, and mText.
| bool QgsComposerLabel::readXML | ( | const QDomElement & | itemElem, | |
| const QDomDocument & | doc | |||
| ) | [virtual] |
sets state from Dom document
| node | is Dom node corresponding to 'ComposerLabel' tag |
Implements QgsComposerItem.
Definition at line 105 of file qgscomposerlabel.cpp.
References QgsComposerItem::_readXML(), mFont, mMargin, and mText.
QString QgsComposerLabel::mText [private] |
Definition at line 57 of file qgscomposerlabel.h.
Referenced by adjustSizeToText(), paint(), readXML(), setText(), and writeXML().
QFont QgsComposerLabel::mFont [private] |
Definition at line 60 of file qgscomposerlabel.h.
Referenced by adjustSizeToText(), font(), paint(), QgsComposerLabel(), readXML(), setFont(), and writeXML().
double QgsComposerLabel::mMargin [private] |
Definition at line 63 of file qgscomposerlabel.h.
Referenced by adjustSizeToText(), paint(), readXML(), and writeXML().
1.5.1