kstars
#include <timeunitbox.h>

Signals | |
void | valueChanged (int) |
Public Member Functions | |
TimeUnitBox (QWidget *parent=0, bool daysonly=false) | |
~TimeUnitBox () | |
bool | daysOnly () const |
int | getUnitValue (int) |
int | maxValue () const |
int | minValue () const |
void | setDaysOnly (bool daysonly) |
void | setMaximum (int maxValue) |
void | setMinimum (int minValue) |
void | setValue (int value) |
int | unitValue () |
int | value () const |
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 45 of file timeunitbox.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Definition at line 64 of file timeunitbox.cpp.
TimeUnitBox::~TimeUnitBox | ( | ) |
Destructor (empty)
Definition at line 88 of file timeunitbox.cpp.
Member Function Documentation
|
inline |
Definition at line 82 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 139 of file timeunitbox.cpp.
|
inline |
- Returns
- the maximum value for the internal time-unit value
Definition at line 80 of file timeunitbox.h.
|
inline |
- Returns
- the minimum value for the internal time-unit value
Definition at line 77 of file timeunitbox.h.
void TimeUnitBox::setDaysOnly | ( | bool | daysonly | ) |
Definition at line 91 of file timeunitbox.cpp.
|
inline |
Set the maximum value for the internal time-unit value.
Definition at line 73 of file timeunitbox.h.
|
inline |
Set the minimum value for the internal time-unit value.
Definition at line 70 of file timeunitbox.h.
|
inline |
Set the value which describes which time-unit is displayed in the TimeSpinBox.
value
the new value
Definition at line 63 of file timeunitbox.h.
int TimeUnitBox::unitValue | ( | ) |
- Returns
- the value of UnitStep for the current spinbox value()
Definition at line 132 of file timeunitbox.cpp.
|
inline |
- Returns
- the internal value describing the time-unit of the TimeSpinBox.
Definition at line 66 of file timeunitbox.h.
|
signal |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.