1 /***************************************************************************
2 timestepbox.h - description
4 begin : Sat Apr 13 2002
5 copyright : (C) 2002 by Jason Harris
6 email : kstars@30doradus.org
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
23 #include "timespinbox.h"
24 #include "timeunitbox.h"
27 *This composite widget consists of a TimeSpinBox (a QSpinBox), coupled with a
28 *TimeUnitBox (a second pair of up/down buttons).
29 *The second set of buttons makes larger steps through the 82 possible
30 *time-step values, skipping to the next even unit of time.
31 *@short Composite spinbox for specifying a time step.
36 class TimeStepBox
: public QFrame
{
40 TimeStepBox( QWidget
*parent
=0, const char* name
=0 );
41 /**Destructor. (empty)*/
44 /**@return a pointer to the child TimeSpinBox */
45 TimeSpinBox
* tsbox() const { return timeBox
; }
47 /**@return a pointer to the child TimeUnitBox*/
48 TimeUnitBox
* unitbox() const { return unitBox
; }
50 void scaleChanged( float );
52 /**Set the TimeSpinBox value according to the current UnitBox value.
53 *This is connected to the UnitBox valueChanged() Signal. */
54 void changeUnits( void );
56 /**Make sure the current UnitBox value represents the correct units for the
57 *current TimeBox value. This slot is connected to the TimeBox valueChanged() Slot. */
58 void syncUnits( int );