Envision
A visual programming IDE for object-oriented languages
|
Public Types | |
enum | CursorType { VerticalCursor , HorizontalCursor , BoxCursor } |
Public Member Functions | |
Cursor (const Cursor &other) | |
Cursor (Item *owner, CursorType type, Item *visualization=nullptr) | |
virtual | ~Cursor () |
virtual Cursor * | clone () const |
virtual bool | isAtBoundary () const |
virtual bool | isLocationEquivalent (bool otherNotLocationEquivalent, CursorType otherType, bool otherIsAtBoundary, Item *otherOwner) |
virtual bool | isLocationEquivalent (Cursor *c) |
Returns true if this cursor is equivalent with respect to its location to the cursor c. More... | |
virtual bool | isSame (Cursor *other) |
Returns true if this cursor is the same as the cursor other. More... | |
bool | notLocationEquivalent () const |
Cursor & | operator= (const Cursor &other)=delete |
virtual Item * | owner () const |
const QPoint & | position () |
Returns the position of this cursor in corrdinates local to owner() More... | |
const QRect & | region () |
Returns the region of this cursor in corrdinates local to owner() More... | |
QRect | sceneRegion () |
Returns the region of this cursor in scene coordinates. More... | |
void | setNotLocationEquivalent (bool notEquivalent) |
void | setPosition (const QPoint &pos) |
void | setRegion (const QRect ®ion) |
CursorType | type () const |
virtual void | update () |
Called on every scene update to update the cursor. More... | |
Item * | visualization () |
Protected Member Functions | |
void | setVisualization (Item *visualization) |
Private Member Functions | |
bool | allowEquivalentCursorsAcrossBoundaries (Item *parent, Item *child) |
Private Attributes | |
bool | notLocationEquivalent_ |
Item * | owner_ {} |
QPoint | position_ |
QRect | region_ |
CursorType | type_ |
Item * | visualization_ {} |
Visualization::Cursor::Cursor | ( | Item * | owner, |
CursorType | type, | ||
Item * | visualization = nullptr |
||
) |
Visualization::Cursor::Cursor | ( | const Cursor & | other | ) |
|
virtual |
|
private |
|
virtual |
Reimplemented in Visualization::TextCursor, and Visualization::LayoutCursor.
|
virtual |
Reimplemented in Visualization::TextCursor, and Visualization::LayoutCursor.
|
virtual |
|
virtual |
Returns true if this cursor is equivalent with respect to its location to the cursor c.
Here are the conditions for two cursors to be location equivalent:
|
virtual |
Returns true if this cursor is the same as the cursor other.
Two cursors are the same if they have the same owner and if they represent the same location within that owner.
Reimplemented in Visualization::TextCursor, and Visualization::LayoutCursor.
|
inline |
|
virtual |
Reimplemented in Visualization::TextCursor.
|
inline |
Returns the position of this cursor in corrdinates local to owner()
|
inline |
Returns the region of this cursor in corrdinates local to owner()
QRect Visualization::Cursor::sceneRegion | ( | ) |
Returns the region of this cursor in scene coordinates.
|
inline |
|
inline |
|
inline |
|
protected |
|
inline |
|
virtual |
Called on every scene update to update the cursor.
The default implementation checks if this is a BoxCursor and if so it assumes it is a whole item cursor to update its position and size. Otherwise it does nothing.
Reimplement this in derived classes to update the cursor's position and size appropriately.
Reimplemented in Visualization::TextCursor, and Visualization::LayoutCursor.
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |