diff 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
line wrap: on
line diff
--- a/widgets/ItemEditDialog.h	Tue Sep 17 12:50:58 2019 +0100
+++ b/widgets/ItemEditDialog.h	Wed Sep 25 13:48:04 2019 +0100
@@ -34,10 +34,26 @@
         ShowTime       = 1 << 0,
         ShowDuration   = 1 << 1,
         ShowValue      = 1 << 2,
-        ShowText       = 1 << 3
+        ShowText       = 1 << 3,
+        ShowLevel      = 1 << 4
     };
 
-    ItemEditDialog(sv_samplerate_t sampleRate, int options, QString valueUnits = "",
+    struct LabelOptions {
+        LabelOptions();
+        QString valueLabel;
+        QString levelLabel;
+        QString valueUnits;
+        QString levelUnits;
+    };
+    
+    ItemEditDialog(sv_samplerate_t sampleRate,
+                   int options,
+                   LabelOptions labelOptions = {},
+                   QWidget *parent = 0);
+    
+    ItemEditDialog(sv_samplerate_t sampleRate,
+                   int options,
+                   QString scaleUnits,
                    QWidget *parent = 0);
 
     void setFrameTime(sv_frame_t frame);
@@ -55,6 +71,9 @@
     void setValue(float value);
     float getValue() const;
 
+    void setLevel(float level);
+    float getLevel() const;
+
     void setText(QString text);
     QString getText() const;
 
@@ -66,6 +85,7 @@
     void realDurationSecsChanged(int);
     void realDurationUSecsChanged(int);
     void valueChanged(double);
+    void levelChanged(double);
     void textChanged(QString);
     void reset();
 
@@ -74,6 +94,7 @@
     sv_frame_t m_defaultFrame;
     sv_frame_t m_defaultDuration;
     float m_defaultValue;
+    float m_defaultLevel;
     QString m_defaultText;
     QSpinBox *m_frameTimeSpinBox;
     QSpinBox *m_realTimeSecsSpinBox;
@@ -82,6 +103,7 @@
     QSpinBox *m_realDurationSecsSpinBox;
     QSpinBox *m_realDurationUSecsSpinBox;
     QDoubleSpinBox *m_valueSpinBox;
+    QDoubleSpinBox *m_levelSpinBox;
     QLineEdit *m_textField;
     QPushButton *m_resetButton;
 };