kdgantt

KDGanttViewTaskLink Class Reference

#include <KDGanttViewTaskLink.h>

List of all members.


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.


Public Types

enum  LinkType {
  None, FinishStart, StartStart, FinishFinish,
  StartFinish
}

Public Member Functions

 KDGanttViewTaskLink (QPtrList< KDGanttViewItem > from, QPtrList< KDGanttViewItem > to, LinkType type=None)
 KDGanttViewTaskLink (KDGanttViewTaskLinkGroup *group, QPtrList< KDGanttViewItem > from, QPtrList< KDGanttViewItem > to, LinkType type=None)
 KDGanttViewTaskLink (KDGanttViewTaskLinkGroup *group, KDGanttViewItem *from, KDGanttViewItem *to, LinkType type=None)
 KDGanttViewTaskLink (KDGanttViewItem *from, KDGanttViewItem *to, LinkType type=None)
 ~KDGanttViewTaskLink ()
QPtrList< KDGanttViewItemfrom () const
QPtrList< KDGanttViewItemto () const
void removeItemFromList (KDGanttViewItem *)
void setVisible (bool)
bool isVisible () const
KDGanttViewTaskLinkGroupgroup ()
void setGroup (KDGanttViewTaskLinkGroup *)
void setHighlight (bool highlight)
bool highlight () const
void setColor (const QColor &color)
QColor color () const
void setHighlightColor (const QColor &color)
QColor highlightColor () const
void setTooltipText (const QString &text)
QString tooltipText () const
void setWhatsThisText (const QString &text)
QString whatsThisText () const
void createNode (QDomDocument &doc, QDomElement &parentElement)
int linkType ()
void setLinkType (int type)

Static Public Member Functions

static KDGanttViewTaskLinkcreateFromDomElement (QDomElement &)

Friends

class KDGanttViewTaskLinkGroup
class KDTimeTableWidget

Constructor & Destructor Documentation

KDGanttViewTaskLink::KDGanttViewTaskLink ( QPtrList< KDGanttViewItem from,
QPtrList< 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::KDGanttViewTaskLink ( KDGanttViewTaskLinkGroup group,
QPtrList< KDGanttViewItem from,
QPtrList< 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::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::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

QPtrList< 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.

QPtrList< 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.

void KDGanttViewTaskLink::removeItemFromList ( KDGanttViewItem item  ) 

Removes a KDGanttViewItem from the lists.

See also:
to() from()

Definition at line 704 of file KDGanttViewTaskLink.cpp.

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.

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.

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.

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.

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.

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.

void KDGanttViewTaskLink::setColor ( const QColor &  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.

QColor 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.

void KDGanttViewTaskLink::setHighlightColor ( const QColor &  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.

QColor 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.

void KDGanttViewTaskLink::setTooltipText ( const QString &  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.

QString 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.

void KDGanttViewTaskLink::setWhatsThisText ( const QString &  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.

QString 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.

void KDGanttViewTaskLink::createNode ( QDomDocument &  doc,
QDomElement &  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.

KDGanttViewTaskLink * KDGanttViewTaskLink::createFromDomElement ( QDomElement &  element  )  [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.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys