kstars
TimeUnitBox Class Reference
A pair of buttons, arranged one above the other, labeled "+"/"-". More...
#include <timeunitbox.h>

Signals | |
void | valueChanged (int) |
Public Member Functions | |
bool | daysOnly () const |
int | getUnitValue (int) |
int | maxValue () const |
int | minValue () const |
void | setDaysOnly (bool daysonly) |
void | setMaxValue (int maxValue) |
void | setMinValue (int minValue) |
void | setValue (int value) |
TimeUnitBox (QWidget *parent=0, const char *name=0, bool daysonly=false) | |
int | unitValue () |
int | value () const |
~TimeUnitBox () |
Detailed Description
A pair of buttons, arranged one above the other, labeled "+"/"-".These buttons are to be paired with the TimeSpinBox widget. Their function is to provide a way to cycle through the possible time steps using larger intervals than the up/down buttons of the TimeSpinBox. For example, say the Spinbox currently shows a timestep of "1 sec". Increasing the timestep with the spinbox up-button will change it to "2 sec", while using the "+" button of this widget will change it to "1 min".
The idea is that these "outer" buttons always change to the next even unit of time.
- Note:
- this widget is not to be used on its own; it is combined with the TimeSpinBox widget to form the TimeStepBox composite widget. provides a second set of up/down buttons for TimeStepBox.
- Version:
- 1.0
Definition at line 46 of file timeunitbox.h.
Constructor & Destructor Documentation
TimeUnitBox::TimeUnitBox | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 , |
|||
bool | daysonly = false | |||
) |
TimeUnitBox::~TimeUnitBox | ( | ) |
Member Function Documentation
bool TimeUnitBox::daysOnly | ( | ) | const [inline] |
Definition at line 83 of file timeunitbox.h.
int TimeUnitBox::getUnitValue | ( | int | val | ) |
the same as unitValue, except you can get the UnitStep for any value, not just the current one.
- Returns:
- the value of UnitStep for the index value given as an argument.
Definition at line 92 of file timeunitbox.cpp.
int TimeUnitBox::maxValue | ( | ) | const [inline] |
- Returns:
- the maximum value for the internal time-unit value
Definition at line 81 of file timeunitbox.h.
int TimeUnitBox::minValue | ( | ) | const [inline] |
- Returns:
- the minimum value for the internal time-unit value
Definition at line 78 of file timeunitbox.h.
void TimeUnitBox::setDaysOnly | ( | bool | daysonly | ) |
Definition at line 44 of file timeunitbox.cpp.
void TimeUnitBox::setMaxValue | ( | int | maxValue | ) | [inline] |
Set the maximum value for the internal time-unit value.
Definition at line 74 of file timeunitbox.h.
void TimeUnitBox::setMinValue | ( | int | minValue | ) | [inline] |
Set the minimum value for the internal time-unit value.
Definition at line 71 of file timeunitbox.h.
void TimeUnitBox::setValue | ( | int | value | ) | [inline] |
Set the value which describes which time-unit is displayed in the TimeSpinBox.
value
the new value
Definition at line 64 of file timeunitbox.h.
int TimeUnitBox::unitValue | ( | ) |
- Returns:
- the value of UnitStep for the current spinbox value()
Definition at line 85 of file timeunitbox.cpp.
int TimeUnitBox::value | ( | ) | const [inline] |
- Returns:
- the internal value describing the time-unit of the TimeSpinBox.
Definition at line 67 of file timeunitbox.h.
void TimeUnitBox::valueChanged | ( | int | ) | [signal] |
The documentation for this class was generated from the following files: