Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
ControlFlowVisualization::ControlFlowItem Class Reference
Inheritance diagram for ControlFlowVisualization::ControlFlowItem:
Core::Reflect< Base >

Public Types

enum  PreferedExitDirection { EXIT_LEFT , EXIT_RIGHT }
 

Public Member Functions

 ControlFlowItem (Item *parent, const StyleType *style)
 
const QList< QPoint > & breaks ()
 
const QList< QPoint > & continues ()
 
const QPoint & entrance ()
 
const QPoint & exit ()
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 
void setPreferredBreakExit (PreferedExitDirection preference)
 
void setPreferredContinueExit (PreferedExitDirection preference)
 

Protected Member Functions

void addConnector (const QPoint &begin, const QPoint &end, bool arrowEnding)
 
void addConnector (int xBegin, int yBegin, int xEnd, int yEnd, bool arrowEnding)
 
void addConnector (QList< QPoint > &points, bool arrowEnding)
 
void addToLastConnector (const QPoint &point)
 
void addToLastConnector (int x, int y)
 
void clearConnectors ()
 

Protected Attributes

QList< QPoint > breaks_
 
QList< QPoint > continues_
 
QPoint entrance_
 
QPoint exit_
 
PreferedExitDirection preferredBreakExit_
 
PreferedExitDirection preferredContinueExit_
 

Private Member Functions

QPainterPath connector (const QList< QPoint > &points, bool arrowEnding)
 

Private Attributes

QList< bool > arrowEndings_
 
QList< QList< QPoint > > connectors_
 

Additional Inherited Members

- Protected Types inherited from Core::Reflect< Base >
using Super = Reflect< Base >
 

Member Enumeration Documentation

◆ PreferedExitDirection

Enumerator
EXIT_LEFT 
EXIT_RIGHT 

Constructor & Destructor Documentation

◆ ControlFlowItem()

ControlFlowVisualization::ControlFlowItem::ControlFlowItem ( Item *  parent,
const StyleType *  style 
)

Member Function Documentation

◆ addConnector() [1/3]

void ControlFlowVisualization::ControlFlowItem::addConnector ( const QPoint &  begin,
const QPoint &  end,
bool  arrowEnding 
)
protected

◆ addConnector() [2/3]

void ControlFlowVisualization::ControlFlowItem::addConnector ( int  xBegin,
int  yBegin,
int  xEnd,
int  yEnd,
bool  arrowEnding 
)
protected

◆ addConnector() [3/3]

void ControlFlowVisualization::ControlFlowItem::addConnector ( QList< QPoint > &  points,
bool  arrowEnding 
)
protected

◆ addToLastConnector() [1/2]

void ControlFlowVisualization::ControlFlowItem::addToLastConnector ( const QPoint &  point)
protected

◆ addToLastConnector() [2/2]

void ControlFlowVisualization::ControlFlowItem::addToLastConnector ( int  x,
int  y 
)
protected

◆ breaks()

const QList< QPoint > & ControlFlowVisualization::ControlFlowItem::breaks ( )
inline

◆ clearConnectors()

void ControlFlowVisualization::ControlFlowItem::clearConnectors ( )
protected

◆ connector()

QPainterPath ControlFlowVisualization::ControlFlowItem::connector ( const QList< QPoint > &  points,
bool  arrowEnding 
)
private

◆ continues()

const QList< QPoint > & ControlFlowVisualization::ControlFlowItem::continues ( )
inline

◆ entrance()

const QPoint & ControlFlowVisualization::ControlFlowItem::entrance ( )
inline

◆ exit()

const QPoint & ControlFlowVisualization::ControlFlowItem::exit ( )
inline

◆ paint()

void ControlFlowVisualization::ControlFlowItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
overridevirtual

◆ setPreferredBreakExit()

void ControlFlowVisualization::ControlFlowItem::setPreferredBreakExit ( PreferedExitDirection  preference)
inline

◆ setPreferredContinueExit()

void ControlFlowVisualization::ControlFlowItem::setPreferredContinueExit ( PreferedExitDirection  preference)
inline

Member Data Documentation

◆ arrowEndings_

QList< bool > ControlFlowVisualization::ControlFlowItem::arrowEndings_
private

◆ breaks_

QList< QPoint > ControlFlowVisualization::ControlFlowItem::breaks_
protected

◆ connectors_

QList< QList< QPoint > > ControlFlowVisualization::ControlFlowItem::connectors_
private

◆ continues_

QList< QPoint > ControlFlowVisualization::ControlFlowItem::continues_
protected

◆ entrance_

QPoint ControlFlowVisualization::ControlFlowItem::entrance_
protected

◆ exit_

QPoint ControlFlowVisualization::ControlFlowItem::exit_
protected

◆ preferredBreakExit_

PreferedExitDirection ControlFlowVisualization::ControlFlowItem::preferredBreakExit_
protected

◆ preferredContinueExit_

PreferedExitDirection ControlFlowVisualization::ControlFlowItem::preferredContinueExit_
protected