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

kdgantt1

KDTimeHeaderWidget Class Reference

#include <KDGanttViewSubwidgets.h>

Inheritance diagram for KDTimeHeaderWidget:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 68 of file KDGanttViewSubwidgets.h.


Public Types

typedef QValueList< DateTimeColor > ColumnColorList
typedef KDGanttView::HourFormat HourFormat
typedef QValueList
< KDIntervalColorRectangle * > 
IntervalColorList
typedef KDGanttView::Scale Scale
typedef KDGanttView::ShowTicksType ShowTicksType
typedef KDGanttView::YearFormat YearFormat

Public Slots

void addTickLeft (int num=1)
void addTickRight (int num=1)
void center (const QDate &dt)
void centerCurrentMonth ()
void centerCurrentWeek ()
void centerCurrentYear ()
void centerLastMonth ()
void centerLastWeek ()
void centerLastYear ()
void centerToday ()
void centerYesterday ()
void checkWidth (int)
void gridSettings (int i)
void preparePopupMenu ()
void setHourFormat (int i)
void setScale (int i)
void setYearFormat (int i)
void showCurrentMonth ()
void showCurrentWeek ()
void showCurrentYear ()
void showLastMonth ()
void showLastWeek ()
void showLastYear ()
void showToday ()
void showYesterday ()
void zoom1 ()
void zoom12 ()
void zoom2 ()
void zoom6 ()
void zoomOut12 ()
void zoomOut2 ()
void zoomOut6 ()
void zoomTo (Scale unit, const QDate &start, const QDate &end)

Signals

void sizeChanged (int)

Public Member Functions

void addIntervalBackgroundColor (KDIntervalColorRectangle *newItem)
int autoScaleMinorTickCount ()
void centerDateTime (const QDateTime &center, bool changeHorizon=false)
void clearBackgroundColor ()
QColor columnBackgroundColor (const QDateTime &column) const
ColumnColorList columnBackgroundColorList () const
void computeTicks (bool doNotComputeRealScale=false)
QDate currentMonth () const
QDate currentWeek () const
QDate currentYear () const
const QString dateFormatDay ()
const QString dateFormatMonth ()
const QString dateFormatWeek ()
const QString datetimeFormatHour ()
const QString datetimeFormatMinute ()
const QString datetimeFormatSecond ()
int getCoordX (QDateTime)
int getCoordX (QDate)
QDateTime getDateTimeForIndex (int coordX, bool local=true)
QString getToolTipText (QPoint p)
QDateTime horizonEnd () const
QDateTime horizonStart () const
HourFormat hourFormat () const
IntervalColorList intervalBackgroundColorList () const
 KDTimeHeaderWidget (QWidget *parent, KDGanttView *gant)
QDate lastMonth () const
QDate lastWeek () const
QDate lastYear () const
int majorScaleCount () const
KDTimeHeaderWidget::Scale maximumScale () const
int minimumColumnWidth () const
KDTimeHeaderWidget::Scale minimumScale () const
int minorScaleCount () const
void paintEvent (QPaintEvent *)
void pendingPaint ()
void performZoomToSelection (const QDateTime &startTime, const QDateTime &endTime)
bool registerEndTime ()
bool registerStartTime ()
void repaintMe (int left, int wid, QPainter *p=0)
KDTimeHeaderWidget::Scale scale () const
void setAutoScaleMinorTickCount (int count)
void setColumnBackgroundColor (const QDateTime &column, const QColor &color, Scale mini=KDGanttView::Second, Scale maxi=KDGanttView::Month)
void setDateFormatDay (const QString &fmt)
void setDateFormatMonth (const QString &fmt)
void setDateFormatWeek (const QString &fmt)
void setDatetimeFormatHour (const QString &fmt)
void setDatetimeFormatMinute (const QString &fmt)
void setDatetimeFormatSecond (const QString &fmt)
void setHorizonEnd (const QDateTime &start)
void setHorizonStart (const QDateTime &start)
void setHourFormat (HourFormat format)
void setMajorScaleCount (int count)
void setMaximumScale (Scale)
void setMinimumColumnWidth (int width)
void setMinimumScale (Scale)
void setMinorScaleCount (int count)
void setScale (Scale unit, bool update=true)
void setShowPopupMenu (bool show, bool showZoom, bool showScale, bool showTime, bool showYear, bool showGrid, bool showPrint)
void setShowTicks (ShowTicksType show=KDGanttView::ShowMajorTicks)
void setTooltipDateTimeFormat (const QString &fmt)
void setWeekdayBackgroundColor (const QColor &color, int weekday)
void setWeekendBackgroundColor (const QColor &color)
void setWeekendDays (int start, int end)
void setWeekScaleShowNumber (bool b)
void setWeekStartsMonday (bool b)
void setYearFormat (YearFormat format)
bool showPopupMenu () const
ShowTicksType showTicks () const
QDate today () const
QDate tomorrow () const
const QString tooltipDateTimeFormat ()
QColor weekdayBackgroundColor (int weekday) const
QColor weekendBackgroundColor () const
void weekendDays (int &start, int &end) const
bool weekScaleShowNumber ()
bool weekStartsMonday ()
YearFormat yearFormat () const
QDate yesterday () const
void zoom (double, bool absolute=true)
double zoomFactor ()
void zoomToFit ()
void zoomToSelection (const QDateTime &startTime, const QDateTime &endTime)
void zoomToSelectionAndSetStartEnd (const QDateTime &start, const QDateTime &end)
 ~KDTimeHeaderWidget ()

