30 #include "../../core/pattern/mvc/ItemController.h"
31 #include "../../core/AbstractScene.h"
32 #include "../../core/pattern/mvc/Observable.h"
33 #include "../../../color/RGBAColor.h"
34 #include "../../../qt/widgets/Utils.h"
35 #include "../../../geometry/Envelope.h"
36 #include "../../../common/STLUtils.h"
37 #include "../../item/EllipseModel.h"
42 m_nameClass = std::string(this->metaObject()->className());
59 drawBackground(painter);
66 if (option->state & QStyle::State_Selected)
68 drawSelection(painter);
82 QPainterPath circle_path;
83 circle_path.addEllipse(boundingRect());
92 cbrush.setRed(clrBack.
getRed());
94 cbrush.setBlue(clrBack.
getBlue());
97 painter->setBrush(cbrush);
98 painter->drawPath(circle_path);
Abstract class to represent an observable. "Model" part of MVC component.
int getRed() const
It returns the red component color value (a value from 0 to 255).
int getBlue() const
It returns the blue component color value (a value from 0 to 255).
int getGreen() const
It returns the green component color value (a value from 0 to 255).
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Reimplemented from QGraphicsItem.
Abstract class to represent a controller. "Controller" part of MVC component. All classes representin...
Class that represents a graphic Ellipse. Its coordinate system is the same of scene (millimeters)...
virtual ~EllipseItem()
Destructor.
Abstract class that represents a graphic item. This object is of type QGraphicsObject.
int getAlpha() const
It returns the alpha component color value (a value from 0 to 255).
std::string m_nameClass
Class name.
virtual te::color::RGBAColor getBackgroundColor()
Returns the background color of the MVC component.
Class that represents a "Model" part of Ellipse MVC component. Its coordinate system is the same of s...
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
virtual void drawEllipse(QPainter *painter)
Drawing method of a ellipse.
EllipseItem(ItemController *controller, Observable *o)
Constructor.