34 |
// Special QListViewItem::rtti() unique return value. |
// Special QListViewItem::rtti() unique return value. |
35 |
#define QSAMPLER_DEVICE_ITEM 1001 |
#define QSAMPLER_DEVICE_ITEM 1001 |
36 |
|
|
37 |
|
// Early forward declaration. |
38 |
|
class qsamplerDevicePort; |
39 |
|
|
40 |
|
|
41 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
42 |
// qsamplerDeviceParam - MIDI/Audio Device parameter structure. |
// qsamplerDeviceParam - MIDI/Audio Device parameter structure. |
70 |
QString value; |
QString value; |
71 |
}; |
}; |
72 |
|
|
73 |
// A typedef'd parameter QMap. |
// Typedef'd parameter QMap. |
74 |
typedef QMap<QString, qsamplerDeviceParam> qsamplerDeviceParamMap; |
typedef QMap<QString, qsamplerDeviceParam> qsamplerDeviceParamMap; |
75 |
|
|
76 |
|
// Typedef'd device port/channels QptrList. |
77 |
|
typedef QPtrList<qsamplerDevicePort> qsamplerDevicePortList; |
78 |
|
|
79 |
|
|
80 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
81 |
// qsamplerDevice - MIDI/Audio Device structure. |
// qsamplerDevice - MIDI/Audio Device structure. |
109 |
const QString& driverName() const; |
const QString& driverName() const; |
110 |
const QString& deviceName() const; |
const QString& deviceName() const; |
111 |
|
|
112 |
|
// Set the proper device parameter value. |
113 |
|
void setParam (const QString& sParam, const QString& sValue); |
114 |
|
|
115 |
// Device parameters accessor. |
// Device parameters accessor. |
116 |
qsamplerDeviceParamMap& params(); |
const qsamplerDeviceParamMap& params() const; |
117 |
|
|
118 |
// Update/refresh device/driver data. |
// Device port/channel list accessor. |
119 |
void refresh(); |
qsamplerDevicePortList& ports(); |
120 |
|
|
121 |
|
// Device port/channel list refreshner. |
122 |
|
void refresh(lscp_client_t *pClient); |
123 |
|
|
124 |
// Device ids enumerator. |
// Device ids enumerator. |
125 |
static int *getDevices(lscp_client_t *pClient, |
static int *getDevices(lscp_client_t *pClient, |
126 |
qsamplerDeviceType deviceType); |
qsamplerDeviceType deviceType); |
140 |
|
|
141 |
// Device parameter list. |
// Device parameter list. |
142 |
qsamplerDeviceParamMap m_params; |
qsamplerDeviceParamMap m_params; |
143 |
|
|
144 |
|
// Device port/channel list. |
145 |
|
qsamplerDevicePortList m_ports; |
146 |
|
}; |
147 |
|
|
148 |
|
|
149 |
|
//------------------------------------------------------------------------- |
150 |
|
// qsamplerDevicePort - MIDI/Audio Device port/channel structure. |
151 |
|
// |
152 |
|
|
153 |
|
class qsamplerDevicePort |
154 |
|
{ |
155 |
|
public: |
156 |
|
|
157 |
|
// Constructor. |
158 |
|
qsamplerDevicePort(lscp_client_t *pClient, |
159 |
|
const qsamplerDevice& device, int iPortID); |
160 |
|
// Default destructor. |
161 |
|
~qsamplerDevicePort(); |
162 |
|
|
163 |
|
// Initializer. |
164 |
|
void setDevicePort(lscp_client_t *pClient, |
165 |
|
const qsamplerDevice& device, int iPortID); |
166 |
|
|
167 |
|
// Device port property accessors. |
168 |
|
int portID() const; |
169 |
|
const QString& portName() const; |
170 |
|
|
171 |
|
// Device port parameters accessor. |
172 |
|
const qsamplerDeviceParamMap& params() const; |
173 |
|
|
174 |
|
// Set the proper device port/channel parameter value. |
175 |
|
void setParam (const QString& sParam, const QString& sValue); |
176 |
|
|
177 |
|
private: |
178 |
|
|
179 |
|
// Instance variables. |
180 |
|
int m_iPortID; |
181 |
|
QString m_sPortName; |
182 |
|
|
183 |
|
// Device port parameter list. |
184 |
|
qsamplerDeviceParamMap m_params; |
185 |
}; |
}; |
186 |
|
|
187 |
|
|
229 |
// Default destructor. |
// Default destructor. |
230 |
~qsamplerDeviceParamTable(); |
~qsamplerDeviceParamTable(); |
231 |
|
|
232 |
// Client/device descriptor selector. |
// Common parameter table renderer. |
233 |
void refresh(qsamplerDevice& device); |
void refresh(const qsamplerDeviceParamMap& params, bool bEditable); |
234 |
}; |
}; |
235 |
|
|
236 |
|
|
243 |
public: |
public: |
244 |
|
|
245 |
// Constructor. |
// Constructor. |
246 |
qsamplerDeviceParamTableSpinBox (QTable *pTable, EditType editType); |
qsamplerDeviceParamTableSpinBox (QTable *pTable, EditType editType, |
247 |
|
const QString& sText); |
248 |
|
|
249 |
// Public accessors. |
// Public accessors. |
250 |
void setMinValue(int iMinValue); |
void setMinValue(int iMinValue); |
260 |
private: |
private: |
261 |
|
|
262 |
// Initial value holders. |
// Initial value holders. |
263 |
|
int m_iValue; |
264 |
int m_iMinValue; |
int m_iMinValue; |
265 |
int m_iMaxValue; |
int m_iMaxValue; |
|
int m_iValue; |
|
266 |
}; |
}; |
267 |
|
|
268 |
|
|