kdgantt
KDTimeHeaderWidget Class Reference
List of all members.Detailed Description
Definition at line 75 of file KDGanttViewSubwidgets.h.
Public Types | |
typedef KDGanttView::Scale | Scale |
typedef KDGanttView::YearFormat | YearFormat |
typedef KDGanttView::HourFormat | HourFormat |
typedef QValueList< DateTimeColor > | ColumnColorList |
typedef QValueList< DateTimeColor > | IntervalColorList |
Public Slots | |
void | setSettings (int) |
void | checkWidth (int) |
void | addTickRight (int num=1) |
void | addTickLeft (int num=1) |
void | preparePopupMenu () |
Signals | |
void | sizeChanged (int) |
Public Member Functions | |
KDTimeHeaderWidget (QWidget *parent, KDGanttView *gant) | |
~KDTimeHeaderWidget () | |
QString | getToolTipText (QPoint p) |
void | zoomToFit () |
void | zoom (double, bool absolute=true) |
void | zoomToSelection (QDateTime startTime, QDateTime endTime) |
double | zoomFactor () |
void | setAutoScaleMinorTickCount (int count) |
int | autoScaleMinorTickCount () |
void | setHorizonStart (const QDateTime &start) |
QDateTime | horizonStart () const |
void | setHorizonEnd (const QDateTime &start) |
QDateTime | horizonEnd () const |
void | setMaximumScale (Scale) |
KDTimeHeaderWidget::Scale | maximumScale () const |
void | setMinimumScale (Scale) |
KDTimeHeaderWidget::Scale | minimumScale () const |
KDTimeHeaderWidget::Scale | scale () 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) |
KDTimeHeaderWidget::YearFormat | yearFormat () const |
void | setHourFormat (HourFormat format) |
KDTimeHeaderWidget::HourFormat | hourFormat () const |
void | setShowMajorTicks (bool) |
bool | showMajorTicks () const |
void | setShowMinorTicks (bool) |
void | setScale (Scale unit) |
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 | setWeekendDays (int start, int end) |
void | weekendDays (int &start, int &end) const |
void | computeTicks (bool doNotComputeRealScale=false) |
void | paintEvent (QPaintEvent *) |
int | getCoordX (QDate) |
int | getCoordX (QDateTime) |
QDateTime | getDateTimeForIndex (int coordX, bool local=true) |
void | setShowPopupMenu (bool show, bool showZoom, bool showScale, bool showTime, bool showYear, bool showGrid, bool showPrint) |
bool | registerStartTime () |
bool | registerEndTime () |
bool | showPopupMenu () const |
ColumnColorList | columnBackgroundColorList () const |
void | repaintMe (int left, int wid, QPainter *p=0) |
void | centerDateTime (const QDateTime ¢er) |
Public Attributes | |
QColor | weekdayColor [8] |
Friends | |
class | KDTimeTableWidget |
class | KDGanttViewItem |
class | KDGanttView |
Classes | |
struct | DateTimeColor |
Member Function Documentation
void KDTimeHeaderWidget::setHorizonStart | ( | const QDateTime & | start | ) |
Sets the start of the horizon of the Gantt chart. If start is null, the horizon start is computed automatically.
- Parameters:
-
start the start of the horizon
- See also:
- horizonStart()
Definition at line 1191 of file KDGanttViewSubwidgets.cpp.
QDateTime KDTimeHeaderWidget::horizonStart | ( | ) | const |
Returns the start of the horizon of the Gantt chart.
- Returns:
- the start of the horizon of the Gantt chart
- See also:
- setHorizonStart()
Definition at line 1205 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setHorizonEnd | ( | const QDateTime & | start | ) |
Sets the end of the horizon of the Gantt chart. If end is null, the horizon end is computed automatically.
- Parameters:
-
end the end of the horizon
- See also:
- setHorizonEnd()
Definition at line 1218 of file KDGanttViewSubwidgets.cpp.
QDateTime KDTimeHeaderWidget::horizonEnd | ( | ) | const |
Returns the end of the horizon of the Gantt chart.
- Returns:
- the end of the horizon of the Gantt chart
- See also:
- setHorizonEnd()
Definition at line 1233 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setMaximumScale | ( | Scale | unit | ) |
Sets the maximal allowed time scale of the lower scale of the header.
- Parameters:
-
unit the unit of the lower scale of the header.
- See also:
- scale()
Definition at line 1276 of file KDGanttViewSubwidgets.cpp.
KDTimeHeaderWidget::Scale KDTimeHeaderWidget::maximumScale | ( | ) | const |
Returns the maximal allowed time scale of the lower scale of the header.
- Returns:
- the unit of the lower scale of the header.
- See also:
- setScale()
Definition at line 1289 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setMinimumScale | ( | Scale | unit | ) |
Sets the minimal allowed time scale of the lower scale of the header.
- Parameters:
-
unit the unit of the lower scale of the header.
- See also:
- scale()
Definition at line 1301 of file KDGanttViewSubwidgets.cpp.
KDTimeHeaderWidget::Scale KDTimeHeaderWidget::minimumScale | ( | ) | const |
Returns the minimal allowed time scale of the lower scale of the header.
- Returns:
- the unit of the lower scale of the header.
- See also:
- setScale()
Definition at line 1314 of file KDGanttViewSubwidgets.cpp.
KDTimeHeaderWidget::Scale KDTimeHeaderWidget::scale | ( | ) | const |
Returns the unit of the lower scale of the header.
- Returns:
- the unit of the lower scale of the header.
- See also:
- setScale()
Definition at line 1264 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setMajorScaleCount | ( | int | count | ) |
Sets the number of ticks in the major scale.
- Parameters:
-
count the number of ticks in the major scale
Definition at line 1786 of file KDGanttViewSubwidgets.cpp.
int KDTimeHeaderWidget::majorScaleCount | ( | ) | const |
Returns the number of ticks per unit in the major scale.
- Returns:
- the number of ticks in the major scale
Definition at line 1799 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setMinorScaleCount | ( | int | count | ) |
Sets the number of ticks in the minor scale.
- Parameters:
-
count the number of ticks in the minor scale
- See also:
- minorScaleCount, setMajorScaleCount, majorScaleCount()
Definition at line 1811 of file KDGanttViewSubwidgets.cpp.
int KDTimeHeaderWidget::minorScaleCount | ( | ) | const |
Returns the number of ticks per unit in the minor scale.
- Returns:
- the number of ticks in the minor scale
Definition at line 1824 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setMinimumColumnWidth | ( | int | width | ) |
Sets the minimum width 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.
- Parameters:
-
width the minimum column width
- See also:
- minimumColumnWidth()
Definition at line 1328 of file KDGanttViewSubwidgets.cpp.
int KDTimeHeaderWidget::minimumColumnWidth | ( | ) | const |
Returns the minimum width a column needs to have.
- Returns:
- the column minimum width
- See also:
- setMinimumColumnWidth()
Definition at line 1341 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setYearFormat | ( | YearFormat | format | ) |
Specifies the format in which to display years. If no years are shown, this method has no effect.
- Parameters:
-
format the year format
- See also:
- yearFormat(), setHourFormat(), hourFormat()
Definition at line 1354 of file KDGanttViewSubwidgets.cpp.
KDTimeHeaderWidget::YearFormat KDTimeHeaderWidget::yearFormat | ( | ) | const |
Returns the format in which to display years.
- Returns:
- the year format
- See also:
- setYearFormat(), setHourFormat(), hourFormat()
Definition at line 1367 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setHourFormat | ( | HourFormat | format | ) |
Specifies the format in which to display hours. If no hours are shown, this method has no effect.
- Parameters:
-
format the hour format
- See also:
- hourFormat(), setYearFormat(), yearFormat()
Definition at line 1380 of file KDGanttViewSubwidgets.cpp.
KDTimeHeaderWidget::HourFormat KDTimeHeaderWidget::hourFormat | ( | ) | const |
Returns the format in which to display hours.
- Returns:
- the hour format
- See also:
- setHourFormat(), setYearFormat(), yearFormat()
Definition at line 1393 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setShowMajorTicks | ( | bool | show | ) |
Specifies whether ticks should be shown on the major scale.
- Parameters:
-
show true in order to show ticks, false in order to hide them
- See also:
- showMajorTicks(), setShowMinorTicks(), showMinorTicks()
Definition at line 1405 of file KDGanttViewSubwidgets.cpp.
bool KDTimeHeaderWidget::showMajorTicks | ( | ) | const |
Returns whether ticks are shown on the major scale.
- Returns:
- true if ticks are shown on the major scale
Definition at line 1421 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setShowMinorTicks | ( | bool | show | ) |
Specifies whether ticks should be shown on the minor scale.
- Parameters:
-
show true in order to show ticks, false in order to hide them
- See also:
- showMinorTicks(), setShowMajorTicks(), showMajorTicks()
Definition at line 1433 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setScale | ( | Scale | unit | ) |
Configures the unit of the lower scale of the header. The higher unit is computed automatically. Resets the zoomng factor to 1 (i.e. 100%).
- Parameters:
-
unit the unit of the lower scale of the header.
- See also:
- scale()
Definition at line 1247 of file KDGanttViewSubwidgets.cpp.
bool KDTimeHeaderWidget::showMinorTicks | ( | ) | const |
Returns whether ticks are shown on the minor scale.
- Returns:
- true if ticks are shown on the minor scale
Definition at line 1449 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setColumnBackgroundColor | ( | const QDateTime & | column, | |
const QColor & | color, | |||
Scale | mini = KDGanttView::Minute , |
|||
Scale | maxi = KDGanttView::Month | |||
) |
Sets the background color for the column closest to column.
- Parameters:
-
column the column to set the background color for color the background color
Definition at line 1463 of file KDGanttViewSubwidgets.cpp.
QColor KDTimeHeaderWidget::columnBackgroundColor | ( | const QDateTime & | column | ) | const |
Returns the background color for the column closes to column.
- Parameters:
-
column the column to query the background color for
- Returns:
- the background color of the specified column
Definition at line 1677 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setWeekendBackgroundColor | ( | const QColor & | color | ) |
Specifies the background color for weekend days. If no individual days are visible on the Gantt chart, this method has no visible effect.
- Parameters:
-
color the background color to use for weekend days.
Definition at line 1699 of file KDGanttViewSubwidgets.cpp.
QColor KDTimeHeaderWidget::weekendBackgroundColor | ( | ) | const |
Returns the background color for weekend days.
- Returns:
- the background color for weekend days
Definition at line 1712 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setWeekdayBackgroundColor | ( | const QColor & | color, | |
int | weekday | |||
) |
Specifies the background color for week days. If no individual days are visible on the Gantt chart, this method has no visible effect. The days are specified as an interval of integer values where 1 means Monday and 7 means Sunday.
- Parameters:
-
color the background color to use for weekend days. weekday the day of the week (Monday = 1, Sunday = 7)
Definition at line 1727 of file KDGanttViewSubwidgets.cpp.
QColor KDTimeHeaderWidget::weekdayBackgroundColor | ( | int | weekday | ) | const |
Returns the background color for weekday days.
- Parameters:
-
the day of the week (Monday = 1, Sunday = 7)
- Returns:
- the background color for weekend days
Definition at line 1741 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::setWeekendDays | ( | int | start, | |
int | end | |||
) |
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).
- Parameters:
-
start the first day of the weekend end the last day of the weekend
Definition at line 1757 of file KDGanttViewSubwidgets.cpp.
void KDTimeHeaderWidget::weekendDays | ( | int & | start, | |
int & | end | |||
) | const |
Returns which days are considered weekends.
- Parameters:
-
start in this parameter, the first day of the weekend is returned end in this parameter, the end day of the weekend is returned
Definition at line 1772 of file KDGanttViewSubwidgets.cpp.
The documentation for this class was generated from the following files: