X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=midi_mapping_dialog.h;h=f2cd0bfe3e490a3eccaefac757c8d7d4da3c56b2;hb=cf729d2ddd503b90413987bf94a928ae31efe0d0;hp=17cdc180c0b4ffd96bf9c86fdc2deb1fb544a48f;hpb=afe996bc7dfc8689ca356d00824fbfcd632f93a2;p=nageru diff --git a/midi_mapping_dialog.h b/midi_mapping_dialog.h index 17cdc18..f2cd0bf 100644 --- a/midi_mapping_dialog.h +++ b/midi_mapping_dialog.h @@ -37,6 +37,8 @@ public: public slots: void ok_clicked(); void cancel_clicked(); + void save_clicked(); + void load_clicked(); private: static constexpr unsigned num_buses = 8; @@ -46,6 +48,7 @@ private: enum class ControlType { CONTROLLER, BUTTON }; void add_controls(const std::string &heading, ControlType control_type, const MIDIMappingProto &mapping_proto, const std::vector &controls); + void fill_controls_from_mapping(const MIDIMappingProto &mapping_proto); std::unique_ptr construct_mapping_proto_from_ui(); @@ -54,7 +57,8 @@ private: MIDIMapper *mapper; // All controllers actually laid out on the grid (we need to store them - // so that we can read its values back into the new protobuf). + // so that we can move values back and forth between the controls and + // the protobuf on save/load). struct InstantiatedSpinner { QSpinBox *spinner; unsigned bus_idx;