]> git.sesse.net Git - nageru/blobdiff - input_mapping_dialog.h
Make a non-linear fader for dB use. Not perfect yet, but will do.
[nageru] / input_mapping_dialog.h
index c7fea24f3675a0278dd45340196579136c469d0b..d092a34cd5f12f71356a67f59956575de8e5ffca 100644 (file)
@@ -12,6 +12,8 @@ namespace Ui {
 class InputMappingDialog;
 }  // namespace Ui
 
+class QComboBox;
+
 class InputMappingDialog : public QDialog
 {
        Q_OBJECT
@@ -20,7 +22,28 @@ public:
        InputMappingDialog();
 
 private:
+       void fill_ui_from_mapping(const InputMapping &mapping);
+       void fill_row_from_bus(unsigned row, const InputMapping::Bus &bus);
+       void setup_channel_choices_from_bus(unsigned row, const InputMapping::Bus &bus);
+       void cell_changed(int row, int column);
+       void card_selected(QComboBox *card_combo, unsigned row, int index);
+       void channel_selected(unsigned row, unsigned channel, int index);
+       void ok_clicked();
+       void cancel_clicked();
+       void add_clicked();
+       void remove_clicked();
+       void updown_clicked(int direction);
+       void update_button_state();
+
        Ui::InputMappingDialog *ui;
+       InputMapping mapping;  // Under edit. Will be committed on OK.
+
+       // The old mapping. Will be re-committed on cancel, so that we
+       // unhold all the unused devices (otherwise they would be
+       // held forever).
+       InputMapping old_mapping;
+
+       const std::map<DeviceSpec, DeviceInfo> devices;
 };
 
 #endif  // !defined(_INPUT_MAPPING_DIALOG_H)