• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Signals | Public Member Functions | List of all members
TimeUnitBox Class Reference

#include <timeunitbox.h>

Inheritance diagram for TimeUnitBox:
Inheritance graph
[legend]

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.
Author
Jason Harris
Version
1.0

Definition at line 45 of file timeunitbox.h.

Constructor & Destructor Documentation

TimeUnitBox::TimeUnitBox ( QWidget *  parent = 0,
bool  daysonly = false 
)
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

bool TimeUnitBox::daysOnly ( ) const
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.

int TimeUnitBox::maxValue ( ) const
inline
Returns
the maximum value for the internal time-unit value

Definition at line 80 of file timeunitbox.h.

int TimeUnitBox::minValue ( ) const
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.

void TimeUnitBox::setMaximum ( int  maxValue)
inline

Set the maximum value for the internal time-unit value.

Definition at line 73 of file timeunitbox.h.

void TimeUnitBox::setMinimum ( int  minValue)
inline

Set the minimum value for the internal time-unit value.

Definition at line 70 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 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.

int TimeUnitBox::value ( ) const
inline
Returns
the internal value describing the time-unit of the TimeSpinBox.

Definition at line 66 of file timeunitbox.h.

void TimeUnitBox::valueChanged ( int  )
signal

The documentation for this class was generated from the following files:
  • timeunitbox.h
  • timeunitbox.cpp
This file is part of the KDE documentation.
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.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal