Mercurial > hg > svgui
comparison widgets/ItemEditDialog.h @ 73:ad1fe715b480
* Make the item-edit dialog do something useful
author | Chris Cannam |
---|---|
date | Mon, 03 Apr 2006 17:18:27 +0000 |
parents | bf306158803d |
children | e4773943c9c1 |
comparison
equal
deleted
inserted
replaced
72:1d176af87056 | 73:ad1fe715b480 |
---|---|
19 #include <QDialog> | 19 #include <QDialog> |
20 #include <QString> | 20 #include <QString> |
21 | 21 |
22 #include "base/RealTime.h" | 22 #include "base/RealTime.h" |
23 | 23 |
24 class QSpinBox; | |
25 class QDoubleSpinBox; | |
26 class QLineEdit; | |
27 | |
24 class ItemEditDialog : public QDialog | 28 class ItemEditDialog : public QDialog |
25 { | 29 { |
26 Q_OBJECT | 30 Q_OBJECT |
27 | 31 |
28 public: | 32 public: |
31 ShowDuration = 1 << 1, | 35 ShowDuration = 1 << 1, |
32 ShowValue = 1 << 2, | 36 ShowValue = 1 << 2, |
33 ShowText = 1 << 3 | 37 ShowText = 1 << 3 |
34 }; | 38 }; |
35 | 39 |
36 ItemEditDialog(size_t sampleRate, int options, QWidget *parent = 0); | 40 ItemEditDialog(size_t sampleRate, int options, QString valueUnits = "", |
41 QWidget *parent = 0); | |
37 | 42 |
38 void setFrameTime(long frame); | 43 void setFrameTime(long frame); |
39 long getFrameTime() const; | 44 long getFrameTime() const; |
40 | 45 |
41 void setRealTime(RealTime rt); | 46 void setRealTime(RealTime rt); |
47 void setRealDuration(RealTime rt); | 52 void setRealDuration(RealTime rt); |
48 RealTime getRealDuration() const; | 53 RealTime getRealDuration() const; |
49 | 54 |
50 void setValue(float value); | 55 void setValue(float value); |
51 float getValue() const; | 56 float getValue() const; |
52 | 57 |
53 void setText(QString text); | 58 void setText(QString text); |
54 QString getText() const; | 59 QString getText() const; |
55 | 60 |
56 protected slots: | 61 protected slots: |
57 void frameTimeChanged(QString); | 62 void frameTimeChanged(int); |
58 void realTimeSecsChanged(QString); | 63 void realTimeSecsChanged(int); |
59 void realTimeNSecsChanged(QString); | 64 void realTimeUSecsChanged(int); |
60 void frameDurationChanged(QString); | 65 void frameDurationChanged(int); |
61 void realDurationSecsChanged(QString); | 66 void realDurationSecsChanged(int); |
62 void realDurationNSecsChanged(QString); | 67 void realDurationUSecsChanged(int); |
63 void valueChanged(double); | 68 void valueChanged(double); |
64 void textChanged(QString); | 69 void textChanged(QString); |
70 void reset(); | |
65 | 71 |
66 protected: | 72 protected: |
67 size_t m_sampleRate; | 73 size_t m_sampleRate; |
68 long m_frame; | 74 long m_defaultFrame; |
69 long m_duration; | 75 long m_defaultDuration; |
70 double m_value; | 76 float m_defaultValue; |
71 QString m_text; | 77 QString m_defaultText; |
78 QSpinBox *m_frameTimeSpinBox; | |
79 QSpinBox *m_realTimeSecsSpinBox; | |
80 QSpinBox *m_realTimeUSecsSpinBox; | |
81 QSpinBox *m_frameDurationSpinBox; | |
82 QSpinBox *m_realDurationSecsSpinBox; | |
83 QSpinBox *m_realDurationUSecsSpinBox; | |
84 QDoubleSpinBox *m_valueSpinBox; | |
85 QLineEdit *m_textField; | |
86 QPushButton *m_resetButton; | |
72 }; | 87 }; |
73 | 88 |
74 #endif | 89 #endif |