Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Draw Class Reference

Drawing class responsible for all graphical representation. More...

#include <Draw.h>

Inheritance diagram for Draw::

List of all members.

Public Methods

 Draw (QObject *, Options *)
 Constructor. More...

void drawStates (Machine *, QPainter *, int, int, double)
 Draws all states. More...

void drawState (Machine *m, GState *, QPainter *, int, int, double, bool drawxor=TRUE)
 Draws a single state. More...

void drawTransitions (Machine *, QPainter *, int, int, double)
 Draws all transitions in machine. More...

void drawTransition (Machine *, GTransition *, QPainter *, int, int, double, bool drawxor=TRUE, bool dotted=TRUE, bool control_lines=FALSE, bool first=FALSE)
 Draws a single transition. More...

void drawArrow (GTransition *, QPainter *, QPen, int)
 Draws the arrowhead for a transition. More...

void drawArrow (GITransition *, QPainter *, QPen, int)
 Draws the arrowhead for the initial transition. More...

void drawCondition (Machine *m, GTransition *, QPainter *, int, int, double)
 Draws a condition for a given transition. More...

void drawInitialTransition (Machine *m, GITransition *, QPainter *, int, int, double, bool drawxor=FALSE, bool first=FALSE, bool transptext=FALSE)
 Draws the initial transition with the text 'start'. More...

void drawGrid (Grid *, QPainter *, int, int, double)
 Draws the grid. More...

void calcArrow (GTransition *, double &, double &, double &, double &)
 Calculates the 2 coordinates for the arrow of a transition. More...

void calcArrow (GITransition *, double &, double &, double &, double &)
 Calculates the 2 coordinates for the arrow of the initial transition. More...

void calcArrow (double, double, double, double, double &, double &, double &, double &)
 Calculates arrowhead coordinates. More...

void drawHeadline (Machine *, QPainter *, double)
 Draws the Headline for a Machine. More...


Private Attributes

Optionsoptions
 Pointer to the application options.


Detailed Description

Drawing class responsible for all graphical representation.


Constructor & Destructor Documentation

Draw::Draw QObject * parent,
Options * opt
 

Constructor.

Initialises the Draw object.

Parameters:
parent   parent widget
opt   application options


Member Function Documentation

void Draw::calcArrow double p1x,
double p1y,
double p2x,
double p2y,
double & xl,
double & yl,
double & xr,
double & yr
 

Calculates arrowhead coordinates.

Calculates from 2 coordinates of the end of the transition the 2 coordinates to draw an arrow.

Parameters:
p1x   x coordinate of the first point on the transition
p1y   y coordinate of the first point on the transition
p2x   x coordinate of the second point on the transition
p2y   y coordinate of the second point on the transition
xl   x coordinate of the left part of the arrow
yl   y coordinate of the left part of the arrow
xl   x coordinate of the right part of the arrow
yl   y coordinate of the right part of the arrow

void Draw::calcArrow GITransition * t,
double & xl,
double & yl,
double & xr,
double & yr
 

Calculates the 2 coordinates for the arrow of the initial transition.

Parameters:
t   transition
xl   x coordinate for left line
yl   y coordinate for left line
xr   x coordinate for right line
yr   y coordinate for right line

void Draw::calcArrow GTransition * t,
double & xl,
double & yl,
double & xr,
double & yr
 

Calculates the 2 coordinates for the arrow of a transition.

Parameters:
t   transition
xl   x coordinate for left line
yl   y coordinate for left line
xr   x coordinate for right line
yr   y coordinate for right line

void Draw::drawArrow GITransition * t,
QPainter * p,
QPen pen,
int type
 

Draws the arrowhead for the initial transition.

Parameters:
t   transition
p   QPainter
pen   pen of the transition
type   type of transition: 0 means not filled, 1 means filled

void Draw::drawArrow GTransition * t,
QPainter * p,
QPen pen,
int type
 

Draws the arrowhead for a transition.

Parameters:
t   transition
p   QPainter
pen   pen of that transition
type   type of transition: 0 means not filled, 1 means filled

void Draw::drawCondition Machine * m,
GTransition * t,
QPainter * p,
int contx,
int conty,
double scale
 

Draws a condition for a given transition.

Parameters:
m   machine containing the transition with the condition
t   transition owning the condition
p   QPainter
contx   current x scroll position
conty   current y scroll position
scale   current scale factor
numin   number of input bits
numout   number of output bits

void Draw::drawGrid Grid * gr,
QPainter * p,
int contx,
int conty,
double scale
 

Draws the grid.

Parameters:
grid   grid object of the view
p   QPainter
contx   current x scroll position
conty   current y scroll position
scale   current scale factor

void Draw::drawHeadline Machine * m,
QPainter * p,
double scale
 

Draws the Headline for a Machine.

Parameters:
m   machine containing the transition with the condition
p   QPainter
scale   current scale factor

void Draw::drawInitialTransition Machine * m,
GITransition * t,
QPainter * p,
int contx,
int conty,
double scale,
bool drawxor = FALSE,
bool first = FALSE,
bool transptext = FALSE
 

Draws the initial transition with the text 'start'.

Parameters:
m   machine containing the transition
t   intial transition
p   QPainter
contx   current x scroll position
conty   current y scroll position
scale   current scale factor
drawxor   if TRUE draws in xor mode otherwise not
first   if TRUE draws the first transition in a sequence (e.g. when dragging)
transptext   draws text transparently

void Draw::drawState Machine * m,
GState * s,
QPainter * p,
int contx,
int conty,
double scale,
bool drawxor = TRUE
 

Draws a single state.

Parameters:
m   machine which contains state
s   state to draw
p   QPainter
contx   current x scroll position
conty   current y scroll position
scale   current scale factor
drawxor   if TRUE draws in xor mode otherwise draws with the respective color.

void Draw::drawStates Machine * m,
QPainter * p,
int contx,
int conty,
double scale
 

Draws all states.

Parameters:
m   machine containing the states
p   QPainter specifying what to draw on
contx   current x scroll position
conty   current y scroll position
scale   current scale factor

void Draw::drawTransition Machine * m,
GTransition * t,
QPainter * p,
int contx,
int conty,
double scale,
bool drawxor = TRUE,
bool dotted = TRUE,
bool control_lines = FALSE,
bool first = FALSE
 

Draws a single transition.

Parameters:
m   machine containing the transition
t   transition to draw
p   QPainter
contx   current x scroll position
conty   current y scroll position
scale   current scale factor
numin   number of input bits
numout   number of output bits
drawxor   if TRUE draws in xor otherwise not
dotted   if TRUE draws a dotted otherwise a solid line
control_lines   if TRUE draws with the control lines otherwise it draws only the transition line
first   if TRUE it draws the first line of a sequence (e.g. when dragging) i.e. it erases the visible transition.

void Draw::drawTransitions Machine * m,
QPainter * p,
int contx,
int conty,
double scale
 

Draws all transitions in machine.

Parameters:
m   machine containing the transitions
p   QPainter
contx   current x scroll position
conty   current y scroll position
scale   current scale factor
numin   number of input bits
numout   number of output bits


The documentation for this class was generated from the following files:
Generated at Fri Apr 11 22:37:15 2003 for Qfsm by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001