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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1486 - (show annotations) (download) (as text)
Sat Nov 17 02:02:28 2007 UTC (16 years, 5 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 2897 byte(s)
* Qt4 migration: finished / fixed device management dialog.
* Fixed creation of devices (don't try to set device parameters which the
  user did not touch in the device creation dialog, this bug already
  existed in the Qt3 version of QSampler).

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

  ViewVC Help
Powered by ViewVC