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

SDAGNodeViewEl Class Reference

#include <SDAGNodeViewEl.h>

Inherits SViewEl.

Inheritance diagram for SDAGNodeViewEl:

Inheritance graph
[legend]
List of all members.

Public Types

enum  SMarkStyles {
  STANDARD, MARKED, MARKED1, MARKED2,
  MARKED3, MARKED4
}

Public Methods

 SDAGNodeViewEl (STaskSystem *ts, SJob &job)
 ~SDAGNodeViewEl ()
virtual void paint (QPaintDevice *pd, QRect rect)
void hide ()
void show ()
bool isVisible ()
void initPixmap ()
void moveTo (int x, int y)
void moveTo (QPoint pos)
void setPos (int x, int y)
void setPos (QPoint p)
int getWidth ()
int getHeight ()
QPoint getPos ()
void addEdge (SDAGEdgeViewEl *edge)
void removeEdge (SDAGEdgeViewEl *edge)
SJobgetJob ()
QRegion getRegion ()
const QRect & getBoundBox () const
const QRect & fullBoundBox () const
virtual void setView (SView &view)
virtual bool isAffectedBy (QMouseEvent *ev)
virtual bool mouseEvent (QMouseEvent *ev)
virtual void update (const SEvent &event)=0

Protected Methods

void update (const class SEvent &)
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

Detailed Description

This view element paints a node. You can use a QPixmap file for the nodes or drawed nodes ( ellipse or rectangle shape ). Some job information are displayed in the middle of the nodes.


Member Enumeration Documentation

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

SDAGNodeViewEl::SDAGNodeViewEl STaskSystem   ts,
SJob   job
 

Constructs a new SDAGNodeViewEl.

Parameters:
job  is the SJob that is represented by this node.

SDAGNodeViewEl::~SDAGNodeViewEl  
 


Member Function Documentation

void SDAGNodeViewEl::addEdge SDAGEdgeViewEl   edge [inline]
 

Function for adding a edge to the list of adjacent edges of this node. These edges are repositioned by the node if you call moveTo(..).

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 & SDAGNodeViewEl::fullBoundBox  
 

calculate bounding box with edges

const QRect & SDAGNodeViewEl::getBoundBox   [virtual]
 

calculate the bounding box

Reimplemented from SViewEl.

int SDAGNodeViewEl::getHeight   [inline]
 

Returns:
the height of the node.

SJob& SDAGNodeViewEl::getJob   [inline]
 

Returns:
the SJob which is represented by this node.

QPoint SDAGNodeViewEl::getPos   [inline]
 

Returns:
the position of the node on the paintdevice in a qpoint. The returned position is the middle of the node.

QRegion SDAGNodeViewEl::getRegion   [inline, virtual]
 

Returns:
the region which is covered by the node.

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.

int SDAGNodeViewEl::getWidth   [inline]
 

Returns:
the width of the node.

void SDAGNodeViewEl::hide   [inline]
 

Hides this node. Sets _visible to FALSE, so that this node isn't repainted until _visible is set to TRUE (show() !) again.

void SDAGNodeViewEl::initPixmap  
 

Initializes the _pixmap.

virtual bool SViewEl::isAffectedBy QMouseEvent *    ev [inline, virtual, inherited]
 

The isAffectedBy function checks if an element is affected by a particular mouse event.

Parameters:
ev  the mouse event we are talking about.
Returns:
true if event is handled directly by this object (in particular not only by a child).

Reimplemented in SDAGViewEl.

bool SDAGNodeViewEl::isVisible   [inline]
 

Tests if this node is visible or not.

Returns:
TRUE if the node is visible, or FALSE if not.

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

virtual bool SViewEl::mouseEvent QMouseEvent *    ev [inline, virtual, inherited]
 

This virtual function handles the mouse event. You can feed it with the captured mouse event from your view.

Returns:
true if the mouse event was handled succesfully.

Reimplemented in SDAGViewEl.

void SDAGNodeViewEl::moveTo QPoint    pos [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void SDAGNodeViewEl::moveTo int    x,
int    y
 

Moves the node to a new position. If the node has adjacent edges they will be repositioned.

Parameters:
x  is the x-coordinate of the new position.
y  is the y-coordinate of the new position.

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

Paints the node to the paintdevice.

Parameters:
pd  is the paintdevice for the painting action.
rect  is the painting/clipping rect.

Implements SViewEl.

void SDAGNodeViewEl::removeEdge SDAGEdgeViewEl   edge [inline]
 

Removes an edge from the list '_edges' of the node.

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 SDAGNodeViewEl::setPos QPoint    p [inline, virtual]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reimplemented from SViewEl.

void SDAGNodeViewEl::setPos int    x,
int    y
 

Positions a node without repositioning its adjacent edges.

virtual void SViewEl::setView SView   view [inline, virtual, inherited]
 

Set the view which accepts the repaint-requests.

Parameters:
view  This paramter is a reference to the parent view ( the view which accepts the repaint-requests.

Reimplemented in SDAGViewEl.

void SDAGNodeViewEl::show   [inline]
 

Shows this node: Sets _visible to TRUE, so that this node is repainted.

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 SDAGNodeViewEl::update const class SEvent   [protected, virtual]
 

This view element reacts on scheduling events.

Reimplemented from SViewEl.


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:43 2003 for Sketch-it! by doxygen1.2.18