00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef FLOATEDIT_H
00019 #define FLOATEDIT_H
00020
00021 #include <qgroupbox.h>
00022
00023 #include "odinqt.h"
00024
00029 class floatLineEdit : public QObject {
00030 Q_OBJECT
00031
00032 public:
00033 floatLineEdit(float minValue, float maxValue, float value, int digits, QWidget *parent, const char *name, int width, int height );
00034 ~floatLineEdit();
00035
00036 QWidget* get_widget() {return gle->get_widget();}
00037
00038
00039 void set_value(float value);
00040 float get_value() const {return value_cache;}
00041
00042 public slots:
00043 void setfloatLineEditValue( float value);
00044
00045 private slots:
00046 void emitSignal();
00047
00048 signals:
00049 void floatLineEditValueChanged(float value);
00050
00051 private:
00052
00053 int digits_cache;
00054 float value_cache;
00055
00056 GuiLineEdit* gle;
00057 };
00058
00059
00061
00066 class floatSlider : public QObject {
00067 Q_OBJECT
00068
00069 public:
00070 floatSlider(float minValue, float maxValue, float step, float value, QWidget *parent, const char *name );
00071 ~floatSlider();
00072
00073 QWidget* get_widget();
00074
00075 public slots:
00076 void setfloatSliderValue( float value);
00077
00078 private slots:
00079 void emitSignal( int discrete_value);
00080
00081 signals:
00082 void floatSliderValueChanged( float newvalue);
00083
00084
00085 private:
00086 GuiSlider* gs;
00087 float minValue_cache;
00088 float step_cache;
00089 int oldPosition;
00090 };
00091
00092
00094
00095
00100 class floatLineBox : public QGroupBox {
00101 Q_OBJECT
00102
00103 public:
00104 floatLineBox(float value, int digits, QWidget *parent, const char *name);
00105 ~floatLineBox();
00106
00107 public slots:
00108 void setfloatLineBoxValue( float value );
00109
00110
00111 private slots:
00112 void emitSignal( float value );
00113
00114
00115 signals:
00116 void floatLineBoxValueChanged( float value );
00117
00118 private:
00119 GuiGridLayout* grid;
00120 floatLineEdit *le;
00121 };
00122
00123
00125
00130 class floatScientSlider : public QGroupBox {
00131 Q_OBJECT
00132
00133 public:
00134 floatScientSlider(float minValue, float maxValue, float Step, float value, int digits, QWidget *parent, const char *name);
00135 ~floatScientSlider();
00136
00137 public slots:
00138 void setfloatScientSliderValue( float value );
00139
00140 private slots:
00141 void emitSignal( float value );
00142
00143 signals:
00144 void floatScientSliderValueChanged( float value );
00145
00146 private:
00147 float value;
00148 floatSlider* slider;
00149 GuiGridLayout* grid;
00150 floatLineEdit *le;
00151
00152
00153 };
00154
00156
00161 class floatLineBox3D : public QGroupBox {
00162 Q_OBJECT
00163
00164 public:
00165 floatLineBox3D(float xval, float yval, float zval, int digits, QWidget *parent, const char *name);
00166 ~floatLineBox3D();
00167
00168 public slots:
00169 void setfloatLineBox3DValue( float xval, float yval, float zval );
00170
00171 private slots:
00172 void emitSignal_x( float newval );
00173 void emitSignal_y( float newval );
00174 void emitSignal_z( float newval );
00175
00176 signals:
00177 void floatLineBox3DValueChanged( float xval, float yval, float zval );
00178 void SignalToChild_x( float );
00179 void SignalToChild_y( float );
00180 void SignalToChild_z( float );
00181
00182 private:
00183 GuiGridLayout* grid;
00184 floatLineEdit *lex;
00185 floatLineEdit *ley;
00186 floatLineEdit *lez;
00187 float xcache;
00188 float ycache;
00189 float zcache;
00190 };
00191
00192
00193 #endif