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

Diff of /qsampler/trunk/src/qsamplerDeviceForm.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 1509 by capela, Thu Nov 22 11:10:44 2007 UTC
# Line 1  Line 1 
1  #ifndef QSAMPLER_DEVICE_FORM_H  // qsamplerDeviceForm.h
2  #define QSAMPLER_DEVICE_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 __qsamplerDeviceForm_h
24    #define __qsamplerDeviceForm_h
25    
26  #include "ui_qsamplerDeviceForm.h"  #include "ui_qsamplerDeviceForm.h"
27    
28  #include "qsamplerMainForm.h"  #include "qsamplerDevice.h"
29    
30    
31  namespace QSampler {  namespace QSampler {
32    
33  class MainForm;  class MainForm;
34    
35  class DeviceForm : public QDialog {  class DeviceForm : public QDialog
36  Q_OBJECT  {
37            Q_OBJECT
38    
39  public:  public:
40      DeviceForm(QWidget* parent = 0, Qt::WFlags f = 0);  
41        DeviceForm(QWidget *pParent = NULL, Qt::WindowFlags wflags = 0);
42     ~DeviceForm();     ~DeviceForm();
     void showEvent(QShowEvent* pShowEvent);  
43    
44      void setDeviceTypeMode(qsamplerDevice::qsamplerDeviceType deviceType);      void setDeviceTypeMode(qsamplerDevice::DeviceType deviceType);
45      void setDriverName(const QString& sDriverName);      void setDriverName(const QString& sDriverName);
46      void setDevice(qsamplerDevice* pDevice);      void setDevice(qsamplerDevice* pDevice);
47    
 signals:  
     void devicesChanged();  
   
48  public slots:  public slots:
49    
50      void createDevice();      void createDevice();
51      void deleteDevice();      void deleteDevice();
52      void refreshDevices();      void refreshDevices();
# Line 32  public slots: Line 55  public slots:
55      void selectDevicePort(int iPort);      void selectDevicePort(int iPort);
56      void changeDeviceParam(int iRow, int iCol);      void changeDeviceParam(int iRow, int iCol);
57      void changeDevicePortParam(int iRow, int iCol);      void changeDevicePortParam(int iRow, int iCol);
58      void contextMenu(QTreeWidgetItem* item, const QPoint&, int);      void deviceListViewContextMenu(const QPoint& pos);
59      void stabilizeForm();      void stabilizeForm();
60        void updateCellRenderers();
61        void updateCellRenderers(const QModelIndex& topLeft, const QModelIndex& bottomRight);
62        void updatePortCellRenderers();
63        void updatePortCellRenderers(const QModelIndex& topLeft, const QModelIndex& bottomRight);
64    
65    signals:
66    
67        void devicesChanged();
68    
69  protected:  protected:
     MainForm *m_pMainForm;  
     lscp_client_t *m_pClient;  
     int m_iDirtySetup;  
     int m_iDirtyCount;  
     bool m_bNewDevice;  
     qsamplerDevice::qsamplerDeviceType m_deviceType;  
     qsamplerDevice::qsamplerDeviceType m_deviceTypeMode;  
     qsamplerDeviceItem *m_pAudioItems;  
     qsamplerDeviceItem *m_pMidiItems;  
70    
71        void showEvent(QShowEvent* pShowEvent);
72      void hideEvent(QHideEvent* pHideEvent);      void hideEvent(QHideEvent* pHideEvent);
73    
74  private:  private:
     Ui::qsamplerDeviceForm ui;  
75    
76      DeviceParamModel    deviceParamModel;      Ui::qsamplerDeviceForm m_ui;
77      DeviceParamDelegate deviceParamDelegate;  
78        DeviceParamModel    m_deviceParamModel;
79        DeviceParamDelegate m_deviceParamDelegate;
80    
81      DeviceParamModel    devicePortParamModel;      PortParamModel      m_devicePortParamModel;
82      DeviceParamDelegate devicePortParamDelegate;      DeviceParamDelegate m_devicePortParamDelegate;
83    
84        lscp_client_t *m_pClient;
85        int m_iDirtySetup;
86        int m_iDirtyCount;
87        bool m_bNewDevice;
88        qsamplerDevice::DeviceType m_deviceType;
89        qsamplerDevice::DeviceType m_deviceTypeMode;
90        qsamplerDeviceItem *m_pAudioItems;
91        qsamplerDeviceItem *m_pMidiItems;
92  };  };
93    
94  } // namespace QSampler  } // namespace QSampler
95    
96  #endif // QSAMPLER_DEVICE_FORM_H  #endif // __qsamplerDeviceForm_h
97    
98    
99    // end of qsamplerDeviceForm.h

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

  ViewVC Help
Powered by ViewVC