1 |
schoenebeck |
1461 |
#ifndef QSAMPLER_DEVICE_FORM_H |
2 |
|
|
#define QSAMPLER_DEVICE_FORM_H |
3 |
|
|
|
4 |
|
|
#include "ui_qsamplerDeviceForm.h" |
5 |
|
|
|
6 |
|
|
#include "qsamplerMainForm.h" |
7 |
|
|
|
8 |
|
|
namespace QSampler { |
9 |
|
|
|
10 |
|
|
class MainForm; |
11 |
|
|
|
12 |
|
|
class DeviceForm : public QDialog { |
13 |
|
|
Q_OBJECT |
14 |
|
|
public: |
15 |
|
|
DeviceForm(QWidget* parent = 0, Qt::WFlags f = 0); |
16 |
|
|
~DeviceForm(); |
17 |
|
|
void showEvent(QShowEvent* pShowEvent); |
18 |
|
|
|
19 |
|
|
void setDeviceTypeMode(qsamplerDevice::qsamplerDeviceType deviceType); |
20 |
|
|
void setDriverName(const QString& sDriverName); |
21 |
|
|
void setDevice(qsamplerDevice* pDevice); |
22 |
|
|
|
23 |
|
|
signals: |
24 |
|
|
void devicesChanged(); |
25 |
|
|
|
26 |
|
|
public slots: |
27 |
|
|
void createDevice(); |
28 |
|
|
void deleteDevice(); |
29 |
|
|
void refreshDevices(); |
30 |
|
|
void selectDriver(const QString& sDriverName); |
31 |
|
|
void selectDevice(); |
32 |
|
|
void selectDevicePort(int iPort); |
33 |
|
|
void changeDeviceParam(int iRow, int iCol); |
34 |
|
|
void changeDevicePortParam(int iRow, int iCol); |
35 |
|
|
void contextMenu(QTreeWidgetItem* item, const QPoint&, int); |
36 |
|
|
void stabilizeForm(); |
37 |
|
|
|
38 |
|
|
protected: |
39 |
|
|
MainForm *m_pMainForm; |
40 |
|
|
lscp_client_t *m_pClient; |
41 |
|
|
int m_iDirtySetup; |
42 |
|
|
int m_iDirtyCount; |
43 |
|
|
bool m_bNewDevice; |
44 |
|
|
qsamplerDevice::qsamplerDeviceType m_deviceType; |
45 |
|
|
qsamplerDevice::qsamplerDeviceType m_deviceTypeMode; |
46 |
|
|
qsamplerDeviceItem *m_pAudioItems; |
47 |
|
|
qsamplerDeviceItem *m_pMidiItems; |
48 |
|
|
|
49 |
|
|
void hideEvent(QHideEvent* pHideEvent); |
50 |
|
|
|
51 |
|
|
private: |
52 |
|
|
Ui::qsamplerDeviceForm ui; |
53 |
|
|
|
54 |
|
|
DeviceParamModel deviceParamModel; |
55 |
|
|
DeviceParamDelegate deviceParamDelegate; |
56 |
|
|
|
57 |
|
|
DeviceParamModel devicePortParamModel; |
58 |
|
|
DeviceParamDelegate devicePortParamDelegate; |
59 |
|
|
}; |
60 |
|
|
|
61 |
|
|
} // namespace QSampler |
62 |
|
|
|
63 |
|
|
#endif // QSAMPLER_DEVICE_FORM_H |