KGantt::DateTimeTimeLine
#include <kganttdatetimetimeline.h>
Public Types | |
enum | Option { Foreground = 1 , Background = 2 , UseCustomPen = 4 , MaxOptions = 0xFFFF } |
typedef QFlags< Option > | Options |
Signals | |
void | updated () |
Detailed Description
This class implements a timeline.
The timeline can optionally be shown in the Background or in the Foreground. Default is Foreground.
The pen can be set with setPen(), and must be activated by setting the option UseCustomPen.
The datetime can be set using setDateTime().
The timeline can priodically moved to the current datetime by setting the interval > 0 with setInterval(). Setting a zero interval turns the periodically update off.
The timeline is off by default.
For example:
Definition at line 47 of file kganttdatetimetimeline.h.
Member Typedef Documentation
◆ Options
typedef QFlags< Option > KGantt::DateTimeTimeLine::Options |
Definition at line 58 of file kganttdatetimetimeline.h.
Member Enumeration Documentation
◆ Option
Enumerator | |
---|---|
Foreground | Display the timeline in the foreground. |
Background | Display the timeline in the background. |
UseCustomPen | Paint the timeline using the pen set with setPen(). |
Definition at line 52 of file kganttdatetimetimeline.h.
Constructor & Destructor Documentation
◆ DateTimeTimeLine()
DateTimeTimeLine::DateTimeTimeLine | ( | ) |
Create a timeline object.
By default, no timeline is displayed.
Definition at line 40 of file kganttdatetimetimeline.cpp.
Member Function Documentation
◆ customPen()
QPen DateTimeTimeLine::customPen | ( | ) | const |
- Returns
- the pen that has been set with setPen()
Definition at line 112 of file kganttdatetimetimeline.cpp.
◆ dateTime()
QDateTime DateTimeTimeLine::dateTime | ( | ) | const |
- Returns
- the datetime If the datetime is not valid, the current datetime is returned.
Definition at line 66 of file kganttdatetimetimeline.cpp.
◆ interval()
int DateTimeTimeLine::interval | ( | ) | const |
- Returns
- the update interval in milliseconds
Definition at line 79 of file kganttdatetimetimeline.cpp.
◆ options()
DateTimeTimeLine::Options DateTimeTimeLine::options | ( | ) | const |
- Returns
- options
Definition at line 50 of file kganttdatetimetimeline.cpp.
◆ pen()
QPen DateTimeTimeLine::pen | ( | ) | const |
- Returns
- the pen that will be used for rendering the timeline If no pen has been set with setPen(), a default pen is returned.
Definition at line 96 of file kganttdatetimetimeline.cpp.
◆ setDateTime()
Set datetime to dt
.
Definition at line 72 of file kganttdatetimetimeline.cpp.
◆ setInterval()
void DateTimeTimeLine::setInterval | ( | int | msec | ) |
Set timer interval to msecs
milliseconds.
Setting a zero time disables the timer.
Definition at line 85 of file kganttdatetimetimeline.cpp.
◆ setOptions()
void DateTimeTimeLine::setOptions | ( | DateTimeTimeLine::Options | options | ) |
Set options to options
.
If both Background and Foreground are set, Foreground is used.
Definition at line 56 of file kganttdatetimetimeline.cpp.
◆ setPen()
Set the custom pen to pen
.
Definition at line 105 of file kganttdatetimetimeline.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:21 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.