Mercurial > hg > svgui
comparison widgets/ItemEditDialog.h @ 1522:d5ef91dc2ea7
Merge from branch time-frequency-boxes
author | Chris Cannam |
---|---|
date | Wed, 25 Sep 2019 13:48:04 +0100 |
parents | 0fa49a6ce64f |
children |
comparison
equal
deleted
inserted
replaced
1510:872873aa6463 | 1522:d5ef91dc2ea7 |
---|---|
32 public: | 32 public: |
33 enum { | 33 enum { |
34 ShowTime = 1 << 0, | 34 ShowTime = 1 << 0, |
35 ShowDuration = 1 << 1, | 35 ShowDuration = 1 << 1, |
36 ShowValue = 1 << 2, | 36 ShowValue = 1 << 2, |
37 ShowText = 1 << 3 | 37 ShowText = 1 << 3, |
38 ShowLevel = 1 << 4 | |
38 }; | 39 }; |
39 | 40 |
40 ItemEditDialog(sv_samplerate_t sampleRate, int options, QString valueUnits = "", | 41 struct LabelOptions { |
42 LabelOptions(); | |
43 QString valueLabel; | |
44 QString levelLabel; | |
45 QString valueUnits; | |
46 QString levelUnits; | |
47 }; | |
48 | |
49 ItemEditDialog(sv_samplerate_t sampleRate, | |
50 int options, | |
51 LabelOptions labelOptions = {}, | |
52 QWidget *parent = 0); | |
53 | |
54 ItemEditDialog(sv_samplerate_t sampleRate, | |
55 int options, | |
56 QString scaleUnits, | |
41 QWidget *parent = 0); | 57 QWidget *parent = 0); |
42 | 58 |
43 void setFrameTime(sv_frame_t frame); | 59 void setFrameTime(sv_frame_t frame); |
44 sv_frame_t getFrameTime() const; | 60 sv_frame_t getFrameTime() const; |
45 | 61 |
53 RealTime getRealDuration() const; | 69 RealTime getRealDuration() const; |
54 | 70 |
55 void setValue(float value); | 71 void setValue(float value); |
56 float getValue() const; | 72 float getValue() const; |
57 | 73 |
74 void setLevel(float level); | |
75 float getLevel() const; | |
76 | |
58 void setText(QString text); | 77 void setText(QString text); |
59 QString getText() const; | 78 QString getText() const; |
60 | 79 |
61 protected slots: | 80 protected slots: |
62 void frameTimeChanged(int); // must be int as invoked from int signal | 81 void frameTimeChanged(int); // must be int as invoked from int signal |
64 void realTimeUSecsChanged(int); | 83 void realTimeUSecsChanged(int); |
65 void frameDurationChanged(int); // must be int as invoked from int signal | 84 void frameDurationChanged(int); // must be int as invoked from int signal |
66 void realDurationSecsChanged(int); | 85 void realDurationSecsChanged(int); |
67 void realDurationUSecsChanged(int); | 86 void realDurationUSecsChanged(int); |
68 void valueChanged(double); | 87 void valueChanged(double); |
88 void levelChanged(double); | |
69 void textChanged(QString); | 89 void textChanged(QString); |
70 void reset(); | 90 void reset(); |
71 | 91 |
72 protected: | 92 protected: |
73 sv_samplerate_t m_sampleRate; | 93 sv_samplerate_t m_sampleRate; |
74 sv_frame_t m_defaultFrame; | 94 sv_frame_t m_defaultFrame; |
75 sv_frame_t m_defaultDuration; | 95 sv_frame_t m_defaultDuration; |
76 float m_defaultValue; | 96 float m_defaultValue; |
97 float m_defaultLevel; | |
77 QString m_defaultText; | 98 QString m_defaultText; |
78 QSpinBox *m_frameTimeSpinBox; | 99 QSpinBox *m_frameTimeSpinBox; |
79 QSpinBox *m_realTimeSecsSpinBox; | 100 QSpinBox *m_realTimeSecsSpinBox; |
80 QSpinBox *m_realTimeUSecsSpinBox; | 101 QSpinBox *m_realTimeUSecsSpinBox; |
81 QSpinBox *m_frameDurationSpinBox; | 102 QSpinBox *m_frameDurationSpinBox; |
82 QSpinBox *m_realDurationSecsSpinBox; | 103 QSpinBox *m_realDurationSecsSpinBox; |
83 QSpinBox *m_realDurationUSecsSpinBox; | 104 QSpinBox *m_realDurationUSecsSpinBox; |
84 QDoubleSpinBox *m_valueSpinBox; | 105 QDoubleSpinBox *m_valueSpinBox; |
106 QDoubleSpinBox *m_levelSpinBox; | |
85 QLineEdit *m_textField; | 107 QLineEdit *m_textField; |
86 QPushButton *m_resetButton; | 108 QPushButton *m_resetButton; |
87 }; | 109 }; |
88 | 110 |
89 #endif | 111 #endif |