Public Attributes

QColor weekdayColor [8]

Classes

struct  DateTimeColor

Member Typedef Documentation

typedef QValueList<DateTimeColor> KDTimeHeaderWidget::ColumnColorList

Definition at line 87 of file KDGanttViewSubwidgets.h.

typedef KDGanttView::HourFormat KDTimeHeaderWidget::HourFormat

Definition at line 75 of file KDGanttViewSubwidgets.h.

typedef QValueList<KDIntervalColorRectangle *> KDTimeHeaderWidget::IntervalColorList

Definition at line 88 of file KDGanttViewSubwidgets.h.

typedef KDGanttView::Scale KDTimeHeaderWidget::Scale

Definition at line 73 of file KDGanttViewSubwidgets.h.

typedef KDGanttView::ShowTicksType KDTimeHeaderWidget::ShowTicksType

Definition at line 76 of file KDGanttViewSubwidgets.h.

typedef KDGanttView::YearFormat KDTimeHeaderWidget::YearFormat

Definition at line 74 of file KDGanttViewSubwidgets.h.


Constructor & Destructor Documentation

KDTimeHeaderWidget::KDTimeHeaderWidget ( QWidget *  parent,
KDGanttView *  gant 
)

Definition at line 738 of file KDGanttViewSubwidgets.cpp.

KDTimeHeaderWidget::~KDTimeHeaderWidget (  ) 

Definition at line 865 of file KDGanttViewSubwidgets.cpp.


Member Function Documentation

void KDTimeHeaderWidget::addIntervalBackgroundColor ( KDIntervalColorRectangle *  newItem  ) 

Definition at line 1635 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::addTickLeft ( int  num = 1  )  [slot]

Definition at line 1007 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::addTickRight ( int  num = 1  )  [slot]

Definition at line 994 of file KDGanttViewSubwidgets.cpp.

int KDTimeHeaderWidget::autoScaleMinorTickCount (  ) 

Definition at line 2002 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::center ( const QDate &  dt  )  [slot]

Definition at line 1198 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::centerCurrentMonth (  )  [inline, slot]

Definition at line 223 of file KDGanttViewSubwidgets.h.

void KDTimeHeaderWidget::centerCurrentWeek (  )  [inline, slot]

Definition at line 221 of file KDGanttViewSubwidgets.h.

void KDTimeHeaderWidget::centerCurrentYear (  )  [inline, slot]

Definition at line 225 of file KDGanttViewSubwidgets.h.

void KDTimeHeaderWidget::centerDateTime ( const QDateTime &  center,
bool  changeHorizon = false 
)

Definition at line 2759 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::centerLastMonth (  )  [inline, slot]

Definition at line 224 of file KDGanttViewSubwidgets.h.

void KDTimeHeaderWidget::centerLastWeek (  )  [inline, slot]

Definition at line 222 of file KDGanttViewSubwidgets.h.

void KDTimeHeaderWidget::centerLastYear (  )  [inline, slot]

Definition at line 226 of file KDGanttViewSubwidgets.h.

void KDTimeHeaderWidget::centerToday (  )  [inline, slot]

Definition at line 219 of file KDGanttViewSubwidgets.h.

void KDTimeHeaderWidget::centerYesterday (  )  [inline, slot]

Definition at line 220 of file KDGanttViewSubwidgets.h.

void KDTimeHeaderWidget::checkWidth ( int  wid  )  [slot]

Definition at line 1058 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::clearBackgroundColor (  ) 

Definition at line 1723 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
See also:
setColumnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor()

Definition at line 1810 of file KDGanttViewSubwidgets.cpp.

ColumnColorList KDTimeHeaderWidget::columnBackgroundColorList (  )  const [inline]

Definition at line 168 of file KDGanttViewSubwidgets.h.

void KDTimeHeaderWidget::computeTicks ( bool  doNotComputeRealScale = false  ) 

Definition at line 2307 of file KDGanttViewSubwidgets.cpp.

QDate KDTimeHeaderWidget::currentMonth (  )  const

Definition at line 2835 of file KDGanttViewSubwidgets.cpp.

QDate KDTimeHeaderWidget::currentWeek (  )  const

Definition at line 2824 of file KDGanttViewSubwidgets.cpp.

QDate KDTimeHeaderWidget::currentYear (  )  const

