• 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
timespinbox.h
Go to the documentation of this file.
1 /***************************************************************************
2  timespinbox.h - description
3  -------------------
4  begin : Sun Mar 31 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 TIMESPINBOX_H
19 #define TIMESPINBOX_H
20 
21 #include <KNumInput>
22 
23 class QStringList;
24 
32 class TimeSpinBox : public KIntSpinBox {
33  Q_OBJECT
34 public:
36  explicit TimeSpinBox( QWidget *parent, bool daysOnly = false );
38  ~TimeSpinBox() {}
39 
45  virtual QString textFromValue( int value ) const;
46 
52  virtual int valueFromText( const QString &text ) const;
53 
55  float timeScale() const;
56 
57  void setDaysOnly( bool daysonly );
58  bool daysOnly() const { return DaysOnly; }
59 
60 signals:
61  void scaleChanged( float s );
62 
63 public slots:
64  void changeScale( float s );
65 
66 protected slots:
67  void reportChange();
68 
69 private:
70  bool DaysOnly;
71  float TimeScale[43];
72  QStringList TimeString;
73 };
74 
75 #endif
TimeSpinBox::timeScale
float timeScale() const
Definition: timespinbox.cpp:215
TimeSpinBox
Custom spinbox to handle selection of timestep values with variable units.
Definition: timespinbox.h:32
QWidget
TimeSpinBox::valueFromText
virtual int valueFromText(const QString &text) const
Convert the displayed string to an internal value.
Definition: timespinbox.cpp:180
TimeSpinBox::setDaysOnly
void setDaysOnly(bool daysonly)
Definition: timespinbox.cpp:70
TimeSpinBox::textFromValue
virtual QString textFromValue(int value) const
Convert the internal value to a display string.
Definition: timespinbox.cpp:189
TimeSpinBox::~TimeSpinBox
~TimeSpinBox()
Destructor (empty)
Definition: timespinbox.h:38
TimeSpinBox::daysOnly
bool daysOnly() const
Definition: timespinbox.h:58
KIntSpinBox
TimeSpinBox::TimeSpinBox
TimeSpinBox(QWidget *parent, bool daysOnly=false)
Constructor.
Definition: timespinbox.cpp:43
TimeSpinBox::scaleChanged
void scaleChanged(float s)
TimeSpinBox::changeScale
void changeScale(float s)
Definition: timespinbox.cpp:200
TimeSpinBox::reportChange
void reportChange()
Definition: timespinbox.cpp:219
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