INFO702 - TPs
|
Polymorphic class that represents the top class of any complex shape. More...
#include <objects.hpp>
Public Types | |
enum | State { Ok , Collision } |
Public Member Functions | |
MasterShape (QColor cok, QColor cko) | |
void | setGraphicalShape (GraphicalShape *f) |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
virtual QPointF | randomPoint () const override |
virtual bool | isInside (const QPointF &p) const override |
virtual QRectF | boundingRect () const override |
virtual void | advance (int step) override |
State | currentState () const |
QColor | currentColor () const |
Protected Attributes | |
GraphicalShape * | _f |
State | _state |
QColor | _cok |
QColor | _cko |
Polymorphic class that represents the top class of any complex shape.
It takes care of memorizing collisions and storing the current main coordinates of a shape.
Definition at line 37 of file objects.hpp.
enum MasterShape::State |
Definition at line 39 of file objects.hpp.
MasterShape::MasterShape | ( | QColor | cok, |
QColor | cko | ||
) |
Definition at line 68 of file objects.cpp.
|
overridevirtual |
Definition at line 100 of file objects.cpp.
|
overridevirtual |
Definition at line 152 of file objects.cpp.
QColor MasterShape::currentColor | ( | ) | const |
Definition at line 81 of file objects.cpp.
MasterShape::State MasterShape::currentState | ( | ) | const |
Definition at line 88 of file objects.cpp.
|
overridevirtual |
Implements GraphicalShape.
Definition at line 145 of file objects.cpp.
|
overridevirtual |
Definition at line 94 of file objects.cpp.
|
overridevirtual |
Implements GraphicalShape.
Definition at line 138 of file objects.cpp.
void MasterShape::setGraphicalShape | ( | GraphicalShape * | f | ) |
Definition at line 74 of file objects.cpp.
|
protected |
Definition at line 57 of file objects.hpp.
|
protected |
Definition at line 57 of file objects.hpp.
|
protected |
Definition at line 55 of file objects.hpp.
|
protected |
Definition at line 56 of file objects.hpp.