Definition at line 2843 of file KDGanttViewSubwidgets.cpp.

const QString KDTimeHeaderWidget::dateFormatDay (  ) 

Definition at line 923 of file KDGanttViewSubwidgets.cpp.

const QString KDTimeHeaderWidget::dateFormatMonth (  ) 

Definition at line 898 of file KDGanttViewSubwidgets.cpp.

const QString KDTimeHeaderWidget::dateFormatWeek (  ) 

Definition at line 911 of file KDGanttViewSubwidgets.cpp.

const QString KDTimeHeaderWidget::datetimeFormatHour (  ) 

Definition at line 936 of file KDGanttViewSubwidgets.cpp.

const QString KDTimeHeaderWidget::datetimeFormatMinute (  ) 

Definition at line 956 of file KDGanttViewSubwidgets.cpp.

const QString KDTimeHeaderWidget::datetimeFormatSecond (  ) 

Definition at line 946 of file KDGanttViewSubwidgets.cpp.

int KDTimeHeaderWidget::getCoordX ( QDateTime  datetime  ) 

Definition at line 2801 of file KDGanttViewSubwidgets.cpp.

int KDTimeHeaderWidget::getCoordX ( QDate  date  ) 

Definition at line 2790 of file KDGanttViewSubwidgets.cpp.

QDateTime KDTimeHeaderWidget::getDateTimeForIndex ( int  coordX,
bool  local = true 
)

Definition at line 1734 of file KDGanttViewSubwidgets.cpp.

QString KDTimeHeaderWidget::getToolTipText ( QPoint  p  ) 

Definition at line 988 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::gridSettings ( int  i  )  [slot]

Definition at line 1211 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 1405 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 1377 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 1566 of file KDGanttViewSubwidgets.cpp.

IntervalColorList KDTimeHeaderWidget::intervalBackgroundColorList (  )  const [inline]

Definition at line 171 of file KDGanttViewSubwidgets.h.

QDate KDTimeHeaderWidget::lastMonth (  )  const

Definition at line 2839 of file KDGanttViewSubwidgets.cpp.

QDate KDTimeHeaderWidget::lastWeek (  )  const

Definition at line 2831 of file KDGanttViewSubwidgets.cpp.

QDate KDTimeHeaderWidget::lastYear (  )  const

Definition at line 2847 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
See also:
setMajorScaleCount(), setMinorScaleCount(), minorScaleCount()

Definition at line 1931 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 1462 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 1514 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 1487 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
See also:
setMinorScaleCount(), setMajorScaleCount(), majorScaleCount()

Definition at line 1956 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::paintEvent ( QPaintEvent *  p  ) 

Reimplemented from QWidget.

Definition at line 2784 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::pendingPaint (  ) 

Definition at line 2779 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::performZoomToSelection ( const QDateTime &  startTime,
const QDateTime &  endTime 
)

Definition at line 1271 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::preparePopupMenu (  )  [slot]

Definition at line 870 of file KDGanttViewSubwidgets.cpp.

bool KDTimeHeaderWidget::registerEndTime (  ) 

Definition at line 1126 of file KDGanttViewSubwidgets.cpp.

bool KDTimeHeaderWidget::registerStartTime (  ) 

Definition at line 1078 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::repaintMe ( int  left,
int  wid,
QPainter *  p = 0 
)

Definition at line 2008 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 1437 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setAutoScaleMinorTickCount ( int  count  ) 

Definition at line 1994 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setColumnBackgroundColor ( const QDateTime &  column,
const QColor &  color,
Scale  mini = KDGanttView::Second,
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
See also:
columnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor()

Definition at line 1605 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setDateFormatDay ( const QString &  fmt  ) 

Definition at line 917 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setDateFormatMonth ( const QString &  fmt  ) 

Definition at line 892 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setDateFormatWeek ( const QString &  fmt  ) 

Definition at line 904 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setDatetimeFormatHour ( const QString &  fmt  ) 

Definition at line 929 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setDatetimeFormatMinute ( const QString &  fmt  ) 

Definition at line 950 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setDatetimeFormatSecond ( const QString &  fmt  ) 

Definition at line 940 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 1390 of file KDGanttViewSubwidgets.cpp.

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 1363 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setHourFormat ( int  i  )  [slot]

Definition at line 1230 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 1553 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
See also:
majorScaleCount(), setMinorScaleCount(), minorScaleCount()

Definition at line 1918 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 1449 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 1501 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 1474 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 1943 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setScale ( int  i  )  [slot]

Definition at line 1226 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setScale ( Scale  unit,
bool  update = true 
)

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 1419 of file KDGanttViewSubwidgets.cpp.

void KDTimeHeaderWidget::setShowPopupMenu ( bool  show,
bool  showZoom,
bool  showScale,
bool  showTime,
bool  showYear,
bool  showGrid,
bool  showPrint 
)

Definition at line 1177 of file KDGanttViewSubwidgets.cpp.