• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kdgantt1

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.

Definition at line 46 of file KDGanttViewTaskLink.h.


Public Types

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

Public Member Functions

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

Static Public Member Functions

static KDGanttViewTaskLink * createFromDomElement (QDomElement &)

Member Enumeration Documentation

enum KDGanttViewTaskLink::LinkType

Defines the types a link can have.

Enumerator:
None 
FinishStart 
StartStart 
FinishFinish 
StartFinish 

Definition at line 49 of file KDGanttViewTaskLink.h.


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

Definition at line 59 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

Definition at line 103 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

Definition at line 129 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

Definition at line 81 of file KDGanttViewTaskLink.cpp.

KDGanttViewTaskLink::~KDGanttViewTaskLink (  ) 

Definition at line 143 of file KDGanttViewTaskLink.cpp.


Member Function Documentation

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 610 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 794 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 748 of file KDGanttViewTaskLink.cpp.

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 704 of file KDGanttViewTaskLink.cpp.

int KDGanttViewTaskLink::getLinkType (  )  const

Returns:
The type of this link.
See also:
setLinkType()

Definition at line 931 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 523 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 584 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 636 of file KDGanttViewTaskLink.cpp.

bool KDGanttViewTaskLink::isFromToItem ( KDGanttViewItem *  item  ) 

Definition at line 690 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 509 of file KDGanttViewTaskLink.cpp.

void KDGanttViewTaskLink::removeItemFromList ( KDGanttViewItem *  item  ) 

Removes a KDGanttViewItem from the lists.

See also:
to() from()

Definition at line 715 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 596 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 548 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 569 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 622 of file KDGanttViewTaskLink.cpp.

void KDGanttViewTaskLink::setLinkType ( int  type  ) 

Sets the link type.

Parameters:
type The type this link is set to.
See also:
getLinkType()

Definition at line 944 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 648 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 244 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 672 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 736 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 660 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 685 of file KDGanttViewTaskLink.cpp.


The documentation for this class was generated from the following files:
  • KDGanttViewTaskLink.h
  • KDGanttViewTaskLink.cpp

kdgantt1

Skip menu "kdgantt1"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal