Drawing algorithm based on GraphViz library. More...
#include <drawAlgorithm.h>
Public Member Functions | |
GraphVizDrawAlgorithm (IGraphViz *graphVizWrapper) | |
QList< State * > | drawAutomaton (Editor *editor, const QSharedPointer< IAutomaton > &automaton) |
QString | getName () const |
Protected Types | |
enum | ETransitionType { eLine, eLoop, eCurve } |
Protected Member Functions | |
IGVEdge::TCPList | convertCPToBezierCP (const QSharedPointer< IGVEdge > &edge) const |
void | drawTransitionsAccordingToGV (Editor *editor, const Editor::TStateMap &states, const QSharedPointer< IAutomaton > &automaton, const QSharedPointer< IGVGraph > &graph) const |
ETransitionType | getTransitionType (const QSharedPointer< IGVEdge > &edge, const IGVEdge::TCPList &bezierCP) const |
Private Attributes | |
IGraphViz * | m_graphVizWrapper |
Drawing algorithm based on GraphViz library.
GraphViz layout elements and theirs parameters are used for direct drawing.
Definition at line 88 of file drawAlgorithm.h.
enum GraphVizDrawAlgorithm::ETransitionType [protected] |
Definition at line 98 of file drawAlgorithm.h.
GraphVizDrawAlgorithm::GraphVizDrawAlgorithm | ( | IGraphViz * | graphVizWrapper | ) |
Definition at line 633 of file drawAlgorithm.cpp.
IGVEdge::TCPList GraphVizDrawAlgorithm::convertCPToBezierCP | ( | const QSharedPointer< IGVEdge > & | edge | ) | const [protected] |
Definition at line 756 of file drawAlgorithm.cpp.
References DBGLOG_DRAW, and DBGPAR.
QList< State * > GraphVizDrawAlgorithm::drawAutomaton | ( | Editor * | editor, | |
const QSharedPointer< IAutomaton > & | automaton | |||
) | [virtual] |
Returns list of currently created states with transitions assigned, just use ItemsAddCommand on it
startPos | is left-top corner of result automaton |
Implements IDrawAlgorithm.
Definition at line 640 of file drawAlgorithm.cpp.
References createState(), DBGLOG_DRAW, and State::getName().
void GraphVizDrawAlgorithm::drawTransitionsAccordingToGV | ( | Editor * | editor, | |
const Editor::TStateMap & | states, | |||
const QSharedPointer< IAutomaton > & | automaton, | |||
const QSharedPointer< IGVGraph > & | graph | |||
) | const [protected] |
Definition at line 682 of file drawAlgorithm.cpp.
References Transition::adjust(), Transition::assign(), TransitionManager::createOneStateTransition(), TransitionManager::createTwoStatesTransition(), DBGLOG_DRAW, TransitionManager::getInstance(), NORTH, Transition::setArcAngle(), Transition::setArcAngleB(), and Transition::setNCurv().
QString GraphVizDrawAlgorithm::getName | ( | ) | const [inline, virtual] |
Implements IDrawAlgorithm.
Definition at line 95 of file drawAlgorithm.h.
GraphVizDrawAlgorithm::ETransitionType GraphVizDrawAlgorithm::getTransitionType | ( | const QSharedPointer< IGVEdge > & | edge, | |
const IGVEdge::TCPList & | bezierCP | |||
) | const [protected] |
Definition at line 778 of file drawAlgorithm.cpp.
Definition at line 109 of file drawAlgorithm.h.