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

SDAGViewEl Class Reference

#include <SDAGViewEl.h>

Inherits SViewEl.

Inheritance diagram for SDAGViewEl:

Inheritance graph
[legend]
List of all members.

Public Types

enum  MenuIDs {
  COLOR_MENU_ID_WHITE, COLOR_MENU_ID_RED, COLOR_MENU_ID_BLUE, COLOR_MENU_ID_GREEN,
  COLOR_MENU_ID_YELLOW, COLOR_MENU_ID_USER, SHAPE_MENU_ID_ELLIPSE, SHAPE_MENU_ID_RECTANGLE,
  WIDTH_MENU_ID_1, WIDTH_MENU_ID_2, WIDTH_MENU_ID_3, WIDTH_MENU_ID_4,
  WIDTH_MENU_ID_5
}
enum  GraphType { DIRECTED, UNDIRECTED }
enum  HitTestInfo { GetHit = 0, OnContext = 1, OnNode = 2, OnEdge = 3 }
enum  DAGViewState {
  Idle = 0, InsertNode = 1, DragNode = 2, SelectEdgeStart = 3,
  SelectEdgeEnd = 4, DragEdge = 5
}
enum  SMarkStyles {
  STANDARD, MARKED, MARKED1, MARKED2,
  MARKED3, MARKED4
}

Public Slots

bool load ()

Signals

void numberOfNodes (int)
void numberOfEdges (int)

Public Methods

 SDAGViewEl (STaskSystem *ts)
 ~SDAGViewEl ()
virtual void paint (QPaintDevice *pd, QRect rect)
virtual void setView (SView &view)
virtual void setPos (QPoint p)
bool isDirected ()
virtual bool mouseEvent (QMouseEvent *e)
virtual bool isAffectedBy (QMouseEvent *)
QRegion getRegion ()
const QRect & getBoundBox () const
virtual void update (const class SEvent &)
virtual void update (const SEvent &event)=0

Protected Methods

void removeEdge (SDAGEdgeViewEl *edge)
QColor lighterGray ()
void draw3DRect (QPainter &p, int x, int y, int w, int h)
void draw3DRect (QPainter &p, const QRect &r)
SViewgetView ()
void requestRepaint ()
void requestRepaint (const QRect &rect)

Protected Attributes

STaskSystem_pTaskSystem

Friends

class SDAGEdgeViewEl

Detailed Description

This view element paints a dag. It uses the SDAGNodeViewEl and the SDAGEdgeViewEl classes for painting nodes and edges.


Member Enumeration Documentation

enum SDAGViewEl::DAGViewState
 

Internal state enum, important for graphical stuff like dragging, inserting etc.

Enumeration values:
Idle 
InsertNode 
DragNode 
SelectEdgeStart 
SelectEdgeEnd 
DragEdge 

enum SDAGViewEl::GraphType
 

Type of graph.

Enumeration values:
DIRECTED 
UNDIRECTED 

enum SDAGViewEl::HitTestInfo
 

Different possibilties for the mouse click.

Enumeration values:
GetHit 
OnContext 
OnNode 
OnEdge 

enum SDAGViewEl::MenuIDs
 

Enum for selecting menu entries.

Enumeration values:
COLOR_MENU_ID_WHITE 
COLOR_MENU_ID_RED 
COLOR_MENU_ID_BLUE 
COLOR_MENU_ID_GREEN 
COLOR_MENU_ID_YELLOW 
COLOR_MENU_ID_USER 
SHAPE_MENU_ID_ELLIPSE 
SHAPE_MENU_ID_RECTANGLE 
WIDTH_MENU_ID_1 
WIDTH_MENU_ID_2 
WIDTH_MENU_ID_3 
WIDTH_MENU_ID_4 
WIDTH_MENU_ID_5 

enum SViewEl::SMarkStyles [inherited]
 

Mark styles influence the style how the ViewEl is displayed. The styles are stored in SVis...-objects. Identical mark styles should produce similar (NOT HARDCODED) effects in different ViewEls.

