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

SGanttView Class Reference

#include <SGanttView.h>

Inherits QCanvasView, and SObserver.

Inheritance diagram for SGanttView:

Inheritance graph
[legend]
List of all members.

Public Types

enum  HitInfo { OnContext, OnJob, OnMachine }

Public Slots

void load ()

Public Methods

 SGanttView (STaskSystem &ts, QWidget *parent=0, QString name=0)
 ~SGanttView ()
void addToToolbar (QToolBar *toolbar)
virtual void update (const SEvent &event)=0

Protected Methods

virtual void contentsMousePressEvent (QMouseEvent *)
QRegion getRegion ()
virtual bool isAffectedBy (QMouseEvent *e)
void setPos (QPoint p)
virtual void update (const class SEvent &)
QColor lighterGray ()
void draw3DRect (int x, int y, int w, int h, const QColor &color)
void draw3DRect (const QRect &r, const QColor &color)
void drawText (int x, int y, int textFlags, const QString &text, const QColor &color=black)
void resizeCheck ()

Detailed Description

This view shows the Gantt Chart It manages the graphical context and the mouse events.


Member Enumeration Documentation

enum SGanttView::HitInfo
 

This enum indicates where on the view a mouse click occured. This is used in the hitTest(..) function mainly for displaying the right context menu.

Enumeration values:
OnContext 
OnJob 
OnMachine 


Constructor & Destructor Documentation

SGanttView::SGanttView STaskSystem   ts,
QWidget   parent = 0,
QString    name = 0
 

Constructs a new SGanttView.

SGanttView::~SGanttView  
 


Member Function Documentation

void SGanttView::addToToolbar QToolBar *    toolbar
 

add the Actions to the given Toolbar

void SGanttView::contentsMousePressEvent QMouseEvent *    [protected, virtual]
 

Handles the mouse events for context menus etc.

void SGanttView::draw3DRect const QRect &    r,
const QColor &    color
[inline, protected]
 

void SGanttView::draw3DRect int    x,
int    y,
int    w,
int    h,
const QColor &    color
[protected]
 

paint a 3D Rectangle use current Brush as color

void SGanttView::drawText int    x,
int    y,
int    textFlags,
const QString &    text,
const QColor &    color = black
[protected]
 

paint the given text at the given position with the given flags

QRegion SGanttView::getRegion   [protected]
 

Returns:
the region that is covered by the gantt chart.

bool SGanttView::isAffectedBy QMouseEvent *    e [protected, virtual]
 

Checks if the dag is affected by the mouse event.

Parameters:
e  is the mouse event should be tested.

QColor SGanttView::lighterGray   [inline, protected]
 

void SGanttView::load   [slot]
 

This slot is connected to a load signal from the parent of this view. It calls the load routine of the gantt view element.

void SGanttView::resizeCheck   [protected]
 

void SGanttView::setPos QPoint    p [protected]
 

Set a new position for the ganttview element.

Parameters:
p  is the new upper left corner of the ganttview element.

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


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