KDE PIM / Developers / API Docs / kgantt

KGanttItem Class Reference

KGanttItem. More...

#include <KGanttItem.h>

Inherits QObject.

List of all members.

Public Types

Signals

Public Member Functions

Static Public Member Functions


Detailed Description

KGanttItem.

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.


Member Enumeration Documentation

enum KGanttItem::Change
 

Enumeration values:
HeightChanged  Height for this item has changed.

The height doesn't include the subitems.

TotalHeightChanged  Total height has changed.

This happens if the item was opened, closed or subitems has been added or removed while item is open.

StyleChanged  Style for drawing has changed.
Opened  Draw item including subitems.
Closed  Draw item without subitems.
Selected  Item has been selected.
Unselected  Item has been unselected.
Unknown  Changes may occurred but the types are unknown.
RelationAdded  Relation between two subitems has been added.
RelationRemoved  Relation between two subitems has been removed.

enum KGanttItem::Style
 

Enumeration values:
DrawNothing  Set item invisible.
DrawBorder  Draw border.
DrawHandleWSubitems  Draw handle only if item contains subitems.

Constructor & Destructor Documentation

KGanttItem::KGanttItem KGanttItem parentItem,
const QString &  text,
const QDateTime &  start,
const QDateTime &  end
 

Constructor.

KGanttItem::KGanttItem KGanttItem parentItem,
const QString &  text,
const QDateTime &  start,
long  durationMin
 

Constructor.

KGanttItem::~KGanttItem  ) 
 

Destructor.


Member Function Documentation

KGanttRelation * KGanttItem::addRelation KGanttItem from,
KGanttItem to,
const QString &  text
 

Add relation between two subitems.

bool KGanttItem::isOpen  )  [inline]
 

Returns true if item is open (subitems has to be drawn).

void KGanttItem::open bool  f  ) 
 

Open / Close item.

Draw/don't draw subitems.

void KGanttItem::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(),

bool KGanttItem::isEditable  )  [inline]
 

Returns if item is editable.

See also setEditable().

bool KGanttItem::isSelected  )  [inline]
 

Returns true if item is selected.

void KGanttItem::select bool  f  ) 
 

Select/unselect item.

void KGanttItem::setMode Mode  flag  ) 
 

Set mode.

If mode is 'Rubberband' and the number of subtaks is greater than 0, the start and end of the item is determined by the start and end of the earliest/latest subitem.
Default is 'Normal'.

void KGanttItem::setStyle int  flag,
bool  includeSubitems = false
 

Set drawing style.

int KGanttItem::getStyle  )  [inline]
 

Get drawing style.

void KGanttItem::setBrush const QBrush &  brush  ) 
 

Set brush for filling.

QBrush& KGanttItem::getBrush  )  [inline]
 

Get brush that is used for filling the item.

QBrush& KGanttItem::getSelectBrush  )  [inline]
 

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

void KGanttItem::setPen const QPen &  pen  ) 
 

Set pen for border.

void KGanttItem::setText const QString &  text  ) 
 

Set text.

QString KGanttItem::getText  )  [inline]
 

Get text.

QDateTime KGanttItem::getStart  ) 
 

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.

QDateTime KGanttItem::getEnd  ) 
 

Get date of ending.

void KGanttItem::setStart const QDateTime &  start  ) 
 

Set time/date of start.

void KGanttItem::setEnd const QDateTime &  end  ) 
 

Set time/date of end.

void KGanttItem::setHeight int  h  ) 
 

Set height.

Set height in pixel. These are scaled when this item is drawn by the barview.

int KGanttItem::getHeight  )  [inline]
 

Get height.

Returns the height in pixel of this item. This does not include the height of any subitems; getTotalHeight() returns that if the subitems have to be drawn.

int KGanttItem::getTotalHeight  ) 
 

Get total height.

Returns the total height of this object in pixel, including any visible subitems. Notice, that the pixels are no screen pixel since the barview scales the height of a item.

int KGanttItem::getWidth  ) 
 

Get width in minutes.

QPtrList<KGanttItem>& KGanttItem::getSubItems  )  [inline]
 

Get list of subitems.

QPtrList<KGanttRelation>& KGanttItem::getRelations  )  [inline]
 

Get list of relations.

void KGanttItem::startTransaction  )  [inline]
 

Start a transaction.

If you want to add a lot of subitems -> block signals

void KGanttItem::endTransaction  ) 
 

End a transaction.

If you started a transaction and all signals have been blocked by method startTransaction(), invoke endTransaction() to unblock signals.
Signal changed(this,Unknown) is emitted.

QString KGanttItem::ChangeAsString Change  c  )  [static]
 

Return a given change as a string.

void KGanttItem::dump QTextOStream &  cout,
const QString &  pre
 

Dump to cout.

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

Item has changed.

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

void KGanttItem::destroyed KGanttItem  )  [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: