#include <timespinbox.h>
Public Slots | |
virtual void | setValue (int minutes) |
void | setValue (const TQTime &t) |
virtual void | stepUp () |
virtual void | stepDown () |
Public Slots inherited from SpinBox2 | |
virtual void | setValue (int val) |
virtual void | setPrefix (const TQString &text) |
virtual void | setSuffix (const TQString &text) |
virtual void | stepUp () |
virtual void | stepDown () |
virtual void | pageUp () |
virtual void | pageDown () |
virtual void | selectAll () |
virtual void | setEnabled (bool enabled) |
Public Member Functions | |
TimeSpinBox (bool use24hour, TQWidget *parent=0, const char *name=0) | |
TimeSpinBox (int minMinute, int maxMinute, TQWidget *parent=0, const char *name=0) | |
bool | isValid () const |
void | setValid (bool) |
TQTime | time () const |
virtual void | setMinValue (int minutes) |
virtual void | setMaxValue (int minutes) |
void | setMaxValue (const TQTime &t) |
TQTime | maxTime () const |
virtual TQSize | sizeHint () const |
virtual TQSize | minimumSizeHint () const |
Public Member Functions inherited from SpinBox2 | |
SpinBox2 (TQWidget *parent=0, const char *name=0) | |
SpinBox2 (int minValue, int maxValue, int step=1, int step2=1, TQWidget *parent=0, const char *name=0) | |
virtual void | setReadOnly (bool readOnly) |
bool | isReadOnly () const |
void | setSelectOnStep (bool sel) |
void | setReverseWithLayout (bool reverse) |
bool | reverseButtons () const |
TQString | text () const |
virtual TQString | prefix () const |
virtual TQString | suffix () const |
virtual TQString | cleanText () const |
virtual void | setSpecialValueText (const TQString &text) |
TQString | specialValueText () const |
virtual void | setWrapping (bool on) |
bool | wrapping () const |
void | setAlignment (int a) |
virtual void | setButtonSymbols (TQSpinBox::ButtonSymbols) |
TQSpinBox::ButtonSymbols | buttonSymbols () const |
virtual void | setValidator (const TQValidator *v) |
const TQValidator * | validator () const |
int | minValue () const |
int | maxValue () const |
void | setRange (int minValue, int maxValue) |
int | value () const |
int | bound (int val) const |
TQRect | upRect () const |
TQRect | downRect () const |
TQRect | up2Rect () const |
TQRect | down2Rect () const |
int | lineStep () const |
int | lineShiftStep () const |
int | pageStep () const |
int | pageShiftStep () const |
void | setLineStep (int step) |
void | setSteps (int line, int page) |
void | setShiftSteps (int line, int page) |
void | addPage () |
void | subtractPage () |
void | addLine () |
void | subtractLine () |
void | addValue (int change) |
Static Public Member Functions | |
static TQString | shiftWhatsThis () |
Protected Member Functions | |
virtual TQString | mapValueToText (int v) |
virtual int | mapTextToValue (bool *ok) |
Protected Member Functions inherited from SpinBox2 | |
virtual void | resizeEvent (TQResizeEvent *) |
virtual void | showEvent (TQShowEvent *) |
virtual void | styleChange (TQStyle &) |
virtual void | getMetrics () const |
Additional Inherited Members | |
Signals inherited from SpinBox2 | |
void | valueChanged (int value) |
void | valueChanged (const TQString &valueText) |
Protected Slots inherited from SpinBox2 | |
virtual void | valueChange () |
virtual void | stepPage (int) |
Protected Attributes inherited from SpinBox2 | |
int | wUpdown2 |
int | xUpdown2 |
int | xSpinbox |
int | wGap |
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.
Definition at line 45 of file timespinbox.h.
Constructor & Destructor Documentation
◆ TimeSpinBox() [1/2]
|
explicit |
Constructor for a wrapping time spin box which can be used to enter a time of day.
- Parameters
-
use24hour True for entry of 24-hour clock times (range 00:00 to 23:59). False for entry of 12-hour clock times (range 12:00 to 11:59). parent The parent object of this widget. name The name of this widget.
Definition at line 57 of file timespinbox.cpp.
◆ TimeSpinBox() [2/2]
TimeSpinBox::TimeSpinBox | ( | int | minMinute, |
int | maxMinute, | ||
TQWidget * | parent = 0 , |
||
const char * | name = 0 |
||
) |
Constructor for a non-wrapping time spin box which can be used to enter a length of time.
- Parameters
-
minMinute The minimum value which the spin box can hold, in minutes. maxMinute The maximum value which the spin box can hold, in minutes. parent The parent object of this widget. name The name of this widget.
Definition at line 79 of file timespinbox.cpp.
Member Function Documentation
◆ isValid()
bool TimeSpinBox::isValid | ( | ) | const |
Returns true if the spin box holds a valid value.
An invalid value is displayed as asterisks.
Definition at line 273 of file timespinbox.cpp.
◆ maxTime()
|
inline |
Returns the maximum value which can be held in the spin box.
Definition at line 88 of file timespinbox.h.
◆ setMaxValue() [1/2]
|
inline |
Sets the maximum value which can be held in the spin box.
Definition at line 86 of file timespinbox.h.
◆ setMaxValue() [2/2]
|
inlinevirtual |
Sets the maximum value which can be held in the spin box.
- Parameters
-
minutes The maximum value expressed in minutes.
Reimplemented from SpinBox2.
Definition at line 84 of file timespinbox.h.
◆ setMinValue()
|
virtual |
Sets the maximum value which can be held in the spin box.
- Parameters
-
minutes The maximum value expressed in minutes.
Reimplemented from SpinBox2.
Definition at line 222 of file timespinbox.cpp.
◆ setValid()
void TimeSpinBox::setValid | ( | bool | valid | ) |
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 200 of file timespinbox.cpp.
◆ setValue [1/2]
|
inlineslot |
Sets the value of the spin box.
Definition at line 103 of file timespinbox.h.
◆ setValue [2/2]
|
virtualslot |
Sets the value of the spin box.
- Parameters
-
minutes The new value of the spin box, expressed in minutes.
Definition at line 231 of file timespinbox.cpp.
◆ shiftWhatsThis()
|
static |
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 94 of file timespinbox.cpp.
◆ stepDown
|
virtualslot |
Decrements the spin box value.
If the value was previously invalid, the spin box is set to the minimum value.
Definition at line 265 of file timespinbox.cpp.
◆ stepUp
|
virtualslot |
Increments the spin box value.
If the value was previously invalid, the spin box is set to the minimum value.
Definition at line 257 of file timespinbox.cpp.
◆ time()
TQTime TimeSpinBox::time | ( | ) | const |
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 99 of file timespinbox.cpp.
The documentation for this class was generated from the following files: