--- qsampler/trunk/src/qsamplerDeviceForm.h 2007/11/04 23:37:47 1470 +++ qsampler/trunk/src/qsamplerDeviceForm.h 2007/11/22 11:10:44 1509 @@ -25,27 +25,28 @@ #include "ui_qsamplerDeviceForm.h" -#include "qsamplerMainForm.h" +#include "qsamplerDevice.h" + namespace QSampler { class MainForm; -class DeviceForm : public QDialog { -Q_OBJECT +class DeviceForm : public QDialog +{ + Q_OBJECT + public: - DeviceForm(QWidget* parent = 0, Qt::WFlags f = 0); + + DeviceForm(QWidget *pParent = NULL, Qt::WindowFlags wflags = 0); ~DeviceForm(); - void showEvent(QShowEvent* pShowEvent); - void setDeviceTypeMode(qsamplerDevice::qsamplerDeviceType deviceType); + void setDeviceTypeMode(qsamplerDevice::DeviceType deviceType); void setDriverName(const QString& sDriverName); void setDevice(qsamplerDevice* pDevice); -signals: - void devicesChanged(); - public slots: + void createDevice(); void deleteDevice(); void refreshDevices(); @@ -56,28 +57,38 @@ void changeDevicePortParam(int iRow, int iCol); void deviceListViewContextMenu(const QPoint& pos); void stabilizeForm(); + void updateCellRenderers(); + void updateCellRenderers(const QModelIndex& topLeft, const QModelIndex& bottomRight); + void updatePortCellRenderers(); + void updatePortCellRenderers(const QModelIndex& topLeft, const QModelIndex& bottomRight); + +signals: + + void devicesChanged(); 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; + void showEvent(QShowEvent* pShowEvent); void hideEvent(QHideEvent* pHideEvent); private: - Ui::qsamplerDeviceForm ui; - DeviceParamModel deviceParamModel; - DeviceParamDelegate deviceParamDelegate; + Ui::qsamplerDeviceForm m_ui; + + DeviceParamModel m_deviceParamModel; + DeviceParamDelegate m_deviceParamDelegate; + + PortParamModel m_devicePortParamModel; + DeviceParamDelegate m_devicePortParamDelegate; - DeviceParamModel devicePortParamModel; - DeviceParamDelegate devicePortParamDelegate; + lscp_client_t *m_pClient; + int m_iDirtySetup; + int m_iDirtyCount; + bool m_bNewDevice; + qsamplerDevice::DeviceType m_deviceType; + qsamplerDevice::DeviceType m_deviceTypeMode; + qsamplerDeviceItem *m_pAudioItems; + qsamplerDeviceItem *m_pMidiItems; }; } // namespace QSampler