kalarm/lib
TimeSpinBox Class Reference
#include <timespinbox.h>
Inheritance diagram for TimeSpinBox:

Detailed Description
Hours/minutes time entry widget.The TimeSpinBox class provides a widget to enter a time consisting of an hours/minutes value. It can hold a time in any of 3 modes: a time of day using the 24-hour clock; a time of day using the 12-hour clock; or a length of time not restricted to 24 hours.
Derived from SpinBox2, it displays a spin box with two pairs of spin buttons, one for hours and one for minutes. It provides accelerated stepping using the spin buttons, when the shift key is held down (inherited from SpinBox2). The default shift steps are 5 minutes and 6 hours.
The widget may be set as read-only. This has the same effect as disabling it, except that its appearance is unchanged.
- Author:
- David Jarvie <software@astrojar.org.uk>
Definition at line 45 of file timespinbox.h.
Public Slots | |
virtual void | setValue (int minutes) |
void | setValue (const QTime &t) |
virtual void | stepUp () |
virtual void | stepDown () |
Public Member Functions | |
TimeSpinBox (bool use24hour, QWidget *parent=0, const char *name=0) | |
TimeSpinBox (int minMinute, int maxMinute, QWidget *parent=0, const char *name=0) | |
bool | isValid () const |
void | setValid (bool) |
QTime | time () const |
void | setMaxValue (int minutes) |
void | setMaxValue (const QTime &t) |
QTime | maxTime () const |
Static Public Member Functions | |
static QString | shiftWhatsThis () |
Protected Member Functions | |
virtual QString | mapValueToText (int v) |
virtual int | mapTextToValue (bool *ok) |
Constructor & Destructor Documentation
|
Constructor for a wrapping time spin box which can be used to enter a time of day.
Definition at line 56 of file timespinbox.cpp. |
|
Constructor for a non-wrapping time spin box which can be used to enter a length of time.
Definition at line 77 of file timespinbox.cpp. |
Member Function Documentation
|
Returns true if the spin box holds a valid value. An invalid value is displayed as asterisks. Definition at line 261 of file timespinbox.cpp. |
|
Returns the maximum value which can be held in the spin box.
Definition at line 83 of file timespinbox.h. |
|
Sets the maximum value which can be held in the spin box.
Definition at line 81 of file timespinbox.h. |
|
Sets the maximum value which can be held in the spin box.
Reimplemented from SpinBox2. Definition at line 79 of file timespinbox.h. |
|
Sets the spin box as holding a valid or invalid value. If newly invalid, the value is displayed as asterisks. If newly valid, the value is set to the minimum value. Definition at line 197 of file timespinbox.cpp. |
|
Sets the value of the spin box.
Definition at line 95 of file timespinbox.h. |
|
Sets the value of the spin box.
Reimplemented from SpinBox2. Definition at line 219 of file timespinbox.cpp. |
|
Returns a text describing use of the shift key as an accelerator for the spin buttons, designed for incorporation into WhatsThis texts.
Definition at line 91 of file timespinbox.cpp. |
|
Decrements the spin box value. If the value was previously invalid, the spin box is set to the minimum value. Reimplemented from SpinBox2. Definition at line 253 of file timespinbox.cpp. |
|
Increments the spin box value. If the value was previously invalid, the spin box is set to the minimum value. Reimplemented from SpinBox2. Definition at line 245 of file timespinbox.cpp. |
|
Returns the current value held in the spin box. If an invalid value is displayed, returns a value lower than the minimum value. Definition at line 96 of file timespinbox.cpp. |
The documentation for this class was generated from the following files: