/[svn]/qsampler/trunk/src/qsamplerChannelForm.h
ViewVC logotype

Annotation of /qsampler/trunk/src/qsamplerChannelForm.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3435 - (hide annotations) (download) (as text)
Mon Dec 3 12:04:14 2018 UTC (5 years, 4 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2771 byte(s)
* Fixed MIDI and Audio device selection on the common sampler
  channel settings dialog.
1 capela 1464 // qsamplerChannelForm.h
2     //
3     /****************************************************************************
4 capela 3435 Copyright (C) 2004-2018, 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 __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 capela 3435 #include <QHash>
33 schoenebeck 1461
34 capela 3435
35 schoenebeck 1461 namespace QSampler {
36    
37 capela 1558 //-------------------------------------------------------------------------
38     // QSampler::Channelform -- Channel form interface.
39     //
40    
41 capela 1509 class ChannelForm : public QDialog
42     {
43     Q_OBJECT
44    
45 schoenebeck 1461 public:
46 capela 1509
47 capela 1510 ChannelForm(QWidget* pParent = NULL);
48     ~ChannelForm();
49 schoenebeck 1461
50 capela 1558 void setup(Channel* pChannel);
51 capela 1509
52 capela 1558 void setupDevice(Device* pDevice,
53     Device::DeviceType deviceTypeMode,
54 capela 1509 const QString& sDriverName);
55    
56 capela 1510 void selectMidiDriverItem(const QString& sMidiDriver);
57     void selectMidiDeviceItem(int iMidiItem);
58     void selectAudioDriverItem(const QString& sAudioDriver);
59     void selectAudioDeviceItem(int iAudioItem);
60 schoenebeck 1461
61 capela 1509 protected slots:
62 schoenebeck 1461
63 capela 1510 void accept();
64     void reject();
65     void openInstrumentFile();
66     void updateInstrumentName();
67     void selectMidiDriver(const QString& sMidiDriver);
68     void selectMidiDevice(int iMidiItem);
69     void setupMidiDevice();
70     void selectAudioDriver(const QString& sAudioDriver);
71     void selectAudioDevice(int iAudioItem);
72     void setupAudioDevice();
73     void updateDevices();
74     void optionsChanged();
75     void stabilizeForm();
76 capela 1509
77 capela 1510 void updateTableCellRenderers();
78     void updateTableCellRenderers(
79     const QModelIndex& topLeft, const QModelIndex& bottomRight);
80 schoenebeck 1461
81     private:
82 capela 1509
83 capela 1510 Ui::qsamplerChannelForm m_ui;
84 capela 1509
85 capela 1558 Channel* m_pChannel;
86 capela 1510 int m_iDirtySetup;
87     int m_iDirtyCount;
88 capela 3435 QHash<int, Device *> m_audioDevices;
89     QHash<int, Device *> m_midiDevices;
90 capela 1510 DeviceForm* m_pDeviceForm;
91     ChannelRoutingModel m_routingModel;
92     ChannelRoutingDelegate m_routingDelegate;
93 schoenebeck 1461 };
94    
95     } // namespace QSampler
96    
97 capela 1464 #endif // __qsamplerChannelForm_h
98    
99    
100     // end of qsamplerChannelForm.h

  ViewVC Help
Powered by ViewVC