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

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • widgets
timeunitbox.h
Go to the documentation of this file.
1 /***************************************************************************
2  timeunitbox.h - description
3  -------------------
4  begin : Sat Apr 27 2002
5  copyright : (C) 2002 by Jason Harris
6  email : kstars@30doradus.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
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. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef TIMEUNITBOX_H
19 #define TIMEUNITBOX_H
20 
21 #include <QWidget>
22 
23 #define ALLUNITS 8
24 #define DAYUNITS 5
25 
43 class QPushButton;
44 
45 class TimeUnitBox : public QWidget {
46  Q_OBJECT
47 public:
49  explicit TimeUnitBox(QWidget *parent=0, bool daysonly = false);
51  ~TimeUnitBox();
53  int unitValue();
54 
58  int getUnitValue( int );
59 
63  void setValue( int value ) { Value = value; }
66  int value() const { return Value; }
67 
70  void setMinimum( int minValue ) { MinimumValue = minValue; }
73  void setMaximum( int maxValue ) { MaximumValue = maxValue; }
74 
77  int minValue() const { return MinimumValue; }
80  int maxValue() const { return MaximumValue; }
81 
82  bool daysOnly() const { return DaysOnly; }
83  void setDaysOnly( bool daysonly );
84 
85 signals:
86  void valueChanged(int);
87 
88 private slots:
91  void increase();
94  void decrease();
95 
96 private:
97  bool DaysOnly;
98  QPushButton *UpButton, *DownButton;
99  int MinimumValue, MaximumValue, Value, UnitStep[ ALLUNITS ];
100 };
101 
102 #endif
TimeUnitBox::maxValue
int maxValue() const
Definition: timeunitbox.h:80
TimeUnitBox::value
int value() const
Definition: timeunitbox.h:66
Value
int Value
Definition: SkipListElement.h:31
QWidget
TimeUnitBox::getUnitValue
int getUnitValue(int)
the same as unitValue, except you can get the UnitStep for any value, not just the current one...
Definition: timeunitbox.cpp:139
TimeUnitBox::valueChanged
void valueChanged(int)
TimeUnitBox::daysOnly
bool daysOnly() const
Definition: timeunitbox.h:82
TimeUnitBox::unitValue
int unitValue()
Definition: timeunitbox.cpp:132
TimeUnitBox::setMinimum
void setMinimum(int minValue)
Set the minimum value for the internal time-unit value.
Definition: timeunitbox.h:70
ALLUNITS
#define ALLUNITS
Definition: timeunitbox.h:23
TimeUnitBox::setValue
void setValue(int value)
Set the value which describes which time-unit is displayed in the TimeSpinBox.
Definition: timeunitbox.h:63
TimeUnitBox::setDaysOnly
void setDaysOnly(bool daysonly)
Definition: timeunitbox.cpp:91
TimeUnitBox
A pair of buttons, arranged one above the other, labeled "+"/"-".
Definition: timeunitbox.h:45
TimeUnitBox::setMaximum
void setMaximum(int maxValue)
Set the maximum value for the internal time-unit value.
Definition: timeunitbox.h:73
TimeUnitBox::~TimeUnitBox
~TimeUnitBox()
Destructor (empty)
Definition: timeunitbox.cpp:88
TimeUnitBox::TimeUnitBox
TimeUnitBox(QWidget *parent=0, bool daysonly=false)
Constructor.
Definition: timeunitbox.cpp:64
TimeUnitBox::minValue
int minValue() const
Definition: timeunitbox.h:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 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