1 |
capela |
1464 |
// qsamplerDeviceForm.h |
2 |
|
|
// |
3 |
|
|
/**************************************************************************** |
4 |
capela |
1840 |
Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
capela |
1464 |
Copyright (C) 2007, Christian Schoenebeck |
6 |
schoenebeck |
1461 |
|
7 |
capela |
1464 |
This program is free software; you can redistribute it and/or |
8 |
|
|
modify it under the terms of the GNU General Public License |
9 |
|
|
as published by the Free Software Foundation; either version 2 |
10 |
|
|
of the License, or (at your option) any later version. |
11 |
|
|
|
12 |
|
|
This program is distributed in the hope that it will be useful, |
13 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
|
|
GNU General Public License for more details. |
16 |
|
|
|
17 |
|
|
You should have received a copy of the GNU General Public License along |
18 |
|
|
with this program; if not, write to the Free Software Foundation, Inc., |
19 |
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20 |
|
|
|
21 |
|
|
*****************************************************************************/ |
22 |
|
|
|
23 |
|
|
#ifndef __qsamplerDeviceForm_h |
24 |
|
|
#define __qsamplerDeviceForm_h |
25 |
|
|
|
26 |
schoenebeck |
1461 |
#include "ui_qsamplerDeviceForm.h" |
27 |
|
|
|
28 |
capela |
1473 |
#include "qsamplerDevice.h" |
29 |
schoenebeck |
1461 |
|
30 |
capela |
1499 |
|
31 |
schoenebeck |
1461 |
namespace QSampler { |
32 |
|
|
|
33 |
capela |
1558 |
//------------------------------------------------------------------------- |
34 |
|
|
// QSampler::DeviceForm -- Device form interface. |
35 |
|
|
// |
36 |
schoenebeck |
1461 |
|
37 |
capela |
1509 |
class DeviceForm : public QDialog |
38 |
|
|
{ |
39 |
|
|
Q_OBJECT |
40 |
|
|
|
41 |
schoenebeck |
1461 |
public: |
42 |
capela |
1509 |
|
43 |
capela |
1510 |
DeviceForm(QWidget *pParent = NULL, Qt::WindowFlags wflags = 0); |
44 |
|
|
~DeviceForm(); |
45 |
schoenebeck |
1461 |
|
46 |
capela |
1558 |
void setDeviceTypeMode(Device::DeviceType deviceType); |
47 |
capela |
1510 |
void setDriverName(const QString& sDriverName); |
48 |
capela |
1558 |
void setDevice(Device *pDevice); |
49 |
schoenebeck |
1461 |
|
50 |
capela |
1509 |
public slots: |
51 |
schoenebeck |
1461 |
|
52 |
capela |
1510 |
void createDevice(); |
53 |
|
|
void deleteDevice(); |
54 |
|
|
void refreshDevices(); |
55 |
|
|
void selectDriver(const QString& sDriverName); |
56 |
|
|
void selectDevice(); |
57 |
|
|
void selectDevicePort(int iPort); |
58 |
|
|
void changeDeviceParam(int iRow, int iCol); |
59 |
|
|
void changeDevicePortParam(int iRow, int iCol); |
60 |
|
|
void deviceListViewContextMenu(const QPoint& pos); |
61 |
|
|
void stabilizeForm(); |
62 |
schoenebeck |
1461 |
|
63 |
capela |
1510 |
void updateCellRenderers(); |
64 |
|
|
void updateCellRenderers( |
65 |
|
|
const QModelIndex& topLeft, const QModelIndex& bottomRight); |
66 |
|
|
void updatePortCellRenderers(); |
67 |
|
|
void updatePortCellRenderers( |
68 |
|
|
const QModelIndex& topLeft, const QModelIndex& bottomRight); |
69 |
|
|
|
70 |
capela |
1509 |
signals: |
71 |
|
|
|
72 |
capela |
1510 |
void devicesChanged(); |
73 |
capela |
1509 |
|
74 |
schoenebeck |
1461 |
protected: |
75 |
capela |
1509 |
|
76 |
capela |
1510 |
void showEvent(QShowEvent* pShowEvent); |
77 |
|
|
void hideEvent(QHideEvent* pHideEvent); |
78 |
capela |
1509 |
|
79 |
|
|
private: |
80 |
|
|
|
81 |
capela |
1510 |
Ui::qsamplerDeviceForm m_ui; |
82 |
capela |
1509 |
|
83 |
capela |
1510 |
DeviceParamModel m_deviceParamModel; |
84 |
|
|
DeviceParamDelegate m_deviceParamDelegate; |
85 |
capela |
1509 |
|
86 |
capela |
1510 |
PortParamModel m_devicePortParamModel; |
87 |
|
|
DeviceParamDelegate m_devicePortParamDelegate; |
88 |
capela |
1509 |
|
89 |
capela |
1510 |
lscp_client_t *m_pClient; |
90 |
|
|
int m_iDirtySetup; |
91 |
|
|
int m_iDirtyCount; |
92 |
|
|
bool m_bNewDevice; |
93 |
capela |
1558 |
Device::DeviceType m_deviceType; |
94 |
|
|
Device::DeviceType m_deviceTypeMode; |
95 |
|
|
DeviceItem *m_pAudioItems; |
96 |
|
|
DeviceItem *m_pMidiItems; |
97 |
schoenebeck |
1461 |
}; |
98 |
|
|
|
99 |
|
|
} // namespace QSampler |
100 |
|
|
|
101 |
capela |
1510 |
|
102 |
capela |
1464 |
#endif // __qsamplerDeviceForm_h |
103 |
|
|
|
104 |
|
|
|
105 |
|
|
// end of qsamplerDeviceForm.h |