kstars
TimeDialog Class Reference
A class for adjusting the Time and Date. More...
#include <timedialog.h>

Public Slots | |
void | HourPrefix (int value) |
void | MinutePrefix (int value) |
void | SecondPrefix (int value) |
void | setNow (void) |
Public Member Functions | |
ExtDate | selectedDate (void) |
KStarsDateTime | selectedDateTime (void) |
QTime | selectedTime (void) |
TimeDialog (const KStarsDateTime &now, QWidget *parent=0) | |
~TimeDialog () | |
Protected Member Functions | |
void | keyReleaseEvent (QKeyEvent *) |
Detailed Description
A class for adjusting the Time and Date.Contains a ExtDatePicker widget for selecting the date, and three QSpinBoxes for selecting the Hour, Minute and Second. There is also a "Now" QPushbutton for selecting the Time and Date from the system clock. Dialog for adjusting the Time and Date.
- Version:
- 0.9
Definition at line 44 of file timedialog.h.
Constructor & Destructor Documentation
TimeDialog::TimeDialog | ( | const KStarsDateTime & | now, | |
QWidget * | parent = 0 | |||
) |
Constructor.
Creates widgets and packs them into QLayouts. Connects Signals and Slots.
Definition at line 32 of file timedialog.cpp.
TimeDialog::~TimeDialog | ( | ) | [inline] |
Member Function Documentation
void TimeDialog::HourPrefix | ( | int | value | ) | [slot] |
When the value of the HourBox QSpinBox is changed, prefix a "0" to the displayed text, if the value is less than 10.
It would be nice if I could use one slot for these three widgets; my understanding is that the slot has no knowledge of which widget sent the signal...
Definition at line 125 of file timedialog.cpp.
void TimeDialog::keyReleaseEvent | ( | QKeyEvent * | kev | ) | [protected] |
Definition at line 101 of file timedialog.cpp.
void TimeDialog::MinutePrefix | ( | int | value | ) | [slot] |
When the value of the MinuteBox QSpinBox is changed, prefix a "0" to the displayed text, if the value is less than 10.
Definition at line 130 of file timedialog.cpp.
void TimeDialog::SecondPrefix | ( | int | value | ) | [slot] |
When the value of the SecondBox QSpinBox is changed, prefix a "0" to the displayed text, if the value is less than 10.
Definition at line 135 of file timedialog.cpp.
ExtDate TimeDialog::selectedDate | ( | void | ) |
KStarsDateTime TimeDialog::selectedDateTime | ( | void | ) |
- Returns:
- a KStarsDateTime object with the selected date and time
Definition at line 150 of file timedialog.cpp.
QTime TimeDialog::selectedTime | ( | void | ) |
void TimeDialog::setNow | ( | void | ) | [slot] |
When the "Now" QPushButton is pressed, read the time and date from the system clock.
Change the selected date in the ExtDatePicker to the system's date, and the displayed Hour, Minute and Second to the system time.
Definition at line 113 of file timedialog.cpp.
The documentation for this class was generated from the following files: