TimePeriod Class Reference
The TimePeriod class provides a widget for entering a time period as a number of weeks, days, or hours and minutes. Time period entry widget. More...
#include <timeperiod.h>
Inherits QHBox.
Public Types
- enum Units { HOURS_MINUTES, DAYS, WEEKS }
Signals
- void valueChanged (int minutes)
Public Member Functions
- TimePeriod (bool allowHourMinute, QWidget *parent, const char *name=0)
- bool isReadOnly () const
- 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_hours_mins ()
- static QString i18n_Hours_Mins ()
- static QString i18n_days ()
- static QString i18n_Days ()
- static QString i18n_weeks ()
- static QString i18n_Weeks ()
Detailed Description
The TimePeriod class provides a widget for entering a time period as a number of weeks, days, or hours and minutes. Time period entry widget.It displays a combo box to select the time units (weeks, days or hours and minutes) alongside a spin box to enter the number of units. The type of spin box displayed alters according to the units selection: day and week 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>
Member Enumeration Documentation
|
Units for the time period.
|
Constructor & Destructor Documentation
|
Constructor.
|
Member Function Documentation
|
Returns true if the widget is read only.
|
|
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.
|
|
Gets the entered time period expressed in minutes.
|
|
Initialises the time period value.
|
|
Enables or disables hours/minutes units in the combo box.
To disable hours/minutes, set |
|
Sets the maximum values for the hours/minutes and days/weeks spin boxes.
Set |
|
Sets whether the editor text is to be selected whenever spin buttons are clicked. The default is to select it. |
|
Sets the input focus to the count field.
|
|
Sets separate WhatsThis texts for the count spin boxes and the units combo box. If is omitted, both spin boxes are set to the same WhatsThis text. |
|
This signal is emitted whenever the value held in the widget changes.
|
The documentation for this class was generated from the following files:
- timeperiod.h
- timeperiod.cpp