#include <KDGanttViewItem.h>
Public Types | |
enum | Type { Event , Task , Summary } |
enum | Shape { TriangleDown , TriangleUp , Diamond , Square , Circle } |
Public Member Functions | |
virtual | ~KDGanttViewItem () |
Type | type () const |
void | setEnabled (bool on) |
bool | enabled () const |
virtual void | setOpen (bool o) |
void | setItemVisible (bool on) |
bool | itemVisible () const |
void | setEditable (bool editable) |
bool | editable () const |
void | setShowNoInformation (bool show) |
bool | showNoInformation () |
void | setDisplaySubitemsAsGroup (bool show) |
bool | displaySubitemsAsGroup () const |
void | setPriority (int prio) |
int | priority () |
virtual void | setStartTime (const TQDateTime &start) |
TQDateTime | startTime () const |
virtual void | setEndTime (const TQDateTime &end) |
TQDateTime | endTime () const |
void | setText (const TQString &text) |
TQString | text () const |
void | setListViewText (const TQString &text, int column=0) |
void | setListViewText (int column, const TQString &text) |
TQString | listViewText (int column=0) const |
void | setFont (const TQFont &font) |
TQFont | font () const |
void | setTooltipText (const TQString &text) |
TQString | tooltipText () const |
void | setWhatsThisText (const TQString &text) |
TQString | whatsThisText () const |
void | setPixmap (int column, const TQPixmap &pixmap) |
void | setPixmap (const TQPixmap &pixmap) |
const TQPixmap * | pixmap (int column=0) const |
void | setHighlight (bool) |
bool | highlight () const |
bool | subitemIsCalendar () const |
void | setShapes (Shape start, Shape middle, Shape end) |
void | shapes (Shape &start, Shape &middle, Shape &end) const |
void | setDefaultColor (const TQColor &) |
TQColor | defaultColor () const |
void | setColors (const TQColor &start, const TQColor &middle, const TQColor &end) |
void | colors (TQColor &start, TQColor &middle, TQColor &end) const |
void | setDefaultHighlightColor (const TQColor &) |
TQColor | defaultHighlightColor () const |
void | setHighlightColors (const TQColor &start, const TQColor &middle, const TQColor &end) |
void | highlightColors (TQColor &start, TQColor &middle, TQColor &end) const |
void | setTextColor (const TQColor &color) |
TQColor | textColor () const |
void | setProgress (int percent) |
void | setFloatStartTime (const TQDateTime &start) |
void | setFloatEndTime (const TQDateTime &end) |
KDGanttViewItem * | firstChild () const |
KDGanttViewItem * | nextSibling () const |
KDGanttViewItem * | parent () const |
KDGanttViewItem * | itemAbove () |
KDGanttViewItem * | itemBelow (bool includeDisabled=true) |
KDGanttViewItem * | getChildByName (const TQString &name) |
TQString | name () const |
void | createNode (TQDomDocument &doc, TQDomElement &parentElement) |
void | setMoveable (bool m) |
bool | isMoveable () const |
void | setResizeable (bool r) |
bool | isResizeable () const |
Static Public Member Functions | |
static KDGanttViewItem * | find (const TQString &name) |
static KDGanttViewItem * | createFromDomElement (KDGanttView *view, TQDomElement &element) |
static KDGanttViewItem * | createFromDomElement (KDGanttView *view, KDGanttViewItem *previous, TQDomElement &element) |
static KDGanttViewItem * | createFromDomElement (KDGanttViewItem *parent, TQDomElement &element) |
static KDGanttViewItem * | createFromDomElement (KDGanttViewItem *parent, KDGanttViewItem *previous, TQDomElement &element) |
Protected Member Functions | |
KDGanttViewItem (Type type, KDGanttView *view, const TQString &lvtext=TQString(), const TQString &name=TQString()) | |
KDGanttViewItem (Type type, KDGanttViewItem *parent, const TQString &lvtext=TQString(), const TQString &name=TQString()) | |
KDGanttViewItem (Type type, KDGanttView *view, KDGanttViewItem *after, const TQString &lvtext=TQString(), const TQString &name=TQString()) | |
KDGanttViewItem (Type type, KDGanttViewItem *parent, KDGanttViewItem *after, const TQString &lvtext=TQString(), const TQString &name=TQString()) | |
void | updateCanvasItems () |
int | getCoordY () |
TQDateTime | myChildStartTime () |
TQDateTime | myChildEndTime () |
void | generateAndInsertName (const TQString &name) |
void | moveTextCanvas (int x, int y) |
Protected Attributes | |
bool | isVisibleInGanttView |
KDCanvasLine * | startLine |
KDCanvasLine * | endLine |
KDCanvasLine * | startLineBack |
KDCanvasLine * | endLineBack |
KDCanvasLine * | actualEnd |
KDCanvasPolygonItem * | startShape |
KDCanvasPolygonItem * | midShape |
KDCanvasPolygonItem * | endShape |
KDCanvasPolygonItem * | progressShape |
KDCanvasPolygonItem * | startShapeBack |
KDCanvasPolygonItem * | midShapeBack |
KDCanvasPolygonItem * | endShapeBack |
KDCanvasPolygonItem * | floatStartShape |
KDCanvasPolygonItem * | floatEndShape |
KDGanttView * | myGanttView |
KDCanvasText * | textCanvas |
TQString | textCanvasText |
TQDateTime | myStartTime |
TQDateTime | myEndTime |
bool | isHighlighted |
bool | isEditable |
int | myItemSize |
bool | blockUpdating |
int | myProgress |
TQDateTime | myFloatStartTime |
TQDateTime | myFloatEndTime |
Detailed Description
This class represents an item in a Gantt chart.
This class is an abstract base class, it cannot be instantiated directly. Instead, you should create items of one of the subclasses. This class provides methods common to all Gantt items.
The initialization of the shapes/colors of the item works as follows:
Shapes: When a new item is created, the shapes are set to the default values for items of the type of this item, defined in the KDGanttView class with void setShapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape start, KDGanttViewItem::Shape middle, KDGanttViewItem::Shape end ); If there is no default value defined for this type, the shapes are set as follows: For TaskViewItems all three shapes are set to Square. For SummaryViewItems all three shapes are set to TriangleDown. For EventViewItems all three shapes are set to Diamond.
Colors: When a new item is created, the colors are set to the default values for items of the type of this item, defined in the KDGanttView class with void setColors( KDGanttViewItem::Type type, const TQColor& start, const TQColor& middle, const TQColor& end ); If there is no default value defined for this type, the colors of the shapes are set to the default color for items of this type, defined in the KDGanttView class with: void setDefaultColor( KDGanttViewItem::Type type, const TQColor& ); The initial default color in the KDGanttView class is set to blue for KDGanttViewItem::Event, green for KDGanttViewItem::Task, cyan for KDGanttViewItem::Summary.
Highlight Colors: When a new item is created, the highlight colors are set to the default values for items of the type of this item, defined in the KDGanttView class with: void setHighlightColors( KDGanttViewItem::Type type, const TQColor& start, const TQColor& middle, const TQColor& end ); If there is no default value defined for this type, the highlight colors of the shapes are set to the default color for items of this type, defined in the KDGanttView class with: void setDefaultHighlightColor( KDGanttViewItem::Type type, const TQColor& ); The initial default highlight color in the KDGanttView class is set to red for all types.
Start/End time: When a new item is created, the start time and the end time is set automatically. The time, which is currently displayed in the middle of the Gantt View, is set as start/end time. At startup of a newly created Gantt view, this is the current time.
The Priority: The priority is set with setPriority(). The priority determines which items are painted over which other items. The item with the highest priority is painted on top of all others. The priority for an item can be between 1 and 199. A priority less than 100 means that the item is painted below the grid in the Gantt chart. For Task items, the default priority is 50, for all other items it is 150. This feature only makes sense for an item which is a child of another item, for which displaySubitemsAsGroup() property is set to true.
The Display Mode: The display mode is set with setDisplaySubitemsAsGroup(). In the normal view mode (set with setDisplaySubitemsAsGroup( false ); ), an item is displayed in the same manner, when its child items are shown or not. In the other mode (set with setDisplaySubitemsAsGroup( true ); ), called "calendar mode", the item is displayed as follows: If the item has no children, it is displayed as usual. If the item is opened (i.e., its children are displayed), the start/end time of this item is computed automatically according to the earliest start time/latest end time of its children. The item and its children are displayed as usual. If the item is closed (i.e., its children are hidden in the left list view), the item itself is hidden, and its children are displayed on the timeline of this item instead. To control the painting of overlapping children, call setPriority() for the childs.
Blocking of user interaction to open item: If you want to block users to open items used as parents of calendar items, call KDGanttView::setCalendarMode( true );
Example 1, Color: If you create an instance of a KDGanttView class and add a SummaryViewItem without setting any color/shape values, you get an item with three shapes of the form TriangleDown in the color magenta. If the item is highlighted, the color will change to the highlight color red.
Example 2, Calender View: To use a Gantt view as a calendar view, call KDGanttView::setCalendarMode( true ); KDGanttView::setDisplaySubitemsAsGroup( true ); Insert root items in the Gantt view. Insert items as children of these root item in the Gantt view. You may use any item type as parent and child; there are no limitations. It is, however, recommended to use KDGanttViewTaskItems Actually, you may add child items to the children themselves. Such a child behaves then like a parent. Now set the start/end time of the children to specify a time interval for these items.
Definition at line 58 of file KDGanttViewItem.h.
Member Enumeration Documentation
◆ Shape
This enum is used in order to specify the shapes of a Gantt chart item.
Definition at line 62 of file KDGanttViewItem.h.
◆ Type
This enum is used in order to return the type of a Gantt chart item.
Definition at line 61 of file KDGanttViewItem.h.
Constructor & Destructor Documentation
◆ KDGanttViewItem() [1/4]
|
protected |
Constructs an empty Gantt item.
- Parameters
-
type the type of the item to insert view the Gantt view to insert this item into lvtext the text to show in the list view name the name by which the item can be identified. If no name is specified, a unique name will be generated
Definition at line 171 of file KDGanttViewItem.cpp.
◆ KDGanttViewItem() [2/4]
|
protected |
Constructs an empty Gantt item.
- Parameters
-
type the type of the item to insert parentItem a parent item under which this one goes lvtext the text to show in the list view name the name by which the item can be identified. If no name is specified, a unique name will be generated
Definition at line 191 of file KDGanttViewItem.cpp.
◆ KDGanttViewItem() [3/4]
|
protected |
Constructs an empty Gantt item.
- Parameters
-
type the type of the item to insert view the Gantt view to insert this item into after another item at the same level behind which this one should go lvtext the text to show in the list view name the name by which the item can be identified. If no name is specified, a unique name will be generated
Definition at line 212 of file KDGanttViewItem.cpp.
◆ KDGanttViewItem() [4/4]
|
protected |
Constructs an empty Gantt item.
- Parameters
-
type the type of the item to insert parentItem a parent item under which this one goes after another item at the same level behind which this one should go lvtext the text to show in the list view name the name by which the item can be identified. If no name is specified, a unique name will be generated
Definition at line 234 of file KDGanttViewItem.cpp.
◆ ~KDGanttViewItem()
|
virtual |
Destroys the object and frees any allocated resources.
Definition at line 248 of file KDGanttViewItem.cpp.
Member Function Documentation
◆ colors()
void KDGanttViewItem::colors | ( | TQColor & | start, |
TQColor & | middle, | ||
TQColor & | end | ||
) | const |
Returns the colors used for this item
- Parameters
-
start returns the start color middle returns the middle color end returns the end color
- See also
- setColors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
Definition at line 985 of file KDGanttViewItem.cpp.
◆ createFromDomElement() [1/4]
|
static |
Creates a KDGanttViewItem according to the specification in a DOM element.
- Parameters
-
view the view in which the item will be inserted previous to item behind this one should appear element the DOM element from which to read the specification
- Returns
- the newly created element
Definition at line 1648 of file KDGanttViewItem.cpp.
◆ createFromDomElement() [2/4]
|
static |
Creates a KDGanttViewItem according to the specification in a DOM element.
- Parameters
-
view the view in which the item will be inserted element the DOM element from which to read the specification
- Returns
- the newly created item
Definition at line 1617 of file KDGanttViewItem.cpp.
◆ createFromDomElement() [3/4]
|
static |
Creates a KDGanttViewItem according to the specification in a DOM element.
- Parameters
-
parent the parent item under which the item will be inserted previous to item behind this one should appear element the DOM element from which to read the specification
- Returns
- the newly created element
Definition at line 1712 of file KDGanttViewItem.cpp.
◆ createFromDomElement() [4/4]
|
static |
Creates a KDGanttViewItem according to the specification in a DOM element.
- Parameters
-
parent the parent item under which the item will be inserted element the DOM element from which to read the specification
- Returns
- the newly created element
Definition at line 1681 of file KDGanttViewItem.cpp.
◆ createNode()
void KDGanttViewItem::createNode | ( | TQDomDocument & | doc, |
TQDomElement & | parentElement | ||
) |
Creates a DOM node that describes this item.
- Parameters
-
doc the DOM document to which the node belongs parentElement the element into which to insert this node
Definition at line 1552 of file KDGanttViewItem.cpp.
◆ defaultColor()
TQColor KDGanttViewItem::defaultColor | ( | ) | const |
Returns the default color that is used for the item if no specific start, middle, or end colors are set.
- Returns
- color the default color used
- See also
- setDefaultColor(), setColors(), colors()
Definition at line 1176 of file KDGanttViewItem.cpp.
◆ defaultHighlightColor()
TQColor KDGanttViewItem::defaultHighlightColor | ( | ) | const |
Returns the default highlighting color that is used for the item if no specific start, middle, or end colors are set.
- Returns
- color the default highlighting color used
Definition at line 1220 of file KDGanttViewItem.cpp.
◆ displaySubitemsAsGroup()
bool KDGanttViewItem::displaySubitemsAsGroup | ( | ) | const |
Returns whether this item displays hidden subitems. Initial set to false.
- Returns
- true if this item displays hidden subitems, false otherwise
- See also
- setDisplaySubitemsAsGroup()
Definition at line 482 of file KDGanttViewItem.cpp.
◆ editable()
bool KDGanttViewItem::editable | ( | ) | const |
Returns whether this item is editable.
- Returns
- true if this item is editable, false otherwise
Definition at line 443 of file KDGanttViewItem.cpp.
◆ enabled()
bool KDGanttViewItem::enabled | ( | ) | const |
Returns whether this item is enabled.
- Returns
- true if this item is enabled, false otherwise
- See also
- setEnabled()
Definition at line 385 of file KDGanttViewItem.cpp.
◆ endTime()
TQDateTime KDGanttViewItem::endTime | ( | ) | const |
Returns the end time of this item.
- Returns
- the end time of this item
- See also
- setEndTime(), setStartTime(), startTime()
Definition at line 586 of file KDGanttViewItem.cpp.
◆ find()
|
static |
Returns the item with the specified name.
- Parameters
-
name the name to search for
- Returns
- the item with the specified name; 0 if no group with that name exists
Definition at line 328 of file KDGanttViewItem.cpp.
◆ firstChild()
KDGanttViewItem * KDGanttViewItem::firstChild | ( | ) | const |
Returns the first child of this item.
- Returns
- the first child of this item, 0 if this item has no children
Definition at line 1231 of file KDGanttViewItem.cpp.
◆ font()
TQFont KDGanttViewItem::font | ( | ) | const |
Returns the font used for the text in this item.
- Returns
- the font used for the text in this item
- See also
- setFont()
Definition at line 679 of file KDGanttViewItem.cpp.
◆ generateAndInsertName()
|
protected |
Generates a unique name if necessary and inserts it into the item dictionary.
Definition at line 286 of file KDGanttViewItem.cpp.
◆ getChildByName()
KDGanttViewItem * KDGanttViewItem::getChildByName | ( | const TQString & | name | ) |
If the name of this item is name (i.e., listViewText() == name), the pointer to this item is returned. Otherwise, it looks for an item with name name in the set of children and subchildren of this item.
- Parameters
-
name the name of the item
- Returns
- the pointer to the item with name name
Definition at line 2052 of file KDGanttViewItem.cpp.
◆ getCoordY()
|
protected |
Returns the y coordinate of this item.
- Returns
- the y coordinate of this item
Definition at line 1908 of file KDGanttViewItem.cpp.
◆ highlight()
bool KDGanttViewItem::highlight | ( | ) | const |
Returns whether this item is highlighted, either programmatically with setHighlight() or by the user with the mouse.
- Returns
- true if the item is highlighted
- See also
- setHighlight()
Definition at line 769 of file KDGanttViewItem.cpp.
◆ highlightColors()
void KDGanttViewItem::highlightColors | ( | TQColor & | start, |
TQColor & | middle, | ||
TQColor & | end | ||
) | const |
Returns the highlight colors used for this item
- Parameters
-
start returns the start highlight color middle returns the middle highlight color end returns the end highlight color
- See also
- setHighlightColors(), setShapes(), shapes()
Definition at line 1037 of file KDGanttViewItem.cpp.
◆ itemAbove()
KDGanttViewItem * KDGanttViewItem::itemAbove | ( | ) |
Returns the item above this item in the listview
- Returns
- the item above this item, 0 if this is the first item
Definition at line 1267 of file KDGanttViewItem.cpp.
◆ itemBelow()
KDGanttViewItem * KDGanttViewItem::itemBelow | ( | bool | includeDisabled = true | ) |
Returns the item below this item in the listview. It can be specified whether the disabled items are taken into account as well.
- Parameters
-
includeDisabled if true, disabled items are considered as well
- Returns
- the item below this item, 0 if this is the last item
Definition at line 1281 of file KDGanttViewItem.cpp.
◆ itemVisible()
bool KDGanttViewItem::itemVisible | ( | ) | const |
Returns whether this item is visible.
- Returns
- true if this item is visible, false otherwise
- See also
- setItemVisible()
Definition at line 415 of file KDGanttViewItem.cpp.
◆ listViewText()
TQString KDGanttViewItem::listViewText | ( | int | column = 0 | ) | const |
Returns the text to be shown in this item in the list view.
- Parameters
-
column the column in which the text will be shown
- Returns
- the text to be shown in this item
- See also
- setText(), setTextColor(), textColor(), text(), setListViewText()
Definition at line 654 of file KDGanttViewItem.cpp.
◆ moveTextCanvas()
|
protected |
Moves this items text.
Definition at line 2482 of file KDGanttViewItem.cpp.
◆ myChildEndTime()
|
protected |
Returns the end time of the children of this item.
- Returns
- the end time of the children of this item
Definition at line 1985 of file KDGanttViewItem.cpp.
◆ myChildStartTime()
|
protected |
Returns the start time of the children of this item.
- Returns
- the start time of the children of this item
Definition at line 1951 of file KDGanttViewItem.cpp.
◆ name()
TQString KDGanttViewItem::name | ( | ) | const |
Returns the unique name that can identify the item.
- Returns
- the unique item name
Definition at line 314 of file KDGanttViewItem.cpp.
◆ nextSibling()
KDGanttViewItem * KDGanttViewItem::nextSibling | ( | ) | const |
Returns the next sibling item of this item
- Returns
- the next sibling item of this item, 0 if this item has no more siblings
Definition at line 1244 of file KDGanttViewItem.cpp.
◆ parent()
KDGanttViewItem * KDGanttViewItem::parent | ( | ) | const |
Returns the parent item of this item
- Returns
- the parent item of this item, 0 if this item is a top-level item
Definition at line 1256 of file KDGanttViewItem.cpp.
◆ pixmap()
const TQPixmap * KDGanttViewItem::pixmap | ( | int | column = 0 | ) | const |
Returns a pixmap that is shown in the listview.
- Parameters
-
column the column for which to query the pixmap
- Returns
- a pointer to the pixmap shown
- See also
- setPixmap()
Definition at line 1129 of file KDGanttViewItem.cpp.
◆ priority()
int KDGanttViewItem::priority | ( | ) |
Returns the priority of this item.
- Returns
- the priority of this item
- See also
- setDisplaySubitemsAsGroup()
Definition at line 523 of file KDGanttViewItem.cpp.
◆ setColors()
void KDGanttViewItem::setColors | ( | const TQColor & | start, |
const TQColor & | middle, | ||
const TQColor & | end | ||
) |
Specifies the colors in which to draw the shapes of this item.
It is advisable not to use this method, but rather set the colors for all items of a type with KDGanttView::setColors() in order to get a uniform Gantt view.
- Parameters
-
start the color for the start shape middle the color for the middle shape end the color for the end shape
- See also
- colors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
Definition at line 957 of file KDGanttViewItem.cpp.
◆ setDefaultColor()
void KDGanttViewItem::setDefaultColor | ( | const TQColor & | color | ) |
Sets the default color that is used for the item if no specific start, middle, or end colors are set.
It is advisable not to use this method, but rather set the colors for all items of a type with KDGanttView::setDefaultColor() in order to get a uniform Gantt view.
If the item displays its subitems (children) as a group, (displaySubitemsAsGroup() == true) all changes apply to all subitems as well.
- Parameters
-
color the default color to use
- See also
- defaultColor(), setColors(), colors()
Definition at line 1150 of file KDGanttViewItem.cpp.
◆ setDefaultHighlightColor()
void KDGanttViewItem::setDefaultHighlightColor | ( | const TQColor & | color | ) |
Sets the default highlighting color that is used for the item if no specific start, middle, or end colors are set.
It is advisable not to use this method, but rather set the colors for all items of a type with KDGanttView::setDefaultHighlightColor() in order to get a uniform Gantt view.
If the item displays its subitems (children) as a group, (displaySubitemsAsGroup() == true) all changes apply to all subitems as well.
- Parameters
-
color the default highlighting color to use
Definition at line 1197 of file KDGanttViewItem.cpp.
◆ setDisplaySubitemsAsGroup()
void KDGanttViewItem::setDisplaySubitemsAsGroup | ( | bool | show | ) |
Specifies whether this item shows hidden subitems on its timeline. Useful to get a so called "calendar view" with many items in one row. When displaySubitemsAsGroup() is set to true, this item has a normal view, when it is expanded. If it is not expanded (and has at least one child), the item itself is hidden, and all children are displayed instead. To manage the painting priority of the childs (if overlapping), you may set priority() of these items.
- Parameters
-
show pass true to make this item displaying hidden subitems
Definition at line 461 of file KDGanttViewItem.cpp.
◆ setEditable()
void KDGanttViewItem::setEditable | ( | bool | editable | ) |
Specifies whether this item is editable. The whole Gantt view needs to be editable as well for this to have any effect.
- Parameters
-
editable pass true to make this item editable
Definition at line 430 of file KDGanttViewItem.cpp.
◆ setEnabled()
void KDGanttViewItem::setEnabled | ( | bool | on | ) |
Specifies whether this item is enabled. If disabled, the item stays in the Gantt view and the item is shown in gray to show that the item is disabled. All signals of this item (like itemLeftClicked( this )) are blocked. If the item displays its subitems (childs) as a group, (displaySubitemsAsGroup() == true) all changes apply to all subitems as well.
- Parameters
-
on pass true to make this item editable
- See also
- enabled ()
Definition at line 362 of file KDGanttViewItem.cpp.
◆ setEndTime()
|
virtual |
Specifies the end time of this item. The parameter must be valid and non-null. If the parameter is invalid or null, no value is set. Reimplemented in the subclasses
- Parameters
-
end the end time
- See also
- endTime(), setStartTime(), startTime()
Reimplemented in KDGanttViewTaskItem, and KDGanttViewSummaryItem.
Definition at line 562 of file KDGanttViewItem.cpp.
◆ setFloatEndTime()
void KDGanttViewItem::setFloatEndTime | ( | const TQDateTime & | end | ) |
Specifies the float end time of this item. If the time is invalid, the end float is not shown.
- Parameters
-
end the float end time
Definition at line 2548 of file KDGanttViewItem.cpp.
◆ setFloatStartTime()
void KDGanttViewItem::setFloatStartTime | ( | const TQDateTime & | start | ) |
Specifies the float start time of this item. If the time is invalid, the start float is not shown.
- Parameters
-
start the float start time
Definition at line 2537 of file KDGanttViewItem.cpp.
◆ setFont()
void KDGanttViewItem::setFont | ( | const TQFont & | font | ) |
Sets the font to be used for the text in this item.
- Parameters
-
font the font to be shown
- See also
- font()
Definition at line 666 of file KDGanttViewItem.cpp.
◆ setHighlight()
void KDGanttViewItem::setHighlight | ( | bool | highlight | ) |
Specifies whether this item should be shown highlighted. The user can also highlight items with the mouse. If the item displays its subitems (children) as a group (displaySubitemsAsGroup() == true), all changes apply to all subitems as well.
- Parameters
-
highlight true in order to highlight, false in order to turn highlighting off for this item
- See also
- highlight()
Definition at line 746 of file KDGanttViewItem.cpp.
◆ setHighlightColors()
void KDGanttViewItem::setHighlightColors | ( | const TQColor & | start, |
const TQColor & | middle, | ||
const TQColor & | end | ||
) |
Specifies the highlight colors in which to draw the shapes of this item.
It is advisable not to use this method, but rather set the highlight colors for all items of a type with KDGanttView::setHighlightColors() in order to get a uniform Gantt view.
If the item displays its subitems (children) as a group, (displaySubitemsAsGroup() == true) all changes apply to all subitems as well.
- Parameters
-
start the highlight color for the start shape middle the highlight color for the middle shape end the highlight color for the end shape
- See also
- highlightColors(), setShapes(), shapes()
Definition at line 1011 of file KDGanttViewItem.cpp.
◆ setItemVisible()
void KDGanttViewItem::setItemVisible | ( | bool | on | ) |
Specifies whether this item is visible.
- Parameters
-
on pass true to make this item visible
- See also
- itemVisible ()
Definition at line 398 of file KDGanttViewItem.cpp.
◆ setListViewText() [1/2]
void KDGanttViewItem::setListViewText | ( | const TQString & | text, |
int | column = 0 |
||
) |
- Deprecated:
- Use setListViewTest( int, const TQString& ) instead
Definition at line 627 of file KDGanttViewItem.cpp.
◆ setListViewText() [2/2]
void KDGanttViewItem::setListViewText | ( | int | column, |
const TQString & | text | ||
) |
Sets the text to be shown in this item in the list view.
- Parameters
-
column the column in which the text will be shown text the text to be shown
- See also
- text(), setTextColor(), textColor(), setText(), listViewText()
Definition at line 640 of file KDGanttViewItem.cpp.
◆ setOpen()
|
virtual |
This method is reimplemented for internal purposes.
Definition at line 1374 of file KDGanttViewItem.cpp.
◆ setPixmap() [1/2]
void KDGanttViewItem::setPixmap | ( | const TQPixmap & | pixmap | ) |
- Deprecated:
- use setPixmap( int, const TQPixmap& ) instead
Definition at line 1116 of file KDGanttViewItem.cpp.
◆ setPixmap() [2/2]
void KDGanttViewItem::setPixmap | ( | int | column, |
const TQPixmap & | pixmap | ||
) |
Sets the pixmap that is shown in the listview.
- Parameters
-
column the column in which the pixmap is shown pixmap the pixmap to show
- See also
- pixmap()
Definition at line 1108 of file KDGanttViewItem.cpp.
◆ setPriority()
void KDGanttViewItem::setPriority | ( | int | prio | ) |
Specifies the priority of this item. Valid values are between 1 and 199. A priority less than 100 means that the item is painted in the Gantt chart below the grid. A priority more than 100 means that the item is painted in the Gantt chart over the grid. For a value of 100, the behavior is unspecified. An item with a higher priority is painted over an item with a lower priority in the Gantt chart. The painting order of items with the same priority is unspecified. For Calendar items, the default priority is 50, for all other items it is 150. This feature makes only sense for an item which is a child of another item, which displaySubitemsAsGroup() property is set to true.
- Parameters
-
prio the new priority of this item.
- See also
- priority(), displaySubitemsAsGroup()
Definition at line 507 of file KDGanttViewItem.cpp.
◆ setProgress()
void KDGanttViewItem::setProgress | ( | int | percent | ) |
Specifies the progress of this item in percent. Progress is limited to minimum 0, maximum 100.
- Parameters
-
percent the progress in percent.
Definition at line 2525 of file KDGanttViewItem.cpp.
◆ setShapes()
Specifies the shapes to be used for this item.
It is advisable not to use this method, but rather set the shapes for all items of a type with KDGanttView::setShapes() in order to get a uniform Gantt view.
- Parameters
-
start the start shape middle the middle shape end the end shape
- See also
- shapes(), setColors(), colors()
Definition at line 787 of file KDGanttViewItem.cpp.
◆ setShowNoInformation()
void KDGanttViewItem::setShowNoInformation | ( | bool | show | ) |
Specifies whether the 'showNoInformation' line should be shown for this item. The 'showNoInformation' line is drawn over the whole timeline. The height of the line is the height of the item. The brush of the line is specified by KDGanttView::setNoInformationBrush(). (i.e. the same brush for all items of the Gantt view). The default brush is TQBrush( TQColor ( 100,100,100 ), TQt::FDiagPattern );
- Parameters
-
show if true, the 'showNoInformation' line is shown for this item
- See also
- showNoInformation(), KDGanttView::setNoInformationBrush(), KDGanttView::noInformationBrush()
Definition at line 2037 of file KDGanttViewItem.cpp.
◆ setStartTime()
|
virtual |
Specifies the start time of this item. The parameter must be valid and non-null. If the parameter is invalid or null, no value is set. Reimplemented in the subclasses.
- Parameters
-
start the start time
- See also
- startTime(), setEndTime(), endTime()
Reimplemented in KDGanttViewTaskItem, KDGanttViewSummaryItem, and KDGanttViewEventItem.
Definition at line 537 of file KDGanttViewItem.cpp.
◆ setText()
void KDGanttViewItem::setText | ( | const TQString & | text | ) |
Sets the text to be shown in this item in the Gantt view. For a KDGanttViewTaskItem witht displaySubitemsAsGroup() == true, the text is shown in the item itself and the text is truncated automatically, if it does not fit in the item. For all other item types, the text is shown to the right of the item.
- Parameters
-
text the text to be shown
- See also
- text(), setTextColor(), textColor(), setListViewText(), listViewText()
Definition at line 603 of file KDGanttViewItem.cpp.
◆ setTextColor()
void KDGanttViewItem::setTextColor | ( | const TQColor & | color | ) |
Specifies the color to be used for the text of this item.
It is advisable not to use this method, but rather set the text color for all items with KDGanttView::setTextColor() in order to get a uniform Gantt view. If the item displays its subitems (children) as a group, (displaySubitemsAsGroup() == true) all changes apply to all subitems as well.
- Parameters
-
color the text color
- See also
- textColor(), setText(), text()
Definition at line 1057 of file KDGanttViewItem.cpp.
◆ setTooltipText()
void KDGanttViewItem::setTooltipText | ( | const TQString & | text | ) |
Sets the text to show in a tooltip for this item.
- Parameters
-
text the tooltip text
- See also
- tooltipText()
Definition at line 691 of file KDGanttViewItem.cpp.
◆ setWhatsThisText()
void KDGanttViewItem::setWhatsThisText | ( | const TQString & | text | ) |
Sets the text to show in a What's This window for this item.
- Parameters
-
text the what's this text
- See also
- whatsThisText()
Definition at line 716 of file KDGanttViewItem.cpp.
◆ shapes()
Returns the shapes used for this item
- Parameters
-
start returns the start shape middle returns the middle shape end returns the end shape
- See also
- setShapes(), setColors(), colors()
Definition at line 937 of file KDGanttViewItem.cpp.
◆ showNoInformation()
bool KDGanttViewItem::showNoInformation | ( | ) |
Returns whether the 'showNoInformation' line should be shown for this item
- Returns
- true if showNoInformation line should be shown
- See also
- setShowNoInformation(), KDGanttView::setNoInformationBrush(), KDGanttView::noInformationBrush()
Definition at line 2020 of file KDGanttViewItem.cpp.
◆ startTime()
TQDateTime KDGanttViewItem::startTime | ( | ) | const |
Returns the start time of this item.
- Returns
- the start time of this item
- See also
- setStartTime(), setEndTime(), endTime()
Definition at line 548 of file KDGanttViewItem.cpp.
◆ subitemIsCalendar()
bool KDGanttViewItem::subitemIsCalendar | ( | ) | const |
Returns whether this item has at least one subitem that is a calendar. A subitem is a calendar, if that item has at least one subitem or displaySubitemAsGroup() is true for that item.
- Returns
- true if the item has at least one subitem that is a calendar.
Definition at line 2085 of file KDGanttViewItem.cpp.
◆ text()
TQString KDGanttViewItem::text | ( | ) | const |
Returns the text to be shown in this item in the Gantt view.
- Returns
- the text to be shown in this item
Definition at line 618 of file KDGanttViewItem.cpp.
◆ textColor()
TQColor KDGanttViewItem::textColor | ( | ) | const |
Returns the color used for the text of this item.
- Returns
- the text color
- See also
- setTextColor(), setText(), text()
Definition at line 1080 of file KDGanttViewItem.cpp.
◆ tooltipText()
TQString KDGanttViewItem::tooltipText | ( | ) | const |
Returns the tooltip text of this item
- Returns
- the tooltip text
- See also
- setTooltipText()
Definition at line 703 of file KDGanttViewItem.cpp.
◆ type()
KDGanttViewItem::Type KDGanttViewItem::type | ( | ) | const |
Returns the type of the item. This may be Event, Task, Summary.
- Returns
- the type of the item
Definition at line 344 of file KDGanttViewItem.cpp.
◆ updateCanvasItems()
|
protected |
Updates the colors of the item, but not the coordinates.
Definition at line 1304 of file KDGanttViewItem.cpp.
◆ whatsThisText()
TQString KDGanttViewItem::whatsThisText | ( | ) | const |
Returns the what's this text of this item
- Returns
- the what's this text
- See also
- setWhatsThisText()
Definition at line 729 of file KDGanttViewItem.cpp.
Member Data Documentation
◆ actualEnd
|
protected |
the line at the actual end of the item
Definition at line 87 of file KDGanttViewItem.h.
◆ blockUpdating
|
protected |
if true, updates to this item are currently blocked, to reduce flicker or speed up redraws
Definition at line 97 of file KDGanttViewItem.h.
◆ endLine
|
protected |
the line at the end of the item
Definition at line 86 of file KDGanttViewItem.h.
◆ endLineBack
|
protected |
the background line at the end of the item
Definition at line 87 of file KDGanttViewItem.h.
◆ endShape
|
protected |
the shape at the end of the item
Definition at line 88 of file KDGanttViewItem.h.
◆ endShapeBack
|
protected |
the background shape at the end of the item
Definition at line 89 of file KDGanttViewItem.h.
◆ isEditable
|
protected |
whether this item is currently editable or not
Definition at line 95 of file KDGanttViewItem.h.
◆ isHighlighted
|
protected |
whether this item is currently highlighted or not
Definition at line 95 of file KDGanttViewItem.h.
◆ isVisibleInGanttView
|
protected |
this instance variable is true if the item is visible in the Gantt view
Definition at line 80 of file KDGanttViewItem.h.
◆ midShape
|
protected |
the shape in the middle of the item
Definition at line 88 of file KDGanttViewItem.h.
◆ midShapeBack
|
protected |
the background shape in the middle of the item
Definition at line 89 of file KDGanttViewItem.h.
◆ myEndTime
|
protected |
the ending time of this item
Definition at line 94 of file KDGanttViewItem.h.
◆ myGanttView
|
protected |
a pointer to the KDGanttView object to which this item belongs
Definition at line 91 of file KDGanttViewItem.h.
◆ myItemSize
|
protected |
the current size of this item
Definition at line 96 of file KDGanttViewItem.h.
◆ myStartTime
|
protected |
the starting time of this item
Definition at line 94 of file KDGanttViewItem.h.
◆ startLine
|
protected |
Specifies whether this item should behave like a calendar. In calendar mode, only those items can be opened which have subitems which have subitems. An item which has subitems which have no subitems is called a calendar. I.e., an item that contains multiple calendars can be opened, while a calendar item itself cannot. But if all calendars of an item do not have any subitem (e.g at startup), the program cannot detect automatically that it should be possible to open this item. To enable this, call setIsCalendar( true ); for at least one calendar
- Parameters
-
cal true in order behave this item like a calendar highlighting off for this item
- See also
- isCalendar()
Returns whether this item behaves like a calendar, even though it has no subitem which has subitems; when highlighting with setHighlight() or by the user with the mouse.
- Returns
- true if the item behaves like a calendar
- See also
- setIsCalendar()
the line at the beginning of the item
Definition at line 86 of file KDGanttViewItem.h.
◆ startLineBack
|
protected |
the background line at the beginning of the item
Definition at line 87 of file KDGanttViewItem.h.
◆ startShape
|
protected |
the shape at the beginning of the item
Definition at line 88 of file KDGanttViewItem.h.
◆ startShapeBack
|
protected |
the background shape at the beginning of the item
Definition at line 89 of file KDGanttViewItem.h.
◆ textCanvas
|
protected |
the text object that is used for this item
Definition at line 92 of file KDGanttViewItem.h.
◆ textCanvasText
|
protected |
the actual string that is displayed in the text object for this item
Definition at line 93 of file KDGanttViewItem.h.
The documentation for this class was generated from the following files: