kalarm/lib
TimePeriod Class Reference
#include <timeperiod.h>
Detailed Description
Time period entry widget.The TimePeriod class provides a widget for entering a time period as a number of weeks, days, hours and minutes, or minutes.
It displays a combo box to select the time units (weeks, days, hours and minutes, or minutes) alongside a spin box to enter the number of units. The type of spin box displayed alters according to the units selection: day, week and minute values are entered in a normal spin box, while hours and minutes are entered in a time spin box (with two pairs of spin buttons, one for hours and one for minutes).
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 50 of file timeperiod.h.
Public Types | |
enum | Units { MINUTES, HOURS_MINUTES, DAYS, WEEKS } |
Signals | |
void | valueChanged (int minutes) |
Public Member Functions | |
TimePeriod (bool allowMinute, QWidget *parent, const char *name=0) | |
bool | isReadOnly () const |
virtual void | setReadOnly (bool readOnly) |
int | minutes () const |
void | setMinutes (int minutes, bool dateOnly, Units defaultUnits) |
void | setDateOnly (bool dateOnly) |
void | setMaximum (int hourmin, int days) |
void | setSelectOnStep (bool select) |
void | setFocusOnCount () |
void | setWhatsThis (const QString &units, const QString &dayWeek, const QString &hourMin=QString::null) |
Static Public Member Functions | |
static QString | i18n_minutes () |
static QString | i18n_Minutes () |
static QString | i18n_hours_mins () |
static QString | i18n_Hours_Mins () |
static QString | i18n_days () |
static QString | i18n_Days () |
static QString | i18n_weeks () |
static QString | i18n_Weeks () |
Member Enumeration Documentation
|
Units for the time period.
Definition at line 60 of file timeperiod.h. |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 53 of file timeperiod.cpp. |
Member Function Documentation
|
Returns true if the widget is read only.
Definition at line 72 of file timeperiod.h. |
|
Gets the entered time period expressed in minutes.
Definition at line 151 of file timeperiod.cpp. |
|
Enables or disables minutes and hours/minutes units in the combo box.
To disable minutes and hours/minutes, set Definition at line 91 of file timeperiod.h. |
|
Sets the input focus to the count field.
Definition at line 121 of file timeperiod.cpp. |
|
Sets the maximum values for the minutes and hours/minutes, and days/weeks spin boxes.
Set Definition at line 130 of file timeperiod.cpp. |
|
Initialises the time period value.
Definition at line 170 of file timeperiod.cpp. |
|
Sets whether the widget is read-only for the user. If read-only, the time period cannot be edited and the units combo box is inactive.
Definition at line 97 of file timeperiod.cpp. |
|
Sets whether the editor text is to be selected whenever spin buttons are clicked. The default is to select it. Definition at line 112 of file timeperiod.cpp. |
|
Sets separate WhatsThis texts for the count spin boxes and the units combo box.
If Definition at line 379 of file timeperiod.cpp. |
|
This signal is emitted whenever the value held in the widget changes.
|
The documentation for this class was generated from the following files: