casa
$Rev:20696$
|
00001 00002 #ifndef SLIDE_EDITOR_H 00003 #define SLIDE_EDITOR_H 00004 00005 #include <graphics/X11/X_enter.h> 00006 #include <QtCore> 00007 #include <QtGui/QLineEdit> 00008 #include <QtGui/QSlider> 00009 #include <QtGui/QVBoxLayout> 00010 #include <graphics/X11/X_exit.h> 00011 00012 namespace casa { 00013 00014 class SlideEditor : public QWidget 00015 { 00016 Q_OBJECT 00017 00018 public: 00019 SlideEditor(QString name, 00020 double min = 0., 00021 double max = 1., 00022 double pos = 0., 00023 int stepSize = 16, 00024 int pageStep = 10, 00025 QWidget *parent = 0); 00026 ~SlideEditor(){} 00027 00028 public slots: 00029 void display2(int); 00030 void display2(); 00031 00032 void setMinimum(double); 00033 void setMaximum(double); 00034 void setPosition(double); 00035 00036 void reset(double, double, double); 00037 00038 signals: 00039 00040 //objName can be obtained from sender(), but 00041 //that violates object oriented programming 00042 void itemValueChanged(QString& value); 00043 00044 //explicitly send name 00045 void itemValueChanged(QString& name, QString& value); 00046 00047 void itemValueChanged(int); 00048 00049 private: 00050 QLineEdit *lineEdit; 00051 QSlider *slider; 00052 QVBoxLayout *vboxLayout; 00053 00054 int stepSize; 00055 QString itemName; 00056 QString itemValue; 00057 }; 00058 00059 } 00060 #endif