1 |
capela |
1464 |
// qsamplerChannelForm.h |
2 |
|
|
// |
3 |
|
|
/**************************************************************************** |
4 |
|
|
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
|
|
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 __qsamplerChannelForm_h |
24 |
|
|
#define __qsamplerChannelForm_h |
25 |
|
|
|
26 |
schoenebeck |
1461 |
#include "ui_qsamplerChannelForm.h" |
27 |
|
|
|
28 |
|
|
#include "qsamplerDevice.h" |
29 |
|
|
#include "qsamplerChannel.h" |
30 |
|
|
#include "qsamplerDeviceForm.h" |
31 |
|
|
|
32 |
|
|
|
33 |
|
|
namespace QSampler { |
34 |
|
|
|
35 |
capela |
1509 |
class ChannelForm : public QDialog |
36 |
|
|
{ |
37 |
|
|
Q_OBJECT |
38 |
|
|
|
39 |
schoenebeck |
1461 |
public: |
40 |
capela |
1509 |
|
41 |
schoenebeck |
1461 |
ChannelForm(QWidget* parent = 0); |
42 |
|
|
~ChannelForm(); |
43 |
|
|
|
44 |
|
|
void setup(qsamplerChannel* pChannel); |
45 |
capela |
1509 |
|
46 |
|
|
void setupDevice(qsamplerDevice* pDevice, |
47 |
|
|
qsamplerDevice::DeviceType deviceTypeMode, |
48 |
|
|
const QString& sDriverName); |
49 |
|
|
|
50 |
schoenebeck |
1461 |
void selectMidiDriverItem(const QString& sMidiDriver); |
51 |
|
|
void selectMidiDeviceItem(int iMidiItem); |
52 |
|
|
void selectAudioDriverItem(const QString& sAudioDriver); |
53 |
|
|
void selectAudioDeviceItem(int iAudioItem); |
54 |
|
|
|
55 |
capela |
1509 |
protected slots: |
56 |
schoenebeck |
1461 |
|
57 |
|
|
void accept(); |
58 |
|
|
void reject(); |
59 |
|
|
void openInstrumentFile(); |
60 |
|
|
void updateInstrumentName(); |
61 |
|
|
void selectMidiDriver(const QString& sMidiDriver); |
62 |
|
|
void selectMidiDevice(int iMidiItem); |
63 |
|
|
void setupMidiDevice(); |
64 |
|
|
void selectAudioDriver(const QString& sAudioDriver); |
65 |
|
|
void selectAudioDevice(int iAudioItem); |
66 |
|
|
void setupAudioDevice(); |
67 |
|
|
void updateDevices(); |
68 |
|
|
void optionsChanged(); |
69 |
|
|
void stabilizeForm(); |
70 |
capela |
1509 |
|
71 |
schoenebeck |
1489 |
void updateTableCellRenderers(); |
72 |
|
|
void updateTableCellRenderers(const QModelIndex& topLeft, const QModelIndex& bottomRight); |
73 |
schoenebeck |
1461 |
|
74 |
|
|
private: |
75 |
capela |
1509 |
|
76 |
|
|
Ui::qsamplerChannelForm m_ui; |
77 |
|
|
|
78 |
|
|
qsamplerChannel* m_pChannel; |
79 |
|
|
int m_iDirtySetup; |
80 |
|
|
int m_iDirtyCount; |
81 |
|
|
QList<qsamplerDevice *> m_audioDevices; |
82 |
|
|
QList<qsamplerDevice *> m_midiDevices; |
83 |
|
|
DeviceForm* m_pDeviceForm; |
84 |
|
|
ChannelRoutingModel m_routingModel; |
85 |
|
|
ChannelRoutingDelegate m_routingDelegate; |
86 |
schoenebeck |
1461 |
}; |
87 |
|
|
|
88 |
|
|
} // namespace QSampler |
89 |
|
|
|
90 |
capela |
1464 |
#endif // __qsamplerChannelForm_h |
91 |
|
|
|
92 |
|
|
|
93 |
|
|
// end of qsamplerChannelForm.h |