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);
31 void setup_channel_choices_from_bus(unsigned row, const InputMapping::Bus &bus);
32 void cell_changed(int row, int column);
33 void card_selected(QComboBox *card_combo, unsigned row, int index);
34 void channel_selected(unsigned row, unsigned channel, int index);
36 void cancel_clicked();
38 void remove_clicked();
39 void updown_clicked(int direction);
42 void update_button_state();
44 Ui::InputMappingDialog *ui;
45 InputMapping mapping; // Under edit. Will be committed on OK.
47 // The old mapping. Will be re-committed on cancel, so that we
48 // unhold all the unused devices (otherwise they would be
50 InputMapping old_mapping;
52 // One for each bus in the mapping. Edited along with the mapping,
53 // so that old volumes etc. are being kept in place for buses that
55 std::vector<AudioMixer::BusSettings> bus_settings;
57 std::map<DeviceSpec, DeviceInfo> devices; // Needs no lock, accessed only on the UI thread.
58 AudioMixer::state_changed_callback_t saved_callback;
61 #endif // !defined(_INPUT_MAPPING_DIALOG_H)