kgantt Library API Documentation

KGanttRelation Class Reference

KGanttRelation. More...

#include <KGanttRelation.h>

Inheritance diagram for KGanttRelation:

QObject List of all members.

Public Types

enum  Change { NoChange = 0, TextChanged = 32, Selected = 2048, Unselected = 4096 }

Public Slots

void itemDestroyed (KGanttItem *item)

Signals

void changed (KGanttRelation *, KGanttRelation::Change)
 Item has changed.

void destroyed (KGanttRelation *)
 Item will be deleted.


Public Member Functions

 ~KGanttRelation ()
 Destructor.

void select (bool f)
 Select/unselect item.

void setEditable (bool f)
 Set item editable or not.

bool isEditable ()
 Returns if item is editable.

QPengetSelectPen ()
 Get brush which has to be used for drawing this item as selected.

void setPen (const QPen &pen)
 Set pen for border.

QPengetPen ()
void setTextPen (const QPen &pen)
QPengetTextPen ()
void setText (const QString &text)
 Set text.

QString getText ()
 Get text.

KGanttItemgetFrom ()
 Get date of starting.

KGanttItemgetTo ()
 Get date of ending.

void dump (QTextOStream &cout, const QString &pre)
 Dump to cout.

QString ChangeAsString (Change c)

Protected Member Functions

 KGanttRelation (KGanttItem *from, KGanttItem *to, const QString &text)
 Constructor.


Detailed Description

KGanttRelation.

This class describes a item. It contains dates on which the item starts and ends. It also contains attributes that gouverns the graphical representation in a gantt diagramm.

Definition at line 48 of file KGanttRelation.h.


Member Enumeration Documentation

enum KGanttRelation::Change
 

Enumeration values:
Selected  Item has been selected.
Unselected  Item has been unselected.

Definition at line 58 of file KGanttRelation.h.


Constructor & Destructor Documentation

KGanttRelation::~KGanttRelation  ) 
 

Destructor.

Definition at line 37 of file KGanttRelation.cpp.

References QObject::destroyed(), and getText().

KGanttRelation::KGanttRelation KGanttItem from,
KGanttItem to,
const QString text
[protected]
 

Constructor.

Definition at line 16 of file KGanttRelation.cpp.

References QObject::connect(), and QObject::destroyed().


Member Function Documentation

void KGanttRelation::select bool  f  ) 
 

Select/unselect item.

Definition at line 93 of file KGanttRelation.cpp.

References changed(), Selected, and Unselected.

void KGanttRelation::setEditable bool  f  )  [inline]
 

Set item editable or not.

If item is not editable these methods have no effect : setStart(), setEnd(), setText(), select(), setMode(), setStyle(), setHeight(),

Definition at line 96 of file KGanttRelation.h.

bool KGanttRelation::isEditable  )  [inline]
 

Returns if item is editable.

See also setEditable().

Definition at line 106 of file KGanttRelation.h.

QPen& KGanttRelation::getSelectPen  )  [inline]
 

Get brush which has to be used for drawing this item as selected.

Definition at line 116 of file KGanttRelation.h.

void KGanttRelation::setPen const QPen pen  ) 
 

Set pen for border.

Definition at line 110 of file KGanttRelation.cpp.

void KGanttRelation::setText const QString text  ) 
 

Set text.

Definition at line 80 of file KGanttRelation.cpp.

References changed().

QString KGanttRelation::getText  )  [inline]
 

Get text.

Definition at line 172 of file KGanttRelation.h.

Referenced by ~KGanttRelation().

KGanttItem * KGanttRelation::getFrom  ) 
 

Get date of starting.

If mode == ´Rubberband´ and this item contains subitems, start of the item is determined by the start of the earliest subitem.

Definition at line 54 of file KGanttRelation.cpp.

Referenced by dump().

KGanttItem * KGanttRelation::getTo  ) 
 

Get date of ending.

Definition at line 63 of file KGanttRelation.cpp.

Referenced by dump().

void KGanttRelation::dump QTextOStream cout,
const QString pre
 

Dump to cout.

Definition at line 119 of file KGanttRelation.cpp.

References getFrom(), KGanttItem::getText(), getTo(), and QString::latin1().

Referenced by KGanttItem::dump().

void KGanttRelation::changed KGanttRelation ,
KGanttRelation::Change 
[signal]
 

Item has changed.

This signal is emitted if any of the items properties have been changed.

Referenced by select(), and setText().

void KGanttRelation::destroyed KGanttRelation  )  [signal]
 

Item will be deleted.

This signal will be emitted immediately before the object will be deleted.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:15 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001