ACMX 2.139.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
midi-settings.hpp
Go to the documentation of this file.
1#ifndef __MIDI_SETTINGS_H__
2#define __MIDI_SETTINGS_H__
3
4/**
5 * @file midi-settings.hpp
6 * @brief Dialog for enabling MIDI control and selecting mapping/device settings.
7 */
8
9#include <QCheckBox>
10#include <QComboBox>
11#include <QDialog>
12#include <QLabel>
13#include <QLineEdit>
14#include <QPushButton>
15#include <QVBoxLayout>
16
17/**
18 * @brief MIDI settings dialog used by the main launcher UI.
19 */
20class MidiSettings : public QDialog {
21 Q_OBJECT
22
23 public:
24 explicit MidiSettings(const QString &executablePath, QWidget *parent = nullptr);
25
26 /// @brief Return whether MIDI support is enabled.
27 bool isMidiEnabled() const;
28 /// @brief Return path to the active MIDI mapping config file.
29 QString getMidiConfigFile() const;
30 /// @brief Return selected MIDI input device index.
31 int getMidiDeviceIndex() const;
32
33 private slots:
34 void browseConfigFile();
35 void launchMidiMapTool();
36 void refreshDevices();
37
38 private:
40 void loadUiState();
41 void saveUiState();
42
43 QCheckBox *enableCheckBox;
44 QLineEdit *configFileEdit;
45 QPushButton *browseButton;
46 QPushButton *launchMapToolButton;
47 QComboBox *deviceComboBox;
48 QPushButton *refreshButton;
49 QPushButton *okButton;
50 QPushButton *cancelButton;
51 QString execPath;
52};
53
54#endif
QLineEdit * configFileEdit
QPushButton * okButton
QCheckBox * enableCheckBox
QPushButton * cancelButton
void browseConfigFile()
void launchMidiMapTool()
QPushButton * launchMapToolButton
QComboBox * deviceComboBox
QPushButton * browseButton
MidiSettings(const QString &executablePath, QWidget *parent=nullptr)
QPushButton * refreshButton
int getMidiDeviceIndex() const
Return selected MIDI input device index.
QString getMidiConfigFile() const
Return path to the active MIDI mapping config file.
bool isMidiEnabled() const
Return whether MIDI support is enabled.
void populateMidiDevices()