Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Attributes
Visualization::LayoutCursor Class Reference
Inheritance diagram for Visualization::LayoutCursor:
Visualization::Cursor

Public Member Functions

 LayoutCursor (Item *owner, CursorType type)
 
virtual LayoutCursorclone () const override
 
int index ()
 
virtual bool isAtBoundary () const override
 
virtual bool isSame (Cursor *c) override
 Returns true if this cursor is the same as the cursor other. More...
 
FormElementownerElement ()
 
void set2DIndex (int x, int y)
 
void setIndex (int index)
 
void setIsAtBoundary (bool isAtBoundary)
 
void setOwnerElement (FormElement *ownerElement)
 
void setVisualizationPosition (const QPoint &pos)
 
void setVisualizationSize (const QSize &size)
 
virtual void update () override
 Called on every scene update to update the cursor. More...
 
int x ()
 
int y ()
 
- Public Member Functions inherited from Visualization::Cursor
 Cursor (const Cursor &other)
 
 Cursor (Item *owner, CursorType type, Item *visualization=nullptr)
 
virtual ~Cursor ()
 
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...
 
bool notLocationEquivalent () const
 
Cursoroperator= (const Cursor &other)=delete
 
virtual Itemowner () 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 &region)
 
CursorType type () const
 
Itemvisualization ()
 

Private Attributes

int index_
 
bool isAtBoundary_
 
FormElementownerElement_
 
int x_
 
int y_
 

Additional Inherited Members

- Public Types inherited from Visualization::Cursor
enum  CursorType { VerticalCursor , HorizontalCursor , BoxCursor }
 
- Protected Member Functions inherited from Visualization::Cursor
void setVisualization (Item *visualization)
 

Constructor & Destructor Documentation

◆ LayoutCursor()

Visualization::LayoutCursor::LayoutCursor ( Item owner,
CursorType  type 
)

Member Function Documentation

◆ clone()

LayoutCursor * Visualization::LayoutCursor::clone ( ) const
overridevirtual

Reimplemented from Visualization::Cursor.

◆ index()

int Visualization::LayoutCursor::index ( )
inline

◆ isAtBoundary()

bool Visualization::LayoutCursor::isAtBoundary ( ) const
overridevirtual

Reimplemented from Visualization::Cursor.

◆ isSame()

bool Visualization::LayoutCursor::isSame ( Cursor other)
overridevirtual

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 from Visualization::Cursor.

◆ ownerElement()

FormElement * Visualization::LayoutCursor::ownerElement ( )
inline

◆ set2DIndex()

void Visualization::LayoutCursor::set2DIndex ( int  x,
int  y 
)
inline

◆ setIndex()

void Visualization::LayoutCursor::setIndex ( int  index)
inline

◆ setIsAtBoundary()

void Visualization::LayoutCursor::setIsAtBoundary ( bool  isAtBoundary)
inline

◆ setOwnerElement()

void Visualization::LayoutCursor::setOwnerElement ( FormElement ownerElement)
inline

◆ setVisualizationPosition()

void Visualization::LayoutCursor::setVisualizationPosition ( const QPoint &  pos)

◆ setVisualizationSize()

void Visualization::LayoutCursor::setVisualizationSize ( const QSize &  size)

◆ update()

void Visualization::LayoutCursor::update ( )
overridevirtual

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 from Visualization::Cursor.

◆ x()

int Visualization::LayoutCursor::x ( )
inline

◆ y()

int Visualization::LayoutCursor::y ( )
inline

Member Data Documentation

◆ index_

int Visualization::LayoutCursor::index_
private

◆ isAtBoundary_

bool Visualization::LayoutCursor::isAtBoundary_
private

◆ ownerElement_

FormElement* Visualization::LayoutCursor::ownerElement_
private

◆ x_

int Visualization::LayoutCursor::x_
private

◆ y_

int Visualization::LayoutCursor::y_
private