#ifndef MAINWINDOW_H #define MAINWINDOW_H #include #include "sustainpedalkeyboard.h" #include #include #include #include QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); private: Ui::MainWindow *ui; void rescan_device_list(void); UsbDevice *get_device_from_sn(const std::string &sn); std::vector m_usb_devices; std::unique_ptr m_currently_selected_dev; UsbHidKeyEvent create_key_event_pedal1(); UsbHidKeyEvent create_key_event_pedal2(); private slots: void rescan_clicked(); void device_changed(QString sn); void clear_keyboard_config(); void update_gui_from_keyboard(); void on_buttonProgPedal1_clicked(); void on_buttonProgPedal2_clicked(); void enable_pedal_gui_elements(bool enable); protected: void closeEvent(QCloseEvent *event); void showEvent(QShowEvent *event); }; #endif // MAINWINDOW_H