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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1499 - (show annotations) (download) (as text)
Tue Nov 20 16:48:04 2007 UTC (16 years, 5 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2898 byte(s)
* Qt4 migration: one first step forward to kiss Qt3Support goodbye.

1 // qsamplerDeviceForm.h
2 //
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"
27
28 #include "qsamplerDevice.h"
29
30
31 namespace QSampler {
32
33 class MainForm;
34
35 class DeviceForm : public QDialog {
36 Q_OBJECT
37 public:
38 DeviceForm(QWidget* parent = 0, Qt::WFlags f = 0);
39 ~DeviceForm();
40 void showEvent(QShowEvent* pShowEvent);
41
42 void setDeviceTypeMode(qsamplerDevice::qsamplerDeviceType deviceType);
43 void setDriverName(const QString& sDriverName);
44 void setDevice(qsamplerDevice* pDevice);
45
46 signals:
47 void devicesChanged();
48
49 public slots:
50 void createDevice();
51 void deleteDevice();
52 void refreshDevices();
53 void selectDriver(const QString& sDriverName);
54 void selectDevice();
55 void selectDevicePort(int iPort);
56 void changeDeviceParam(int iRow, int iCol);
57 void changeDevicePortParam(int iRow, int iCol);
58 void deviceListViewContextMenu(const QPoint& pos);
59 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 protected:
66 MainForm *m_pMainForm;
67 lscp_client_t *m_pClient;
68 int m_iDirtySetup;
69 int m_iDirtyCount;
70 bool m_bNewDevice;
71 qsamplerDevice::qsamplerDeviceType m_deviceType;
72 qsamplerDevice::qsamplerDeviceType m_deviceTypeMode;
73 qsamplerDeviceItem *m_pAudioItems;
74 qsamplerDeviceItem *m_pMidiItems;
75
76 void hideEvent(QHideEvent* pHideEvent);
77
78 private:
79 Ui::qsamplerDeviceForm ui;
80
81 DeviceParamModel deviceParamModel;
82 DeviceParamDelegate deviceParamDelegate;
83
84 PortParamModel devicePortParamModel;
85 DeviceParamDelegate devicePortParamDelegate;
86 };
87
88 } // namespace QSampler
89
90 #endif // __qsamplerDeviceForm_h
91
92
93 // end of qsamplerDeviceForm.h

  ViewVC Help
Powered by ViewVC