kgantt
KGanttItem Class Reference
#include <KGanttItem.h>
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.
Definition at line 54 of file KGanttItem.h.
Public Types | |
enum | Change { NoChange = 0, StartChanged = 1, EndChanged = 2, HeightChanged = 4, TotalHeightChanged = 8, StyleChanged = 16, TextChanged = 32, ModeChanged = 64, MinChanged = 128, MaxChanged = 256, Opened = 512, Closed = 1024, Selected = 2048, Unselected = 4096, Unknown = 8192, RelationAdded = 16384, RelationRemoved = 32768 } |
enum | Style { DrawNothing = 0, DrawBorder = 1, DrawFilled = 2, DrawText = 4, DrawHandle = 16, DrawHandleWSubitems = 32, DrawAll = 255 } |
enum | Mode { Normal, Rubberband } |
Signals | |
void | changed (KGanttItem *, KGanttItem::Change) |
void | destroyed (KGanttItem *) |
Public Member Functions | |
KGanttItem (KGanttItem *parentItem, const QString &text, const QDateTime &start, const QDateTime &end) | |
KGanttItem (KGanttItem *parentItem, const QString &text, const QDateTime &start, long durationMin) | |
~KGanttItem () | |
KGanttRelation * | addRelation (KGanttItem *from, KGanttItem *to, const QString &text) |
bool | isOpen () |
void | open (bool f) |
void | setEditable (bool f) |
bool | isEditable () |
bool | isSelected () |
void | select (bool f) |
void | setMode (Mode flag) |
void | setStyle (int flag, bool includeSubitems=false) |
int | getStyle () |
void | setBrush (const QBrush &brush) |
QBrush & | getBrush () |
QBrush & | getSelectBrush () |
void | setPen (const QPen &pen) |
QPen & | getPen () |
void | setTextPen (const QPen &pen) |
QPen & | getTextPen () |
void | setText (const QString &text) |
QString | getText () |
QDateTime | getStart () |
QDateTime | getEnd () |
void | setStart (const QDateTime &start) |
void | setEnd (const QDateTime &end) |
void | setHeight (int h) |
int | getHeight () |
int | getTotalHeight () |
int | getWidth () |
QPtrList< KGanttItem > & | getSubItems () |
QPtrList< KGanttRelation > & | getRelations () |
void | startTransaction () |
void | endTransaction () |
void | dump (QTextOStream &cout, const QString &pre) |
Static Public Member Functions | |
static QString | ChangeAsString (Change c) |
Member Enumeration Documentation
|
Definition at line 63 of file KGanttItem.h. |
|
Definition at line 110 of file KGanttItem.h. |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 15 of file KGanttItem.cpp. |
|
Constructor.
Definition at line 25 of file KGanttItem.cpp. |
|
Destructor.
Definition at line 67 of file KGanttItem.cpp. |
Member Function Documentation
|
Add relation between two subitems.
Definition at line 90 of file KGanttItem.cpp. |
|
Return a given change as a string.
Definition at line 599 of file KGanttItem.cpp. |
|
Item has changed. This signal is emitted if any of the items properties have been changed. |
|
Item will be deleted. This signal will be emitted immediately before the object will be deleted. |
|
Dump to cout.
Definition at line 565 of file KGanttItem.cpp. |
|
End a transaction.
If you started a transaction and all signals have been blocked by method startTransaction(), invoke endTransaction() to unblock signals. Definition at line 119 of file KGanttItem.cpp. |
|
Get brush that is used for filling the item.
Definition at line 273 of file KGanttItem.h. |
|
Get date of ending.
Definition at line 220 of file KGanttItem.cpp. |
|
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. Definition at line 392 of file KGanttItem.h. |
|
Get list of relations.
Definition at line 430 of file KGanttItem.h. |
|
Get brush which has to be used for drawing this item as selected.
Definition at line 283 of file KGanttItem.h. |
|
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 208 of file KGanttItem.cpp. |
|
Get drawing style.
Definition at line 255 of file KGanttItem.h. |
|
Get list of subitems.
Definition at line 420 of file KGanttItem.h. |
|
Get text.
Definition at line 339 of file KGanttItem.h. |
|
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. Definition at line 534 of file KGanttItem.cpp. |
|
Get width in minutes.
Definition at line 550 of file KGanttItem.cpp. |
|
Returns if item is editable. See also setEditable(). Definition at line 208 of file KGanttItem.h. |
|
Returns true if item is open (subitems has to be drawn).
Definition at line 177 of file KGanttItem.h. |
|
Returns true if item is selected.
Definition at line 218 of file KGanttItem.h. |
|
Open / Close item. Draw/don't draw subitems. Definition at line 435 of file KGanttItem.cpp. |
|
Select/unselect item.
Definition at line 450 of file KGanttItem.cpp. |
|
Set brush for filling.
Definition at line 503 of file KGanttItem.cpp. |
|
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 198 of file KGanttItem.h. |
|
Set time/date of end.
Definition at line 269 of file KGanttItem.cpp. |
|
Set height. Set height in pixel. These are scaled when this item is drawn by the barview. Definition at line 521 of file KGanttItem.cpp. |
|
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. Definition at line 466 of file KGanttItem.cpp. |
|
Set pen for border.
Definition at line 512 of file KGanttItem.cpp. |
|
Set time/date of start.
Definition at line 232 of file KGanttItem.cpp. |
|
Set drawing style.
Definition at line 480 of file KGanttItem.cpp. |
|
Set text.
Definition at line 422 of file KGanttItem.cpp. |
|
Start a transaction. If you want to add a lot of subitems -> block signals Definition at line 440 of file KGanttItem.h. |
The documentation for this class was generated from the following files: