1 #ifndef _INPUT_MAPPING_DIALOG_H
2 #define _INPUT_MAPPING_DIALOG_H
9 #include "audio_mixer.h"
10 #include "input_mapping.h"
15 class InputMappingDialog;
20 class InputMappingDialog : public QDialog
26 ~InputMappingDialog();
29 void fill_ui_from_mapping(const InputMapping &mapping);
30 void fill_row_from_bus(unsigned row, const InputMapping::Bus &bus, const InputMapping &mapping);
31 void fill_delay_from_bus(unsigned row, const InputMapping::Bus &bus, const InputMapping &mapping);
32 void setup_channel_choices_from_bus(unsigned row, const InputMapping::Bus &bus);
33 void cell_changed(int row, int column);
34 void card_selected(QComboBox *card_combo, unsigned row, int index);
35 void channel_selected(unsigned row, unsigned channel, int index);
36 void delay_changed(unsigned row, double value);
38 void cancel_clicked();
40 void remove_clicked();
41 void updown_clicked(int direction);
44 void update_button_state();
46 Ui::InputMappingDialog *ui;
47 InputMapping mapping; // Under edit. Will be committed on OK.
49 // The old mapping. Will be re-committed on cancel, so that we
50 // unhold all the unused devices (otherwise they would be
52 InputMapping old_mapping;
54 // One for each bus in the mapping. Edited along with the mapping,
55 // so that old volumes etc. are being kept in place for buses that
57 std::vector<AudioMixer::BusSettings> bus_settings;
59 std::map<DeviceSpec, DeviceInfo> devices; // Needs no lock, accessed only on the UI thread.
60 AudioMixer::state_changed_callback_t saved_callback;
63 #endif // !defined(_INPUT_MAPPING_DIALOG_H)