1 #ifndef _INPUT_MAPPING_DIALOG_H
2 #define _INPUT_MAPPING_DIALOG_H
9 #include "audio_mixer.h"
13 class InputMappingDialog;
18 class InputMappingDialog : public QDialog
24 ~InputMappingDialog();
27 void fill_ui_from_mapping(const InputMapping &mapping);
28 void fill_row_from_bus(unsigned row, const InputMapping::Bus &bus);
29 void setup_channel_choices_from_bus(unsigned row, const InputMapping::Bus &bus);
30 void cell_changed(int row, int column);
31 void card_selected(QComboBox *card_combo, unsigned row, int index);
32 void channel_selected(unsigned row, unsigned channel, int index);
34 void cancel_clicked();
36 void remove_clicked();
37 void updown_clicked(int direction);
40 void update_button_state();
42 Ui::InputMappingDialog *ui;
43 InputMapping mapping; // Under edit. Will be committed on OK.
45 // The old mapping. Will be re-committed on cancel, so that we
46 // unhold all the unused devices (otherwise they would be
48 InputMapping old_mapping;
50 // One for each bus in the mapping. Edited along with the mapping,
51 // so that old volumes etc. are being kept in place for buses that
53 std::vector<AudioMixer::BusSettings> bus_settings;
55 std::map<DeviceSpec, DeviceInfo> devices; // Needs no lock, accessed only on the UI thread.
56 AudioMixer::state_changed_callback_t saved_callback;
59 #endif // !defined(_INPUT_MAPPING_DIALOG_H)