X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=input_mapping_dialog.h;h=640644e3898ce9cca25fc950bf9e350477c1b17b;hp=05bc223ee03efc991fbbdd275b5433e6341ccc25;hb=refs%2Fheads%2Fffmpeg-audio-only;hpb=41c91a56e836c4e81fcee2f3728ca09c0cc2a7bd diff --git a/input_mapping_dialog.h b/input_mapping_dialog.h index 05bc223..640644e 100644 --- a/input_mapping_dialog.h +++ b/input_mapping_dialog.h @@ -2,33 +2,44 @@ #define _INPUT_MAPPING_DIALOG_H #include -#include +#include +#include #include -#include -#include "mixer.h" +#include "audio_mixer.h" +#include "input_mapping.h" + +class QObject; namespace Ui { class InputMappingDialog; } // namespace Ui +class QComboBox; + class InputMappingDialog : public QDialog { Q_OBJECT public: InputMappingDialog(); + ~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(unsigned row, int index); + 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 save_clicked(); + void load_clicked(); + void update_button_state(); Ui::InputMappingDialog *ui; InputMapping mapping; // Under edit. Will be committed on OK. @@ -38,7 +49,13 @@ private: // held forever). InputMapping old_mapping; - const std::vector card_names; + // One for each bus in the mapping. Edited along with the mapping, + // so that old volumes etc. are being kept in place for buses that + // existed before. + std::vector bus_settings; + + std::map devices; // Needs no lock, accessed only on the UI thread. + AudioMixer::state_changed_callback_t saved_callback; }; #endif // !defined(_INPUT_MAPPING_DIALOG_H)