kstars
timespinbox.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TIMESPINBOX_H
00019 #define TIMESPINBOX_H
00020
00021 #include <qspinbox.h>
00022 #include <qstringlist.h>
00023
00031 class TimeSpinBox : public QSpinBox {
00032 Q_OBJECT
00033 public:
00035 TimeSpinBox( QWidget *parent, const char* name=0, bool daysOnly = false );
00037 ~TimeSpinBox() {}
00038
00044 virtual QString mapValueToText( int value );
00045
00051 virtual int mapTextToValue( bool *ok);
00052
00054 float timeScale() const;
00055
00056 void setDaysOnly( bool daysonly );
00057 bool daysOnly() const { return DaysOnly; }
00058
00059 signals:
00060 void scaleChanged( float s );
00061
00062 public slots:
00063 void changeScale( float s );
00064
00065 protected slots:
00066 void reportChange();
00067
00068 private:
00069 bool DaysOnly;
00070 float TimeScale[42];
00071 QStringList TimeString;
00072 };
00073
00074 #endif