Enumeration values:
STANDARD 
MARKED 
MARKED1 
MARKED2 
MARKED3 
MARKED4 


Constructor & Destructor Documentation

SDAGViewEl::SDAGViewEl STaskSystem   ts
 

Constructs a new SDAGViewEl.

SDAGViewEl::~SDAGViewEl  
 


Member Function Documentation

void SViewEl::draw3DRect QPainter &    p,
const QRect &    r
[inline, protected, inherited]
 

void SViewEl::draw3DRect QPainter &    p,
int    x,
int    y,
int    w,
int    h
[protected, inherited]
 

paint a 3D Rectangle use current Brush as color

const QRect & SDAGViewEl::getBoundBox   [virtual]
 

calculate the bounding box

Reimplemented from SViewEl.

QRegion SDAGViewEl::getRegion   [virtual]
 

Get the region that is covered by the dag.

Implements SViewEl.

SView& SViewEl::getView   [inline, protected, inherited]
 

Get the view which is responsible for this view element. This is useful for setting new cursors etc. .

Returns:
the view for this view element.

bool SDAGViewEl::isAffectedBy QMouseEvent *    [virtual]
 

Checks if the dag is affected by the mouse event.

Parameters:
e  is the mouse event should be tested.

Reimplemented from SViewEl.

bool SDAGViewEl::isDirected  
 

Checks if the graph is directed or not.

Returns:
TRUE if the graph is directed otherwise FALSE.

QColor SViewEl::lighterGray   [inline, protected, inherited]
 

bool SDAGViewEl::load   [slot]
 

Clears the dagview and create a new graph. It uses _ts->getPrecBroker().getDAG().getGraph().

bool SDAGViewEl::mouseEvent QMouseEvent *    e [virtual]
 

This is the central function for mouse events. It gets the event type and calls one of the mousePress, mouseRelease or mouseMove methods.

Reimplemented from SViewEl.

void SDAGViewEl::numberOfEdges int    [signal]
 

Signal for notifying the parent, that the number of edges has changed. (for updating labels etc.).

void SDAGViewEl::numberOfNodes int    [signal]
 

Signal for notifying the parent, that the number of nodes has changed. (for updating labels etc.).

void SDAGViewEl::paint QPaintDevice *    pd,
QRect    rect
[virtual]
 

Calls the paint() functions of the children (nodes and edges).

Implements SViewEl.

void SDAGViewEl::removeEdge SDAGEdgeViewEl   edge [protected]
 

Removes a edge from the dag.

Parameters:
edge  is the edge that is to be removed.

void SViewEl::requestRepaint const QRect &    rect [inline, protected, inherited]
 

void SViewEl::requestRepaint   [inline, protected, inherited]
 

If something in the view element has changed and you want to make the changes visible, then request a repaint for the view element. CAUTION: repaints everything!

void SDAGViewEl::setPos QPoint    p [virtual]
 

Sets a new position for the dag.

Parameters:
p  is the new position of the dag.

Reimplemented from SViewEl.

void SDAGViewEl::setView SView   view [virtual]
 

Sets the view for this element and all of its children.

Reimplemented from SViewEl.

virtual void SObserver::update const SEvent   event [pure virtual, inherited]
 

Here the class is informed of an event, when an observed component has sent an event by SObservable::notifyObservers()

Parameters:
event  event sent by an observed component (the reference is not guaranteed to be valid after the termination of the call to update()
See also:
SObservable::notifyObservers()

Implemented in SGanttLog, SLogger, SJobArray, and STaskSystem.

void SDAGViewEl::update const class SEvent   [virtual]
 

Reacts on edit and pref events.

Reimplemented from SViewEl.


Friends And Related Function Documentation

friend class SDAGEdgeViewEl [friend]
 


Member Data Documentation

STaskSystem* SViewEl::_pTaskSystem [protected, inherited]
 

@supplierCardinality 1 @label displays part of

SHOULDN'T BE USED!! WILL BE REMOVED (AH)


The documentation for this class was generated from the following files:
Generated on Thu May 22 16:50:44 2003 for Sketch-it! by doxygen1.2.18