/[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 3555 by capela, Tue Aug 13 10:19:32 2019 UTC
# Line 1  Line 1 
1  #ifndef QSAMPLER_DEVICE_FORM_H  // qsamplerDeviceForm.h
2  #define QSAMPLER_DEVICE_FORM_H  //
3    /****************************************************************************
4       Copyright (C) 2004-2019, 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;  //-------------------------------------------------------------------------
34    // QSampler::DeviceForm -- Device form interface.
35    //
36    
37    class DeviceForm : public QDialog
38    {
39            Q_OBJECT
40    
 class DeviceForm : public QDialog {  
 Q_OBJECT  
41  public:  public:
     DeviceForm(QWidget* parent = 0, Qt::WFlags f = 0);  
    ~DeviceForm();  
     void showEvent(QShowEvent* pShowEvent);  
   
     void setDeviceTypeMode(qsamplerDevice::qsamplerDeviceType deviceType);  
     void setDriverName(const QString& sDriverName);  
     void setDevice(qsamplerDevice* pDevice);  
42    
43  signals:          DeviceForm(QWidget *pParent = nullptr, Qt::WindowFlags wflags = 0);
44      void devicesChanged();          ~DeviceForm();
45    
46            void setDeviceTypeMode(Device::DeviceType deviceType);
47            void setDriverName(const QString& sDriverName);
48            void setDevice(Device *pDevice);
49    
50  public slots:  public slots:
51      void createDevice();  
52      void deleteDevice();          void createDevice();
53      void refreshDevices();          void deleteDevice();
54      void selectDriver(const QString& sDriverName);          void refreshDevices();
55      void selectDevice();          void selectDriver(const QString& sDriverName);
56      void selectDevicePort(int iPort);          void selectDevice();
57      void changeDeviceParam(int iRow, int iCol);          void selectDevicePort(int iPort);
58      void changeDevicePortParam(int iRow, int iCol);          void changeDeviceParam(int iRow, int iCol);
59      void contextMenu(QTreeWidgetItem* item, const QPoint&, int);          void changeDevicePortParam(int iRow, int iCol);
60      void stabilizeForm();          void deviceListViewContextMenu(const QPoint& pos);
61            void stabilizeForm();
62    
63            void updateCellRenderers();
64            void updateCellRenderers(
65                    const QModelIndex& topLeft, const QModelIndex& bottomRight);
66            void updatePortCellRenderers();
67            void updatePortCellRenderers(
68                    const QModelIndex& topLeft, const QModelIndex& bottomRight);
69    
70    signals:
71    
72            void devicesChanged();
73    
74  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;  
75    
76      void hideEvent(QHideEvent* pHideEvent);          void showEvent(QShowEvent* pShowEvent);
77            void hideEvent(QHideEvent* pHideEvent);
78    
79  private:  private:
     Ui::qsamplerDeviceForm ui;  
80    
81      DeviceParamModel    deviceParamModel;          Ui::qsamplerDeviceForm m_ui;
82      DeviceParamDelegate deviceParamDelegate;  
83            DeviceParamModel    m_deviceParamModel;
84            DeviceParamDelegate m_deviceParamDelegate;
85    
86            PortParamModel      m_devicePortParamModel;
87            DeviceParamDelegate m_devicePortParamDelegate;
88    
89      DeviceParamModel    devicePortParamModel;          lscp_client_t *m_pClient;
90      DeviceParamDelegate devicePortParamDelegate;          int m_iDirtySetup;
91            int m_iDirtyCount;
92            bool m_bNewDevice;
93            Device::DeviceType m_deviceType;
94            Device::DeviceType m_deviceTypeMode;
95            DeviceItem *m_pAudioItems;
96            DeviceItem *m_pMidiItems;
97  };  };
98    
99  } // namespace QSampler  } // namespace QSampler
100    
101  #endif // QSAMPLER_DEVICE_FORM_H  
102    #endif // __qsamplerDeviceForm_h
103    
104    
105    // end of qsamplerDeviceForm.h

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

  ViewVC Help
Powered by ViewVC