#include <KDGanttViewTaskLink.h>
Public Types | |
enum | LinkType { None , FinishStart , StartStart , FinishFinish , StartFinish } |
Public Member Functions | |
KDGanttViewTaskLink (TQPtrList< KDGanttViewItem > from, TQPtrList< KDGanttViewItem > to, LinkType type=None) | |
KDGanttViewTaskLink (KDGanttViewTaskLinkGroup *group, TQPtrList< KDGanttViewItem > from, TQPtrList< KDGanttViewItem > to, LinkType type=None) | |
KDGanttViewTaskLink (KDGanttViewTaskLinkGroup *group, KDGanttViewItem *from, KDGanttViewItem *to, LinkType type=None) | |
KDGanttViewTaskLink (KDGanttViewItem *from, KDGanttViewItem *to, LinkType type=None) | |
TQPtrList< KDGanttViewItem > | from () const |
TQPtrList< KDGanttViewItem > | to () const |
void | removeItemFromList (KDGanttViewItem *) |
void | setVisible (bool) |
bool | isVisible () const |
KDGanttViewTaskLinkGroup * | group () |
void | setGroup (KDGanttViewTaskLinkGroup *) |
void | setHighlight (bool highlight) |
bool | highlight () const |
void | setColor (const TQColor &color) |
TQColor | color () const |
void | setHighlightColor (const TQColor &color) |
TQColor | highlightColor () const |
void | setTooltipText (const TQString &text) |
TQString | tooltipText () const |
void | setWhatsThisText (const TQString &text) |
TQString | whatsThisText () const |
void | createNode (TQDomDocument &doc, TQDomElement &parentElement) |
int | linkType () |
void | setLinkType (int type) |
Static Public Member Functions | |
static KDGanttViewTaskLink * | createFromDomElement (TQDomElement &) |
Friends | |
class | KDGanttViewTaskLinkGroup |
class | KDTimeTableWidget |
Detailed Description
This class represents a link between a number of Gantt chart items.
It always connects source items with target items. Task links can be grouped into KDGanttViewTaskLinkGroup objects. If a Gantt view item is deleted, it is removed from the fromList or from the toList. If one of the lists becomes empty, the complete task link is deleted as well.
The task link is deleted by KDGanttViews d'tor. You may delete the task link yourself, if you do it before KDGanttViews d'tor is called.
Definition at line 48 of file KDGanttViewTaskLink.h.
Constructor & Destructor Documentation
◆ KDGanttViewTaskLink() [1/4]
KDGanttViewTaskLink::KDGanttViewTaskLink | ( | TQPtrList< KDGanttViewItem > | from, |
TQPtrList< KDGanttViewItem > | to, | ||
LinkType | type = None |
||
) |
Creates a task link that connects all items in the source item list from to all items in the destination item list to.
- Parameters
-
from the source items to the target items type the link type for the connection
Definition at line 65 of file KDGanttViewTaskLink.cpp.
◆ KDGanttViewTaskLink() [2/4]
KDGanttViewTaskLink::KDGanttViewTaskLink | ( | KDGanttViewTaskLinkGroup * | group, |
TQPtrList< KDGanttViewItem > | from, | ||
TQPtrList< KDGanttViewItem > | to, | ||
LinkType | type = None |
||
) |
Creates a task link that connects all items in the source item list from to all items in the destination item list to. Inserts the link directly into a link group.
- Parameters
-
group the link group to insert this link into from the source items to the target items type the link type for the connection
Definition at line 111 of file KDGanttViewTaskLink.cpp.
◆ KDGanttViewTaskLink() [3/4]
KDGanttViewTaskLink::KDGanttViewTaskLink | ( | KDGanttViewTaskLinkGroup * | group, |
KDGanttViewItem * | from, | ||
KDGanttViewItem * | to, | ||
LinkType | type = None |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates a task link that connects two items and inserts the link directly into a link group. Note, that the from() and to() functions are returning a list, in this case containing only one item.
- Parameters
-
group the link group to insert this link into from the source item to the target item type the link type for the connection
Definition at line 138 of file KDGanttViewTaskLink.cpp.
◆ KDGanttViewTaskLink() [4/4]
KDGanttViewTaskLink::KDGanttViewTaskLink | ( | KDGanttViewItem * | from, |
KDGanttViewItem * | to, | ||
LinkType | type = None |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates a task link that connects two items. Note, that the from() and to() functions are returning a list, in this case containing only one item.
- Parameters
-
from the source item to the target item type the link type for the connection
Definition at line 88 of file KDGanttViewTaskLink.cpp.
Member Function Documentation
◆ color()
TQColor KDGanttViewTaskLink::color | ( | ) | const |
Returns the color in which this task link is drawn.
- Returns
- the color in which this task link is drawn
- See also
- setColor()
Definition at line 606 of file KDGanttViewTaskLink.cpp.
◆ createFromDomElement()
|
static |
Creates a KDGanttViewTaskLink according to the specification in a DOM element.
- Parameters
-
element the DOM element from which to read the specification
- Returns
- the newly created task link
Definition at line 783 of file KDGanttViewTaskLink.cpp.
◆ createNode()
void KDGanttViewTaskLink::createNode | ( | TQDomDocument & | doc, |
TQDomElement & | parentElement | ||
) |
Creates a DOM node that describes this task link.
- Parameters
-
doc the DOM document to which the node belongs parentElement the element into which to insert this node
Definition at line 737 of file KDGanttViewTaskLink.cpp.
◆ from()
TQPtrList< KDGanttViewItem > KDGanttViewTaskLink::from | ( | ) | const |
Returns the list of source item of this task link.
- Returns
- the ist of source item of this task link
- See also
- to()
Definition at line 693 of file KDGanttViewTaskLink.cpp.
◆ group()
KDGanttViewTaskLinkGroup * KDGanttViewTaskLink::group | ( | ) |
Returns the group (if any) to which this task link belongs.
- Returns
- the group to which this task link belongs; 0 if it does not belong to any group.
- See also
- KDGanttViewTaskLinkGroup
Definition at line 530 of file KDGanttViewTaskLink.cpp.
◆ highlight()
bool KDGanttViewTaskLink::highlight | ( | ) | const |
Returns whether this task link is highlighted, either programmatically by setHighlight() or by the user with the mouse.
- Returns
- true if the task link is highlighted
- See also
- setHighlight()
Definition at line 580 of file KDGanttViewTaskLink.cpp.
◆ highlightColor()
TQColor KDGanttViewTaskLink::highlightColor | ( | ) | const |
Returns the highlight color in which this task link is drawn.
- Returns
- the highlight color in which this task link is drawn
- See also
- setHighlightColor()
Definition at line 632 of file KDGanttViewTaskLink.cpp.
◆ isVisible()
bool KDGanttViewTaskLink::isVisible | ( | ) | const |
Returns whether this task link should be visible or not.
- Returns
- true if the task link is visible
- See also
- setVisible()
Definition at line 516 of file KDGanttViewTaskLink.cpp.
◆ removeItemFromList()
void KDGanttViewTaskLink::removeItemFromList | ( | KDGanttViewItem * | item | ) |
Removes a KDGanttViewItem from the lists.
Definition at line 704 of file KDGanttViewTaskLink.cpp.
◆ setColor()
void KDGanttViewTaskLink::setColor | ( | const TQColor & | color | ) |
Specifies the color to draw this task link in.
- Parameters
-
color the color to draw this task link in
- See also
- color()
Definition at line 592 of file KDGanttViewTaskLink.cpp.
◆ setGroup()
void KDGanttViewTaskLink::setGroup | ( | KDGanttViewTaskLinkGroup * | group | ) |
Inserts this task link in a group. If the parameter is 0, the task link is removed from any group
- Parameters
-
group the group, this task link has to be inserted
- See also
- KDGanttViewTaskLinkGroup
Definition at line 544 of file KDGanttViewTaskLink.cpp.
◆ setHighlight()
void KDGanttViewTaskLink::setHighlight | ( | bool | highlight | ) |
Specifies whether this task link should be shown highlighted. The user can also highlight a task link with the mouse.
- Parameters
-
highlight pass true in order to highlight this task link
- See also
- highlight()
Definition at line 565 of file KDGanttViewTaskLink.cpp.
◆ setHighlightColor()
void KDGanttViewTaskLink::setHighlightColor | ( | const TQColor & | color | ) |
Specifies the highlight color to draw this task link in.
- Parameters
-
color the highlight color to draw this task link in
- See also
- highlightColor()
Definition at line 618 of file KDGanttViewTaskLink.cpp.
◆ setTooltipText()
void KDGanttViewTaskLink::setTooltipText | ( | const TQString & | text | ) |
Specifies the text to be shown as a tooltip for this task link.
- Parameters
-
text the tooltip text
- See also
- tooltipText()
Definition at line 644 of file KDGanttViewTaskLink.cpp.
◆ setVisible()
void KDGanttViewTaskLink::setVisible | ( | bool | visible | ) |
Specifies whether this task link should be visible or not.
- Parameters
-
visible pass true to make this task link visible, and false to hide it
- See also
- isVisible()
Definition at line 253 of file KDGanttViewTaskLink.cpp.
◆ setWhatsThisText()
void KDGanttViewTaskLink::setWhatsThisText | ( | const TQString & | text | ) |
Specifies the text to be shown in a what's this window for this task link.
- Parameters
-
text the what's this text
- See also
- whatsThisText()
Definition at line 668 of file KDGanttViewTaskLink.cpp.
◆ to()
TQPtrList< KDGanttViewItem > KDGanttViewTaskLink::to | ( | ) | const |
Returns the list of target items of this task link.
- Returns
- the list of target item of this task link
- See also
- from()
Definition at line 725 of file KDGanttViewTaskLink.cpp.
◆ tooltipText()
TQString KDGanttViewTaskLink::tooltipText | ( | ) | const |
Returns the tooltip text of this task link.
- Returns
- the tooltip text of this task link
- See also
- setTooltipText()
Definition at line 656 of file KDGanttViewTaskLink.cpp.
◆ whatsThisText()
TQString KDGanttViewTaskLink::whatsThisText | ( | ) | const |
Returns the what's this text of this task link.
- Returns
- the what's this text of this task link
- See also
- setWhatsThisText()
Definition at line 681 of file KDGanttViewTaskLink.cpp.
The documentation for this class was generated from the following files: