eric4.E4Canvas.E4CanvasText
Module implementing a canvas item subclass for text.
Classes
E4CanvasText |
Class implementing a text canvas item subclass. |
Functions
E4CanvasText
Class implementing a text canvas item subclass.
Derived from
E4CanvasItem
Methods
E4CanvasText |
Constructor |
drawShape |
Public method to draw the shape. |
font |
Public method to get the font of the text item. |
setFont |
Public method to set the font of the text item. |
setText |
Public method to set the text of the text item. |
text |
Public method to get the text of the text item. |
E4CanvasText (Constructor)
E4CanvasText(canvas, origin = QPointF(0.0, 0.0), text = QString(), font = QFont())
Constructor
- canvas
-
reference to the canvas object (E4Canvas)
- origin
-
origin of the rectangle (QPointF)
- text
-
text for the text item (QString)
- font
-
font for the text item (QFont)
E4CanvasText.drawShape
drawShape(painter)
Public method to draw the shape.
- painter
-
reference to the painter object (QPainter)
E4CanvasText.font
font()
Public method to get the font of the text item.
- Returns:
-
reference to the font object (QFont)
E4CanvasText.setFont
setFont(font)
Public method to set the font of the text item.
- font
-
font to be set (QFont)
E4CanvasText.setText
setText(text)
Public method to set the text of the text item.
- text
-
text to be set (QString)
E4CanvasText.text
text()
Public method to get the text of the text item.
- Returns:
-
reference to the text object (QString)