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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1461  
changed lines
  Added in v.1510

  ViewVC Help
Powered by ViewVC