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

Contents of /qsampler/trunk/src/qsamplerDeviceForm.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2074 - (show annotations) (download) (as text)
Mon Mar 29 17:00:30 2010 UTC (14 years ago) by capela
File MIME type: text/x-c++hdr
File size: 2847 byte(s)
* General source tree layout and build configuration change.

1 // qsamplerDeviceForm.h
2 //
3 /****************************************************************************
4 Copyright (C) 2004-2010, 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"
27
28 #include "qsamplerDevice.h"
29
30
31 namespace QSampler {
32
33 //-------------------------------------------------------------------------
34 // QSampler::DeviceForm -- Device form interface.
35 //
36
37 class DeviceForm : public QDialog
38 {
39 Q_OBJECT
40
41 public:
42
43 DeviceForm(QWidget *pParent = NULL, Qt::WindowFlags wflags = 0);
44 ~DeviceForm();
45
46 void setDeviceTypeMode(Device::DeviceType deviceType);
47 void setDriverName(const QString& sDriverName);
48 void setDevice(Device *pDevice);
49
50 public slots:
51
52 void createDevice();
53 void deleteDevice();
54 void refreshDevices();
55 void selectDriver(const QString& sDriverName);
56 void selectDevice();
57 void selectDevicePort(int iPort);
58 void changeDeviceParam(int iRow, int iCol);
59 void changeDevicePortParam(int iRow, int iCol);
60 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:
75
76 void showEvent(QShowEvent* pShowEvent);
77 void hideEvent(QHideEvent* pHideEvent);
78
79 private:
80
81 Ui::qsamplerDeviceForm m_ui;
82
83 DeviceParamModel m_deviceParamModel;
84 DeviceParamDelegate m_deviceParamDelegate;
85
86 PortParamModel m_devicePortParamModel;
87 DeviceParamDelegate m_devicePortParamDelegate;
88
89 lscp_client_t *m_pClient;
90 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
100
101
102 #endif // __qsamplerDeviceForm_h
103
104
105 // end of qsamplerDeviceForm.h

  ViewVC Help
Powered by ViewVC