]> git.sesse.net Git - nageru/blobdiff - midi_mapping_dialog.h
Fix an issue where the mixer lagging too much behind CEF would cause us to display...
[nageru] / midi_mapping_dialog.h
index 6a895ba081455911cb4578e7acdc96d159bb7461..5a1ec3f425a9b4caada9a8fe768e1cb26717636c 100644 (file)
@@ -1,21 +1,24 @@
 #ifndef _MIDI_MAPPING_DIALOG_H
 #define _MIDI_MAPPING_DIALOG_H
 
+#include <stdbool.h>
 #include <QDialog>
+#include <QString>
+#include <map>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
-#include <sys/time.h>
 
-#include "audio_mixer.h"
 #include "midi_mapper.h"
-#include "mixer.h"
+
+class QEvent;
+class QObject;
 
 namespace Ui {
 class MIDIMappingDialog;
 }  // namespace Ui
 
-class MIDIMapper;
 class MIDIMappingProto;
 class QComboBox;
 class QSpinBox;
@@ -51,6 +54,7 @@ public:
        void set_compressor_threshold(unsigned bus_idx, float value) override {}
        void set_fader(unsigned bus_idx, float value) override {}
 
+       void toggle_mute(unsigned bus_idx) override {}
        void toggle_locut(unsigned bus_idx) override {}
        void toggle_auto_gain_staging(unsigned bus_idx) override {}
        void toggle_compressor(unsigned bus_idx) override {}
@@ -71,6 +75,7 @@ public:
        void highlight_compressor_threshold(unsigned bus_idx, bool highlight) override {}
        void highlight_fader(unsigned bus_idx, bool highlight) override {}
 
+       void highlight_mute(unsigned bus_idx, bool highlight) override {}
        void highlight_toggle_locut(unsigned bus_idx, bool highlight) override {}
        void highlight_toggle_auto_gain_staging(unsigned bus_idx, bool highlight) override {}
        void highlight_toggle_compressor(unsigned bus_idx, bool highlight) override {}
@@ -99,13 +104,15 @@ private:
                ALL_GROUPS = -1,
                PER_BUS_CONTROLLERS,
                PER_BUS_BUTTONS,
+               PER_BUS_LIGHTS,
                GLOBAL_CONTROLLERS,
-               GLOBAL_BUTTONS
+               GLOBAL_BUTTONS,
+               GLOBAL_LIGHTS
        };
 
        void add_bank_selector(QTreeWidgetItem *item, const MIDIMappingProto &mapping_proto, int bank_field_number);
        
-       enum class ControlType { CONTROLLER, BUTTON };
+       enum class ControlType { CONTROLLER, BUTTON, LIGHT };
        void add_controls(const std::string &heading, ControlType control_type,
                          SpinnerGroup spinner_group,
                          const MIDIMappingProto &mapping_proto, const std::vector<Control> &controls);
@@ -147,6 +154,7 @@ private:
        };
        std::vector<InstantiatedSpinner> controller_spinners;
        std::vector<InstantiatedSpinner> button_spinners;
+       std::vector<InstantiatedSpinner> light_spinners;
        std::vector<InstantiatedComboBox> bank_combo_boxes;
 
        // Keyed on bus index, then field number.