kdgantt
KDGanttView Class Reference
#include <KDGanttView.h>
Inheritance diagram for KDGanttView:

Detailed Description
This class represents a Gantt view with the Gantt chart, the header, an optional listview and an optional legend.In order to set up a Gantt view, create an object of this class, and populate it with a number of KDGanttViewItem objects.
If you experience problems with the repainting of the content of the Gantt View after scrolling, call setRepaintMode().
Definition at line 69 of file KDGanttView.h.
Public Types | |
enum | Scale { Minute, Hour, Day, Week, Month, Auto } |
enum | YearFormat { FourDigit, TwoDigit, TwoDigitApostrophe, NoDate } |
enum | HourFormat { Hour_24, Hour_12, Hour_24_FourDigit } |
enum | RepaintMode { No, Medium, Always } |
Public Slots | |
void | editItem (KDGanttViewItem *) |
void | zoomToSelection (const QDateTime &start, const QDateTime &end) |
Signals | |
void | timeIntervallSelected (const QDateTime &start, const QDateTime &end) |
void | timeIntervalSelected (const QDateTime &start, const QDateTime &end) |
void | rescaling (Scale) |
void | itemLeftClicked (KDGanttViewItem *) |
void | itemMidClicked (KDGanttViewItem *) |
void | itemRightClicked (KDGanttViewItem *) |
void | itemDoubleClicked (KDGanttViewItem *) |
void | linkItems (KDGanttViewItem *from, KDGanttViewItem *to, int linkType) |
void | gvCurrentChanged (KDGanttViewItem *) |
void | gvItemLeftClicked (KDGanttViewItem *) |
void | gvItemMidClicked (KDGanttViewItem *) |
void | gvItemRightClicked (KDGanttViewItem *) |
void | gvMouseButtonClicked (int button, KDGanttViewItem *item, const QPoint &pos) |
void | gvItemDoubleClicked (KDGanttViewItem *) |
void | gvContextMenuRequested (KDGanttViewItem *item, const QPoint &pos) |
void | lvCurrentChanged (KDGanttViewItem *) |
void | lvItemRenamed (KDGanttViewItem *, int col, const QString &text) |
void | lvMouseButtonPressed (int button, KDGanttViewItem *item, const QPoint &pos, int c) |
void | lvItemLeftClicked (KDGanttViewItem *) |
void | lvItemMidClicked (KDGanttViewItem *) |
void | lvItemRightClicked (KDGanttViewItem *) |
void | lvContextMenuRequested (KDGanttViewItem *item, const QPoint &pos, int col) |
void | lvMouseButtonClicked (int button, KDGanttViewItem *item, const QPoint &pos, int c) |
void | lvItemDoubleClicked (KDGanttViewItem *) |
void | lvSelectionChanged (KDGanttViewItem *) |
void | itemConfigured (KDGanttViewItem *) |
void | taskLinkLeftClicked (KDGanttViewTaskLink *) |
void | taskLinkMidClicked (KDGanttViewTaskLink *) |
void | taskLinkRightClicked (KDGanttViewTaskLink *) |
void | taskLinkDoubleClicked (KDGanttViewTaskLink *) |
void | dropped (QDropEvent *e, KDGanttViewItem *droppedItem, KDGanttViewItem *itemBelowMouse) |
Public Member Functions | |
KDGanttView (QWidget *parent=0, const char *name=0) | |
virtual void | show () |
virtual bool | close (bool alsoDelete) |
void | setRepaintMode (RepaintMode mode) |
void | setUpdateEnabled (bool enable) |
bool | getUpdateEnabled () const |
void | setGanttMaximumWidth (int w) |
int | ganttMaximumWidth () const |
void | setShowLegend (bool show) |
bool | showLegend () const |
void | setLegendIsDockwindow (bool dock) |
bool | legendIsDockwindow () const |
QDockWindow * | legendDockwindow () const |
void | setShowListView (bool show) |
bool | showListView () const |
void | setEditorEnabled (bool enable) |
bool | editorEnabled () const |
void | setListViewWidth (int) |
int | listViewWidth () |
void | setEditable (bool editable) |
bool | editable () const |
void | setCalendarMode (bool mode) |
bool | calendarMode () const |
void | setDisplaySubitemsAsGroup (bool show) |
bool | displaySubitemsAsGroup () const |
void | setDisplayEmptyTasksAsLine (bool show) |
bool | displayEmptyTasksAsLine () const |
void | setHorBackgroundLines (int count=2, QBrush brush=QBrush(QColor(200, 200, 200), Qt::Dense6Pattern)) |
int | horBackgroundLines (QBrush &brush) |
bool | saveProject (QIODevice *) |
bool | loadProject (QIODevice *) |
void | print (QPrinter *printer=0, bool printListView=true, bool printTimeLine=true, bool printLegend=false) |
QSize | drawContents (QPainter *p=0, bool drawListView=true, bool drawTimeLine=true, bool drawLegend=false) |
void | setZoomFactor (double factor, bool absolute) |
double | zoomFactor () const |
void | zoomToFit () |
void | ensureVisible (KDGanttViewItem *) |
void | center (KDGanttViewItem *) |
void | centerTimeline (const QDateTime ¢er) |
void | centerTimelineAfterShow (const QDateTime ¢er) |
void | setTimelineToStart () |
void | setTimelineToEnd () |
void | addTicksLeft (int num=1) |
void | addTicksRight (int num=1) |
void | setShowTaskLinks (bool show) |
bool | showTaskLinks () const |
void | setFont (const QFont &f) |
void | setShowHeaderPopupMenu (bool show=true, bool showZoom=true, bool showScale=true, bool showTime=true, bool showYear=true, bool showGrid=true, bool showPrint=false) |
bool | showHeaderPopupMenu () const |
void | setShowTimeTablePopupMenu (bool) |
bool | showTimeTablePopupMenu () const |
void | setShapes (KDGanttViewItem::Type type, KDGanttViewItem::Shape start, KDGanttViewItem::Shape middle, KDGanttViewItem::Shape end, bool overwriteExisting=true) |
bool | shapes (KDGanttViewItem::Type type, KDGanttViewItem::Shape &start, KDGanttViewItem::Shape &middle, KDGanttViewItem::Shape &end) const |
void | setColors (KDGanttViewItem::Type type, const QColor &start, const QColor &middle, const QColor &end, bool overwriteExisting=true) |
bool | colors (KDGanttViewItem::Type type, QColor &start, QColor &middle, QColor &end) const |
void | setDefaultColor (KDGanttViewItem::Type type, const QColor &, bool overwriteExisting=true) |
QColor | defaultColor (KDGanttViewItem::Type type) const |
void | setHighlightColors (KDGanttViewItem::Type type, const QColor &start, const QColor &middle, const QColor &end, bool overwriteExisting=true) |
bool | highlightColors (KDGanttViewItem::Type type, QColor &start, QColor &middle, QColor &end) const |
void | setDefaultHighlightColor (KDGanttViewItem::Type type, const QColor &, bool overwriteExisting=true) |
QColor | defaultHighlightColor (KDGanttViewItem::Type type) const |
void | setTextColor (const QColor &color) |
QColor | textColor () const |
void | setNoInformationBrush (const QBrush &brush) |
QBrush | noInformationBrush () const |
QPtrList< KDGanttViewTaskLink > | taskLinks () const |
QPtrList< KDGanttViewTaskLinkGroup > | taskLinkGroups () const |
void | addLegendItem (KDGanttViewItem::Shape shape, const QColor &shapeColor, const QString &text) |
void | clearLegend () |
void | setHorizonStart (const QDateTime &start) |
QDateTime | horizonStart () const |
void | setHorizonEnd (const QDateTime &start) |
QDateTime | horizonEnd () const |
void | setScale (Scale) |
Scale | scale () const |
void | setMaximumScale (Scale) |
Scale | maximumScale () const |
void | setMinimumScale (Scale) |
Scale | minimumScale () const |
void | setAutoScaleMinorTickCount (int count) |
int | autoScaleMinorTickCount () const |
void | setMajorScaleCount (int count) |
int | majorScaleCount () const |
void | setMinorScaleCount (int count) |
int | minorScaleCount () const |
void | setMinimumColumnWidth (int width) |
int | minimumColumnWidth () const |
void | setYearFormat (YearFormat format) |
YearFormat | yearFormat () const |
void | setHourFormat (HourFormat format) |
HourFormat | hourFormat () const |
void | setShowMajorTicks (bool) |
bool | showMajorTicks () const |
void | setShowMinorTicks (bool) |
bool | showMinorTicks () const |
void | setColumnBackgroundColor (const QDateTime &column, const QColor &color, Scale mini=KDGanttView::Minute, Scale maxi=KDGanttView::Month) |
void | setIntervalBackgroundColor (const QDateTime &start, const QDateTime &end, const QColor &color, Scale mini=KDGanttView::Minute, Scale maxi=KDGanttView::Month) |
bool | changeBackgroundInterval (const QDateTime &oldstart, const QDateTime &oldend, const QDateTime &newstart, const QDateTime &newend) |
bool | deleteBackgroundInterval (const QDateTime &start, const QDateTime &end) |
void | clearBackgroundColor () |
QColor | columnBackgroundColor (const QDateTime &column) const |
void | setWeekendBackgroundColor (const QColor &color) |
QColor | weekendBackgroundColor () const |
void | setWeekdayBackgroundColor (const QColor &color, int weekday) |
QColor | weekdayBackgroundColor (int weekday) const |
void | setPaletteBackgroundColor (const QColor &col) |
void | setGvBackgroundColor (const QColor &) |
void | setLvBackgroundColor (const QColor &) |
void | setTimeHeaderBackgroundColor (const QColor &) |
void | setLegendHeaderBackgroundColor (const QColor &) |
QColor | gvBackgroundColor () const |
QColor | lvBackgroundColor () const |
QColor | timeHeaderBackgroundColor () const |
QColor | legendHeaderBackgroundColor () const |
void | addUserdefinedLegendHeaderWidget (QWidget *w) |
void | setWeekendDays (int start, int end) |
void | weekendDays (int &start, int &end) const |
void | setHeaderVisible (bool) |
bool | headerVisible () const |
void | setShowLegendButton (bool show) |
bool | showLegendButton () const |
virtual int | addColumn (const QString &label, int width=-1) |
virtual int | addColumn (const QIconSet &iconset, const QString &label, int width=-1) |
virtual void | removeColumn (int index) |
KDGanttViewItem * | selectedItem () const |
void | setSelected (KDGanttViewItem *, bool) |
KDGanttViewItem * | firstChild () const |
KDGanttViewItem * | lastItem () const |
int | childCount () const |
void | clear () |
void | setDragEnabled (bool b) |
void | setDropEnabled (bool b) |
void | setDragDropEnabled (bool b) |
bool | dragEnabled () const |
bool | dropEnabled () const |
bool | isDragEnabled () const |
bool | isDropEnabled () const |
virtual bool | lvDropEvent (QDropEvent *e, KDGanttViewItem *, KDGanttViewItem *) |
virtual void | lvStartDrag (KDGanttViewItem *) |
virtual bool | lvDragMoveEvent (QDragMoveEvent *e, KDGanttViewItem *, KDGanttViewItem *) |
virtual void | lvDragEnterEvent (QDragEnterEvent *e) |
QSize | sizeHint () |
KDGanttViewItem * | getItemByName (const QString &name) const |
QDateTime | getDateTimeForCoordX (int coordX, bool global=true) const |
KDGanttViewItem * | getItemByListViewPos (const QPoint &pos) const |
KDGanttViewItem * | getItemByGanttViewPos (const QPoint &pos) const |
KDGanttViewItem * | getItemAt (const QPoint &pos, bool global=true) const |
void | setLvVScrollBarMode (QScrollView::ScrollBarMode) |
void | setGvVScrollBarMode (QScrollView::ScrollBarMode) |
void | setLinkItemsEnabled (bool on) |
bool | isLinkItemsEnabled () const |
Static Public Member Functions | |
static QPixmap | getPixmap (KDGanttViewItem::Shape shape, const QColor &shapeColor, const QColor &backgroundColor, int itemSize) |
Protected Member Functions | |
virtual QDragObject * | dragObject () |
virtual void | startDrag () |
Properties | |
bool | showLegend |
bool | showListView |
bool | showTaskLinks |
bool | editorEnabled |
QDateTime | horizonStart |
QDateTime | horizonEnd |
Scale | scale |
YearFormat | yearFormat |
HourFormat | hourFormat |
bool | showMinorTicks |
bool | showMajorTicks |
bool | editable |
QColor | textColor |
int | majorScaleCount |
int | minorScaleCount |
int | autoScaleMinorTickCount |
Scale | maximumScale |
Scale | minimumScale |
int | minimumColumnWidth |
int | ganttMaximumWidth |
QColor | weekendBackgroundColor |
QColor | ganttViewBackgroundColor |
QColor | listViewBackgroundColor |
QColor | timeHeaderBackgroundColor |
QColor | legendHeaderBackgroundColor |
double | zoomFactor |
bool | showHeaderPopupMenu |
bool | showTimeTablePopupMenu |
bool | headerVisible |
bool | showLegendButton |
bool | legendIsDockwindow |
bool | displayEmptyTasksAsLine |
QBrush | noInformationBrush |
bool | dragEnabled |
bool | dropEnabled |
bool | calendarMode |
Friends | |
class | KDGanttCanvasView |
class | KDGanttViewEventItem |
class | KDGanttViewItem |
class | KDGanttViewTaskItem |
class | KDGanttViewSummaryItem |
class | KDGanttViewTaskLink |
class | KDGanttViewCalendarItem |
class | KDTimeTableWidget |
class | KDTimeHeaderWidget |
class | KDListView |
class | KDGanttViewTaskLinkGroup |
class | KDLegendWidget |
Member Enumeration Documentation
|
This enum is used to specify the hour format used in the header. Definition at line 117 of file KDGanttView.h. |
|
Please see setRepaintMode() for a description of the values of this enumeration. Definition at line 118 of file KDGanttView.h. |
|
This enum is used to specify the units of the scales in the header. Definition at line 115 of file KDGanttView.h. |
|
This enum is used to specify the year format used in the header. Definition at line 116 of file KDGanttView.h. |
Constructor & Destructor Documentation
|
Constructs an empty KDGanttView.
Definition at line 83 of file KDGanttView.cpp. |
Member Function Documentation
|
Calls to this method are passed through to the underlying QListView. Definition at line 3878 of file KDGanttView.cpp. |
|
Calls to this method are passed through to the underlying QListView. Definition at line 3868 of file KDGanttView.cpp. |
|
Adds an item to the legend.
Definition at line 1566 of file KDGanttView.cpp. |
|
Add num minor ticks of the current scale of the timeline to the start of the timeline. The timeline is not set automatically at the start. Call setTimelineToStart() to ensure that the timeline is at the start after calling this method.
Definition at line 1139 of file KDGanttView.cpp. |
|
Add num minor ticks of the current scale of the timeline to the end of the timeline. The timeline is not set automatically at the end. Call setTimelineToEnd() to ensure that the timeline is at the end after calling this method.
Definition at line 1154 of file KDGanttView.cpp. |
|
Adds a widget to the spacer widget above the list view part and below the ShowLegendButton. To assign all the space above the Listview to the spacer widget, hide the ShowLegendButton by calling setShowLegendButton( false ). The spacer widget is a QHBox. You may add as many widgets as you want. They are ordered horizontally from left to right. To remove a widget from the spacer widget, call widget->reparent(newParent,...) or delete the widget. Since the spacer is a QHBox, the layout of the added widgets is managed by this QHBox.
Definition at line 4233 of file KDGanttView.cpp. |
|
Makes sure that the specified Gantt item is in the center of the visible Gantt chart (if possible). Definition at line 1164 of file KDGanttView.cpp. |
|
Makes sure that the specified QDateTime is in the center of the visible Gantt chart (if possible). If you want to center the timeline when the KDGanttView is hidden, calling centerTimelineAfterShow() is the better alternative.
Definition at line 1082 of file KDGanttView.cpp. |
|
Makes sure that the specified QDateTime is in the center of the visible Gantt chart (if possible). If the KDGanttView is currently hidden, this method resets the center once again after the next show() call. Use this method if you want to center the timeline when the KDGanttView is hidden. After calling KDGanttView::show(), there may be computations of the sizes of the widgets and subwidgets and of the automatically computed start datetime. This method ensures that the center of the timeline is to be properly reset after show().
Definition at line 1101 of file KDGanttView.cpp. |
|
Changes the times of an already defined background color interval. The new values startnew and endnew should not be datetime values of an already defined background color interval. If that is the case, nothing is changed and false is returned.
Definition at line 1944 of file KDGanttView.cpp. |
|
Returns the number of items in the Gantt view.
Definition at line 4064 of file KDGanttView.cpp. |
|
Removes all items from the Gantt view. Definition at line 4073 of file KDGanttView.cpp. |
|
Removes all background color settings set with setColumnBackgroundColor() and setIntervalBackgroundColor(). Does not affect the settings of setWeekendBackgroundColor().
Definition at line 1977 of file KDGanttView.cpp. |
|
Removes all items from the legend.
Definition at line 1549 of file KDGanttView.cpp. |
|
Closes the widget. The closing is rejected, if a repainting is currently being done.
Definition at line 301 of file KDGanttView.cpp. |
|
Queries the colors for a particular type of Gantt item.
Definition at line 1409 of file KDGanttView.cpp. |
|
Returns the background color for the column closest to column.
Definition at line 1991 of file KDGanttView.cpp. |
|
Returns the default color for a particular type of Gantt item that is used for the item if no specific start, middle, or end colors are set.
Definition at line 2264 of file KDGanttView.cpp. |
|
Returns the default highlighting color for a particular type of Gantt item that is used for the item if no specific start, middle, or end colors are set.
Definition at line 2310 of file KDGanttView.cpp. |
|
Deletes an already defined background color interval.
Definition at line 1962 of file KDGanttView.cpp. |
|
Returns, whether new items are created with the displayHiddenSubitems property.
Definition at line 2392 of file KDGanttView.cpp. |
|
Implements a pass-through to the list view. Definition at line 4095 of file KDGanttView.cpp. |
|
Paints a Gantt view on a QPainter. You can specify, whether the list view, the time line, or the legend is painted. All combinations of these three widgets are allowed. Returns the size of the painted area. Paints the list view in the top-left corner, the time line to the right of the list view, and the legend below the list view. If called with p = 0, nothing is painted and only the size of the painted area is computed. This is useful for determining only the painted area and setting the scale of the painter, before calling this method with a painter. In order to get the output fitted to your paper and your printer, call first QSize size = drawContents( 0, printListView, printTimeLine, printLegend ); //then compute the scale dx = paper.width() / size.width(); dy = paper.height() / size.height(); //then make float scale to fit the width or height of the paper if ( dx < dy ) scale = dx; else scale = dy; // then set the scale p.scale( scale, scale ); // and now call drawContents with painter p drawContents( &p, printListView, printTimeLine, printLegend ); For a detailed example, please see the commented source code in KDGanttView::print(...)
Definition at line 938 of file KDGanttView.cpp. |
|
This signal is emitted whenever a Gantt item is dropped onto the Gantt view. droppedItem is 0, if this is a drag operation from another KDGanttView instance. If this drag is an internal drag (i.e. within the KDGanttView), this parameter points to the dropped item. itemBelowMouse is a pointer to the item below the dragged item (i.e., below the mouse). The dragged item may be inserted in the KDGanttView as a child of this item. If The value is 0, if there is no item below the dragged item, and the dragged item will be inserted as a root item. In order to get user-defined behavior for drop events, reimplement KDGanttView::lvDropEvent() |
|
This slot is called when a new item has been added to the Gantt view. It will show the item attribute dialog in case the item is editable. item is a pointer to the item that has been created. Definition at line 3732 of file KDGanttView.cpp. |
|
Makes sure that the specified Gantt item is visible without scrolling.
Definition at line 1068 of file KDGanttView.cpp. |
|
Returns the first item in the Gantt view.
Definition at line 2322 of file KDGanttView.cpp. |
|
Returns the corresponding date and time of the coordinate X in the Gantt view.
Definition at line 413 of file KDGanttView.cpp. |
|
Returns the pointer to the Gantt item at the position pos in the list view part of the Gantt view. The position pos is a global position if parameter global is true. If the vertical part (y coordinate) of pos (mapped to local coordinates) is less than 0 or larger than the height of the listview, 0 is returned. The horizontal part (x coordinate) of pos is ignored.
Definition at line 3999 of file KDGanttView.cpp. |
|
Returns the pointer to the Gantt item at the position pos in the Gantt view. The position pos is a global position. If no items are found, or the item is disabled, 0 is returned. If there is more than one item with the same position in the Gantt view, the first item found will be returned. This is not necessarily the first item in the listview.
Definition at line 3967 of file KDGanttView.cpp. |
|
Returns the pointer to the Gantt item at the position pos in the list view. The position pos is a global position. If no item is found, 0 is returned.
Definition at line 3947 of file KDGanttView.cpp. |
|
Returns the pointer to the Gantt item with the name name. If no item is found, the return value is 0. If there is more than one item with the same name in the Gantt view, the first item found will be returned. This may not necessarily be the first item in the listview.
Definition at line 3924 of file KDGanttView.cpp. |
|
This method returns the pixmap used for a certain shape, in the selected color and size.
Definition at line 3755 of file KDGanttView.cpp. |
|
Returns whether updating is enabled or not.
Definition at line 243 of file KDGanttView.cpp. |
|
Returns the background color of the Gantt view.
Definition at line 4189 of file KDGanttView.cpp. |
|
This signal is emitted when the user requests a context menu in the Gantt view. Notice that pos is the absolute mouse position. |
|
This signal is emitted whenever the user clicks on the Gantt view item parameter is 0, if no item was clicked |
|
This signal is emitted whenever the user double-clicks into the Gantt view. |
|
This signal is emitted whenever the user clicks into the Gantt view with the left mouse button. |
|
This signal is emitted whenever the user clicks into the Gantt view with the middle mouse button. |
|
This signal is emitted whenever the user clicks into the Gantt view with the right mouse button. |
|
This signal is emitted when the user clicks into the Gantt view with any mouse button. Notice that pos is the absolute mouse position. |
|
Queries the highlight colors for a particular type of Gantt item.
Definition at line 1475 of file KDGanttView.cpp. |
|
Returns the definition of the horizontal background lines of the Gantt chart.
Definition at line 2452 of file KDGanttView.cpp. |
|
Returns whether dragging is enabled for this Gantt view.
Definition at line 4301 of file KDGanttView.cpp. |
|
Returns whether dropping is enabled for this Gantt view.
Definition at line 4313 of file KDGanttView.cpp. |
|
This signal is emitted when the user has configured an item visually. |
|
This signal is emitted when the user double-clicks an item. |
|
This signal is emitted when the user clicks on an item with the left mouse button. |
|
This signal is emitted when the user clicks on an item with the middle mouse button. |
|
This signal is emitted when the user clicks on an item with the right mouse button. |
|
Returns the last item in the Gantt view
Definition at line 2463 of file KDGanttView.cpp. |
|
Returns the pointer to the legend dock window. DO NOT DELETE THIS POINTER! If the legend is not a dock window, 0 is returned To set the legend as a dock window, call KDGanttView::setLegendIsDockwindow( true );
Definition at line 646 of file KDGanttView.cpp. |
|
This signal is emitted when the user wants to link two items in the Gantt view. |
|
Returns the width of the list view.
Definition at line 4562 of file KDGanttView.cpp. |
|
Loads a previously saved state of the Gantt view. All current settings and items are discarded before loading the data.
Definition at line 805 of file KDGanttView.cpp. |
|
Returns the background color of the list view.
Definition at line 4177 of file KDGanttView.cpp. |
|
This signal is emitted whenever the user clicks on the list view item parameter is 0, if no item was clicked |
|
This virtual method specifies whether a drag enter event may be accepted or not. To accept a drag enter event, call e->accept( true ); To not accept a drag enter evente, call e->accept( false ); This method does nothing but accepting the drag enter event, in case decoding is possible. In order to define accepting drops for particular items yourself, subclass KDGanttView and reimplement this method.
Definition at line 4427 of file KDGanttView.cpp. |
|
This virtual method specifies whether a drop event may be accepted or not. To accept a drop event, call e->accept( true ); To not accept a drop event, call e->accept( false ); This method does nothing but allowing to execute the internal drag move event handling. In order to specify user-defined drop acceptance for particular items, subclass KDGanttView and reimplement this method.
Definition at line 4481 of file KDGanttView.cpp. |
|
This virtual method makes it possible to specify user-defined drop handling. The method is called directly before the internal drop handling is executed. Return false to execute internal drop handling. Return true to not execute internal drop handling. In order to specify user-defined drop handling, subclass KDGanttView and reimplement this method.
Definition at line 4363 of file KDGanttView.cpp. |
|
This signal is emitted whenever the user double-clicks into the list view. |
|
This signal is emitted whenever the user clicks into the list view with the left mouse button. |
|
This signal is emitted whenever the user clicks into the list view with the middle mouse button. |
|
This signal is emitted whenever the user clicks into the list view with the right mouse button. |
|
This signal is emitted whenever the user changes the selection in the list view. |
|
This virtual method creates a QDragObject and starts a drag for a KDGanttViewItem. In order to prevent drags of particular items, subclass from KDGanttView and reimplement this method.
Definition at line 4521 of file KDGanttView.cpp. |
|
Sends a Gantt view to a printer. The printer should already be set up for printing (by calling QPrinter::setup()). If the printer is not set up, QPrinter::setup() is called before printing You can specify, whether the ListView, TimeLine, or Legend will be printed. All combinations of these three widgets are allowed.
Definition at line 846 of file KDGanttView.cpp. |
|
Calls to this method are passed through to the underlying QListView. Definition at line 3888 of file KDGanttView.cpp. |
|
This signal is emitted if another scale is choosen than the specified one: i.e. if the horizon has a very wide range from start to end and as scale is choosen minute it may be that the size of the Gantt widget would become more than 32000 pixels. In this case the scale is automatically changed to Hour and rescaling( Hour ) is emitted. If the widget size would be still more than 32000 pixels, the scale is automatically changed to day and rescaling( Day ) is emitted. In the new scale, the minortickcount is increased such that the horizon will fit in the maximum size of 32000 pixels. |
|
Saves the state of the Gantt view in an IO device in XML format. The saved data can be reloaded with loadProject().
Definition at line 778 of file KDGanttView.cpp. |
|
Calls to this method are passed through to the underlying QListView. Definition at line 3897 of file KDGanttView.cpp. |
|
Sets the absolute number of minor ticks, if scaling is set to Auto. If the scale mode is set to Auto, then the actual scale and the minorScaleCount is automatically computed, such that there are count minor ticks
Definition at line 1712 of file KDGanttView.cpp. |
|
This method turns calendar mode on and off. In calendar mode, only those items can be opened which have subitems which have subitems. I.e., if an item contains multiple calendars, it can be opened, but not a calendar item itself. If you want to use this GanttView as a calendar view, you have to call setDisplaySubitemsAsGroup( true ); to use the root items as calendar items. To create new calendar entries for these root items, create a new KDGanttViewTaskItem with this root item as a parent. If you want an item with subitems to behave like a calendar (which is possibly empty at startup), please call setIsCalendar( true ); for this item.
Definition at line 2344 of file KDGanttView.cpp. |
|
Sets the colors for a certain type of Gantt item. Not all items use all three colors (e.g., only summary items use the middle color). This setting overrides any color settings made on individual items. These settings will be taken as initial values of any newly created item of this certain type. See also the description of the KDGanttViewItem class.
Definition at line 1377 of file KDGanttView.cpp. |
|
Sets the background color for the column closest to column. It can be specified whether the color should be shown in all scales or only in specific scales. If you want to define the color only for the daily view, specify mini and maxi as Day. If there is no value specified for mini and maxi, the color for the column is shown on all scales. Note that it is possible that there are two values for a column in a scale. In this case, the shown color is unspecified.
Definition at line 1883 of file KDGanttView.cpp. |
|
Sets the default color for a particular type of Gantt item that is used for the item if no specific start, middle, or end colors are set.
Definition at line 2237 of file KDGanttView.cpp. |
|
Sets the default highlighting color for a particular type of Gantt item that is used for the item if no specific start, middle, or end colors are set.
Definition at line 2283 of file KDGanttView.cpp. |
|
This method specifies whether tasks where the start time and the end time are the same are displayed as a line over the full height of the Gantt view.
Definition at line 2405 of file KDGanttView.cpp. |
|
This method specifies whether hidden subitems should be displayed. It iterates over all KDGanttViewItems in this Gantt view and sets their displaySubitemsAsGroup() property. All newly created items will have this setting by default.
Definition at line 2373 of file KDGanttView.cpp. |
|
Combines setDragEnabled() and setDropEnabled() in one convenient method.
Definition at line 4288 of file KDGanttView.cpp. |
|
Specifies whether drag operations are allowed in the Gantt view. Recurses over all items contained in the Gantt view and enables or disabled them for dragging.
Definition at line 4249 of file KDGanttView.cpp. |
|
Specifies whether drop operations are allowed in the Gantt view. Recurses over all items contained in the Gantt view and enables or disabled them for dropping.
Definition at line 4268 of file KDGanttView.cpp. |
|
Specifies whether the Gantt chart is user-editable.
Definition at line 748 of file KDGanttView.cpp. |
|
Specifies whether it should be possible to edit the appearance of a Gantt item visually in a dialog by double-clicking the item.
Definition at line 720 of file KDGanttView.cpp. |
|
Sets the font in the left list view widget and in the right time header widget. The settings of the fonts in the time table widget are not effected.
Definition at line 1205 of file KDGanttView.cpp. |
|
Sets the maximum width of the Gantt view part widget in pixels. The largest allowed width is 32767.
Definition at line 257 of file KDGanttView.cpp. |
|
Sets the background color of the Gantt view.
Definition at line 4126 of file KDGanttView.cpp. |
|
Sets the scrollbar mode of the time table. The default is always on. Possible values are always on and always off. It only makes sense to set this to always off if setLvVScrollBarMode() is set to always on or auto.
Definition at line 4592 of file KDGanttView.cpp. |
|
Specifies whether the listview header should be visible. By default, it is not visible.
Definition at line 383 of file KDGanttView.cpp. |
|
Sets the highlight colors for a certain type of Gantt item. Not all items use all three highlight colors (e.g., only summary items use the middle highlight color). This setting overrides any highlight color settings made on individual items. These settings will be taken as initial values of any newly created item of this certain type. See also the description of the KDGanttViewItem class.
Definition at line 1439 of file KDGanttView.cpp. |
|
Defines the horizontal background lines of the Gantt chart. Call setHorBackgroundLines() (equivalent to setHorBackgroundLines( 2, QBrush( QColor ( 240,240,240 )) ) ) to draw a light grey horizontal background line for every second Gantt item. Call setHorBackgroundLines(0) in order to not show horizontal background lines. You may specify the number of lines and the brush of the lines.
Definition at line 2437 of file KDGanttView.cpp. |
|
Sets the end of the horizon of the Gantt chart. If end is null, the horizon end is computed automatically.
Definition at line 1611 of file KDGanttView.cpp. |
|
Sets the start of the horizon of the Gantt chart. If start is null, the horizon start is computed automatically.
Definition at line 1586 of file KDGanttView.cpp. |
|
Specifies the format in which to display hours. If no hours are shown, this method has no effect.
Definition at line 1789 of file KDGanttView.cpp. |
|
Sets the background color for a time interval given by start and end. start may be later than end. If there is already a background interval with the same start and end values defined, the values (i.e. const QColor& color , Scale mini, Scale maxi) of this background interval are changed. Change the times of an already defined interval with changeBackgroundInterval(). Delete an already defined interval with deleteBackgroundInterval(). It can be defined, whether the color should be shown in all scales or only in specific scales. If you want to define the color only for the daily view, scecify mini and maxi as Day. If there is no value for mini/maxi specified, the color for the columns is shown in all scales.
Definition at line 1917 of file KDGanttView.cpp. |
|
Sets the background color of the legend header.
Definition at line 4152 of file KDGanttView.cpp. |
|
Specifies whether the legend should be shown as a dock window or not.
Definition at line 609 of file KDGanttView.cpp. |
|
This enables/disables the linking ui of KDGanttViewItems in KDGanttView. A signal linkItems() is emitted when two items shall be linked and can be used to create the actual link. Definition at line 4621 of file KDGanttView.cpp. |
|
Sets the width of the list view. Space will be taken from or given to the Gantt view.
Definition at line 4546 of file KDGanttView.cpp. |
|
Sets the background color of the list view.
Definition at line 4165 of file KDGanttView.cpp. |
|
Sets the scrollbar mode of the listview. The default is always off. Possible values are always on, always off and auto. It only makes sense to set this to always off if setGvVScrollBarMode() is set to always on.
Definition at line 4577 of file KDGanttView.cpp. |
|
Sets the number of ticks in the major scale.
Definition at line 2182 of file KDGanttView.cpp. |
|
Sets the maximum allowed time scale of the lower scale of the header.
Definition at line 1661 of file KDGanttView.cpp. |
|
Sets the minimum width that a column needs to have. If the size of the Gantt chart and the scale would make it necessary to go below this limit otherwise, the chart will automatically be made less exact.
Definition at line 1738 of file KDGanttView.cpp. |
|
Sets the minimum allowed time scale of the lower scale of the header.
Definition at line 1685 of file KDGanttView.cpp. |
|
Sets the number of ticks in the minor scale.
Definition at line 2206 of file KDGanttView.cpp. |
|
Specifies the brush in which the 'showNoInformation' line of items should be drawn.
Definition at line 1526 of file KDGanttView.cpp. |
|
This method is overridden for internal purposes. Definition at line 4113 of file KDGanttView.cpp. |
|
Specifies whether the content should be repainted after scrolling or not.
Definition at line 540 of file KDGanttView.cpp. |
|
Configures the unit of the lower scale of the header. The higher unit is computed automatically.
Definition at line 1637 of file KDGanttView.cpp. |
|
Calls to this method are passed through to the underlying QListView. Definition at line 3906 of file KDGanttView.cpp. |
|
Sets the shapes for a certain type of Gantt item. Not all items use all three shapes (e.g., only summary items use the middle shape). This setting overrides any shape settings made on individual items. These settings will be taken as initial values of any newly created item of this certain type. See also the documentation of the KDGanttViewItem class.
Definition at line 1314 of file KDGanttView.cpp. |
|
Specifies whether the configure popup menu should be shown on right click on the time header widget. This menu lets the user quickly change the zoom factor, the scale mode (minute, hour, day, week, month, auto) , the time format, the year format, the grid format, and printing. The default setting is not to show the popup menu. This functionality must be enabled explicitly by the application developer. You can disable each submenu of the popmenu.
Definition at line 1240 of file KDGanttView.cpp. |
|
Specifies whether the legend should be shown or not. Besides setting this programmatically, the user can also show/hide the legend by using the button provided for this purpose.
Definition at line 660 of file KDGanttView.cpp. |
|
Specifies whether the legend button should be visible. By default, it is visible.
Definition at line 354 of file KDGanttView.cpp. |
|
Specifies whether the listview of the Gantt view should be shown or not.
Definition at line 688 of file KDGanttView.cpp. |
|
Hides/shows the grid for the major ticks of the time header in the gantt view.
Definition at line 1818 of file KDGanttView.cpp. |
|
Hides/shows the grid for the minor ticks of the time header in the gantt view.
Definition at line 1848 of file KDGanttView.cpp. |
|
Specifies whether task links should be shown.
Definition at line 1179 of file KDGanttView.cpp. |
|
Specifies whether the add item popup menu should be shown on right click on the time table widget. This menu lets the user quickly add new items to the Gantt view (as root, as child or after an item). It also offers cutting and pasting of items. The default setting is that the popup menu is not shown. It must be enabled by the program.
Definition at line 1279 of file KDGanttView.cpp. |
|
Sets the color used for texts in the Gantt chart. Overrides all individual settings of the Gantt items.
Definition at line 1494 of file KDGanttView.cpp. |
|
Sets the background color of the time header.
Definition at line 4138 of file KDGanttView.cpp. |
|
Sets the timeline to the horizon end. Definition at line 1123 of file KDGanttView.cpp. |
|
Sets the timeline to the horizon start. Definition at line 1114 of file KDGanttView.cpp. |
|
Enables or disables updating of the content of the Gantt view. To avoid flickering in the Gantt view while inserting large amounts of Gantt items, you should call bool upd = KDGanttView::getUpdateEnabled(); KDGanttView::settUpdateEnabled( false ); ... insert items here ... KDGanttView::settUpdateEnabled( upd ); With this code, you avoid unwanted side effects with other parts in your code, where you disable (and re-enable) the update. When calling setUpdateEnabled( true ), all the content is recomputed, resized, and updated. Before calling show() for the first time, updating is disabled. When calling show(), updating is automatically enabled.
Definition at line 227 of file KDGanttView.cpp. |
|
Specifies the background color for weekday days. If no individual days are visible on the Gantt chart, this method has no visible effect. The days are specified as an intervals of integer values where 1 means Monday and 7 means Sunday.
Definition at line 2033 of file KDGanttView.cpp. |
|
Specifies the background color for weekend days. If no individual days are visible on the Gantt chart, this method has no visible effect.
Definition at line 2005 of file KDGanttView.cpp. |
|
Defines which days are considered weekends. The days are specified as an interval of integer values where 1 means Monday and 7 means Sunday. In order to define a weekend from Sunday to Monday, specify (7,1).
Definition at line 2063 of file KDGanttView.cpp. |
|
Specifies the format in which to display years. If no years are shown, this method has no effect.
Definition at line 1763 of file KDGanttView.cpp. |
|
Zooms into the Gantt chart. Values less than 1 mean zooming in, values greater than 1 mean zooming out. A zooming factor of exactly 1.0 means original size.
Definition at line 1010 of file KDGanttView.cpp. |
|
Queries the shapes for a particular type of Gantt item.
Definition at line 1347 of file KDGanttView.cpp. |
|
Updates the content of the GanttView and shows it. Automatically sets setUpdateEnabled( true ).
Definition at line 279 of file KDGanttView.cpp. |
|
Returns a useful size for the view. Returned width: sizeHint().width() of the list view + width of TimeTable Returned height: height() of TimeHeader + height() of TimeTable + height() of Legend (if shown) Definition at line 318 of file KDGanttView.cpp. |
|
Implements a pass-through to the list view. Definition at line 4104 of file KDGanttView.cpp. |
|
This signal is emitted when the user double-clicks a task link. |
|
Returns the list of task link groups in the Gantt view.
Definition at line 2486 of file KDGanttView.cpp. |
|
This signal is emitted when the user clicks on a task link with the left mouse button. |
|
This signal is emitted when the user clicks on a task link with the middle mouse button. |
|
This signal is emitted when the user clicks on a task link with the right mouse button. |
|
Returns the list of task links in the Gantt view.
Definition at line 2474 of file KDGanttView.cpp. |
|
|
|
This signal is emitted when the user selects a time interval with the mouse on the time header connect this signal to the slot void zoomToSelection( const QDateTime& start, const QDateTime& end) to obtain automatic zooming. |
|
Returns the background color for weekday days.
Definition at line 2046 of file KDGanttView.cpp. |
|
Returns which days are considered weekends.
Definition at line 2076 of file KDGanttView.cpp. |
|
Zooms such that the Gantt chart is less than the available space of the widget.
Definition at line 1037 of file KDGanttView.cpp. |
|
Zooms so that at least the selected time period is visible after the zoom.
Definition at line 1054 of file KDGanttView.cpp. |
Property Documentation
|
Returns the absolut number of minor ticks, if scaling is set to Auto
Definition at line 88 of file KDGanttView.h. |
|
Returns true, if the Gantt view is in calendar mode. See setCalendarMode() for the meaning of calendar mode.
Definition at line 108 of file KDGanttView.h. |
|
Returns, whether tasks where the start time and the end time are the same are displayed as a line over the full height of the Gantt view.
Definition at line 104 of file KDGanttView.h. |
|
Definition at line 106 of file KDGanttView.h. |
|
Definition at line 107 of file KDGanttView.h. |
|
Returns whether the Gantt chart is user-editable
Definition at line 84 of file KDGanttView.h. |
|
Returns whether it is possible to edit the appearance of a Gantt item visually in a dialog by double-clicking the item.
Definition at line 76 of file KDGanttView.h. |
|
Returns the maximum width of the Gantt view part widget in pixels. The default maximum width is 32767 pixels.
Definition at line 92 of file KDGanttView.h. |
|
Returns whether the listview header is visible.
Definition at line 101 of file KDGanttView.h. |
|
Returns the end of the horizon of the Gantt chart.
Definition at line 78 of file KDGanttView.h. |
|
Returns the start of the horizon of the Gantt chart.
Definition at line 77 of file KDGanttView.h. |
|
Returns the format in which to display hours.
Definition at line 81 of file KDGanttView.h. |
|
Returns the background color of the legend header.
Definition at line 97 of file KDGanttView.h. |
|
Returns whether the legend is shown as a dock window
Definition at line 103 of file KDGanttView.h. |
|
Returns the number of ticks per unit in the major scale.
Definition at line 86 of file KDGanttView.h. |
|
Returns the maximum allowed time scale of the lower scale of the header.
Definition at line 89 of file KDGanttView.h. |
|
Returns the minimum width a column needs to have.
Definition at line 91 of file KDGanttView.h. |
|
Returns the minimum allowed time scale of the lower scale of the header.
Definition at line 90 of file KDGanttView.h. |
|
Returns the number of ticks per unit in the minor scale.
Definition at line 87 of file KDGanttView.h. |
|
Returns the brush of the 'showNoInformation' lines
Definition at line 105 of file KDGanttView.h. |
|
Returns the unit of the lower scale of the header.
Definition at line 79 of file KDGanttView.h. |
|
Returns whether the configure popup menu should be shown on right click on the time header widget.
Definition at line 99 of file KDGanttView.h. |
|
Returns whether the legend is currently shown. The visibility of the legend can be changed both by setShowLegend(), and interactively by the user.
Definition at line 73 of file KDGanttView.h. |
|
Returns whether the legend button is visible.
Definition at line 102 of file KDGanttView.h. |
|
Returns whether the listview of the Gantt view is shown or not.
Definition at line 74 of file KDGanttView.h. |
|
Returns whether the grid is shown on the major scale.
Definition at line 83 of file KDGanttView.h. |
|
Returns whether ticks are shown on the minor scale.
Definition at line 82 of file KDGanttView.h. |
|
Returns whether task links should be shown.
Definition at line 75 of file KDGanttView.h. |
|
Returns whether the add item popup menu should be shown on right click on the time table widget.
Definition at line 100 of file KDGanttView.h. |
|
Returns the color used for texts in the Gantt chart.
Definition at line 85 of file KDGanttView.h. |
|
Returns the background color of the time header.
Definition at line 96 of file KDGanttView.h. |
|
Returns the background color for weekend days.
Definition at line 93 of file KDGanttView.h. |
|
Returns the format in which to display years.
Definition at line 80 of file KDGanttView.h. |
|
Returns the current zoom factor.
Definition at line 98 of file KDGanttView.h. |
The documentation for this class was generated from the following files: