

Public Member Functions | |
| GuiPart (CNItem *parent, const QRect &r, QCanvas *canvas) | |
| virtual | ~GuiPart () |
| virtual QRect | recommendedRect () const |
| void | setOriginalRect (const QRect &r) |
| virtual void | updateConnectorPoints (bool add) |
| void | setAngleDegrees (int angleDegrees) |
| void | setGuiPartSize (int width, int height) |
| QRect | drawRect () |
| int | angleDegrees () const |
| CNItem * | parent () const |
Protected Member Functions | |
| virtual void | posChanged () |
| void | initPainter (QPainter &p) |
| void | deinitPainter (QPainter &p) |
Protected Attributes | |
| int | m_angleDegrees |
| CNItem * | p_parent |
| bool | b_pointsAdded |
| QRect | m_originalRect |
Definition at line 26 of file canvasitemparts.h.
| GuiPart::GuiPart | ( | CNItem * | parent, | |
| const QRect & | r, | |||
| QCanvas * | canvas | |||
| ) |
Create a GuiPart. Control the position using setGuiPartSize, instead of calling QCanvasRectangle::setSize. This allows GuiPart to know when its size has been changed
Definition at line 19 of file canvasitemparts.cpp.
References parent().
| void GuiPart::setAngleDegrees | ( | int | angleDegrees | ) |
Set the angle that the GuiPart draws itself (if the GuiPart chooses to use it by calling initPainter and deinitPainter from drawShape). Note that this doesn't affect the rectangle position that the GuiPart is in. The rotation is taken to be about the center of the rectangle.
Definition at line 36 of file canvasitemparts.cpp.
References m_angleDegrees, and posChanged().
| void GuiPart::setGuiPartSize | ( | int | width, | |
| int | height | |||
| ) |
Control the size. Call this instead of QCanvasRectangle::setSize. In turn, this function will notify subclasses via posChanged();
Definition at line 44 of file canvasitemparts.cpp.
References posChanged(), and updateConnectorPoints().
Referenced by FlowContainer::updateAttachedPositioning().
| QRect GuiPart::drawRect | ( | ) |
Returns the rectangle to draw in to compensate for rotation of the QPainter
Definition at line 103 of file canvasitemparts.cpp.
References m_angleDegrees.
Referenced by Text::drawShape().
| virtual void GuiPart::posChanged | ( | ) | [inline, protected, virtual] |
Called when the size or angle changes
Reimplemented in Widget, Button, and Slider.
Definition at line 69 of file canvasitemparts.h.
Referenced by setAngleDegrees(), and setGuiPartSize().
| void GuiPart::initPainter | ( | QPainter & | p | ) | [protected] |
Rotate / etc the painter. You must call deinitPainter after calling this function.
Definition at line 51 of file canvasitemparts.cpp.
References m_angleDegrees.
Referenced by Text::drawShape().
| void GuiPart::deinitPainter | ( | QPainter & | p | ) | [protected] |
Complement function to initPainter - restores painter to normal transform
Definition at line 60 of file canvasitemparts.cpp.
References m_angleDegrees.
Referenced by Text::drawShape().
1.5.1