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

Diff of /qsampler/trunk/src/qsamplerDeviceForm.ui.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 431 by capela, Tue Mar 8 20:12:08 2005 UTC revision 484 by capela, Tue Mar 22 12:55:29 2005 UTC
# Line 24  Line 24 
24  #include <qfiledialog.h>  #include <qfiledialog.h>
25  #include <qfileinfo.h>  #include <qfileinfo.h>
26  #include <qlistbox.h>  #include <qlistbox.h>
27    #include <qptrlist.h>
28    #include <qpopupmenu.h>
29    
30  #include "qsamplerMainForm.h"  #include "qsamplerMainForm.h"
31    
# Line 37  void qsamplerDeviceForm::init (void) Line 39  void qsamplerDeviceForm::init (void)
39          m_pMainForm   = (qsamplerMainForm *) QWidget::parentWidget();          m_pMainForm   = (qsamplerMainForm *) QWidget::parentWidget();
40          m_pClient     = NULL;          m_pClient     = NULL;
41          m_iDirtySetup = 0;          m_iDirtySetup = 0;
         m_iDirtyCount = 0;  
         m_iUntitled   = 1;  
42          m_bNewDevice  = false;          m_bNewDevice  = false;
43            m_deviceType  = qsamplerDevice::None;
44            m_pAudioItems = NULL;
45            m_pMidiItems  = NULL;
46    
47            // This an outsider (from designer), but rather important.
48            QObject::connect(DeviceParamTable, SIGNAL(valueChanged(int,int)),
49                    this, SLOT(changeDeviceParam(int,int)));
50            QObject::connect(DevicePortParamTable, SIGNAL(valueChanged(int,int)),
51                    this, SLOT(changeDevicePortParam(int,int)));
52    
53            // Initial contents.
54            refreshDevices();
55          // Try to restore normal window positioning.          // Try to restore normal window positioning.
56          adjustSize();          adjustSize();
57  }  }
# Line 89  void qsamplerDeviceForm::setClient ( lsc Line 100  void qsamplerDeviceForm::setClient ( lsc
100  }  }
101    
102    
103  // Format the displayable device configuration filename.  // Create a new device from current table view.
104  QString qsamplerDeviceForm::devicesName ( const QString& sFilename )  void qsamplerDeviceForm::createDevice (void)
 {  
         QString sDevicesName = sFilename;  
         qsamplerOptions *pOptions = m_pMainForm->options();  
         if (pOptions) {  
                 bool bCompletePath = (pOptions && pOptions->bCompletePath);  
                 if (sDevicesName.isEmpty())  
                         sDevicesName = tr("Untitled") + QString::number(m_iUntitled);  
                 else if (!bCompletePath)  
                         sDevicesName = QFileInfo(sDevicesName).fileName();  
         }  
         return sDevicesName;  
 }  
   
   
 // Window close event handlers.  
 bool qsamplerDeviceForm::queryClose (void)  
105  {  {
106          bool bQueryClose = true;          QListViewItem *pItem = DeviceListView->selectedItem();
107            if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM)
108                    return;
109    
110          if (m_iDirtyCount > 0) {          // About a brand new device instance...
111                  switch (QMessageBox::warning(this, tr("Warning"),          qsamplerDevice device(((qsamplerDeviceItem *) pItem)->device());
112                          tr("The device configuration has been changed.\n\n"          if (device.createDevice()) {
113                          "\"%1\"\n\n"                  // Now it depends on the device type...
114                          "Do you want to save the changes?")                  qsamplerDeviceItem *pRootItem = NULL;
115                          .arg(devicesName(m_sFilename)),                  switch (device.deviceType()) {
116                          tr("Save"), tr("Discard"), tr("Cancel"))) {                  case qsamplerDevice::Audio:
117                  case 0:     // Save...                          pRootItem = m_pAudioItems;
118                          saveDevices();                          break;
119                          // Fall thru....                  case qsamplerDevice::Midi:
120                  case 1:     // Discard                          pRootItem = m_pMidiItems;
121                            break;
122                    case qsamplerDevice::None:
123                          break;                          break;
                 default:    // Cancel.  
                         bQueryClose = false;  
124                  }                  }
125                    // Append the new device item.
126                    qsamplerDeviceItem *pDeviceItem = new qsamplerDeviceItem(pRootItem,
127                            m_pMainForm, device.deviceType(), device.deviceID());
128                    // Just make it the new selection...
129                    DeviceListView->setSelected(pDeviceItem, true);
130                    // Main session should be marked dirty.
131                    m_pMainForm->sessionDirty();
132          }          }
   
         return bQueryClose;  
133  }  }
134    
135    
136    // Delete current device in table view.
137  // Dirty up settings.  void qsamplerDeviceForm::deleteDevice (void)
 void qsamplerDeviceForm::contentsChanged (void)  
 {  
         if (m_iDirtySetup > 0)  
                 return;  
   
         m_iDirtyCount++;  
         stabilizeForm();  
 }  
   
   
 // Load device configuration slot.  
 void qsamplerDeviceForm::loadDevices (void)  
 {  
         QString sFilename = QFileDialog::getOpenFileName(  
                         m_sFilename,                                    // Start here.  
                         tr("Device Configuration files") + " (*.lscp)", // Filter (XML files)  
                         this, 0,                                        // Parent and name (none)  
                         tr("Load Device Configuration")                 // Caption.  
         );  
   
         if (sFilename.isEmpty())  
                 return;  
   
         // Check if we're going to discard safely the current one...  
         if (!queryClose())  
                 return;  
   
         // Load it right away...  
         loadDevicesFile(sFilename);  
 }  
   
   
 // Save device configuration slot.  
 void qsamplerDeviceForm::saveDevices (void)  
138  {  {
139          QString sFilename = QFileDialog::getSaveFileName(          QListViewItem *pItem = DeviceListView->selectedItem();
140                          m_sFilename,                                    // Start here.          if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM)
                         tr("Device Configuration files") + " (*.lscp)", // Filter (XML files)  
                         this, 0,                                        // Parent and name (none)  
                         tr("Save Device Configuration")                 // Caption.  
         );  
   
         if (sFilename.isEmpty())  
141                  return;                  return;
142    
143          // Enforce .xml extension...          qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device();
         if (QFileInfo(sFilename).extension().isEmpty())  
                 sFilename += ".lscp";  
   
         // Save it right away...  
         saveDevicesFile(sFilename);  
 }  
   
   
 // Load device configuration from file.  
 void qsamplerDeviceForm::loadDevicesFile ( const QString& sFilename )  
 {  
         //  
         // TODO: Load device configuration from file...  
         //  
         m_pMainForm->appendMessages("qsamplerDeviceForm::loadDevicesFile(\"" + sFilename + "\")...");  
   
         m_sFilename   = sFilename;  
         m_iDirtyCount = 0;  
   
         refreshDevices();  
 }  
   
   
 // Save device configuration into file.  
 void qsamplerDeviceForm::saveDevicesFile ( const QString& sFilename )  
 {  
         //  
         // TODO: Save device configuration into file...  
         //  
         m_pMainForm->appendMessages("qsamplerDeviceForm::saveDevicesFile(\"" + sFilename + "\")...");  
   
         m_sFilename   = sFilename;  
         m_iDirtyCount = 0;  
         stabilizeForm();  
 }  
   
   
 // Create a new device from current table view.  
 void qsamplerDeviceForm::createDevice (void)  
 {  
         //  
         // TODO: Create a new device from current table view...  
         //  
         m_pMainForm->appendMessages("qsamplerDeviceForm::createDevice()...");  
           
         m_iDirtyCount++;  
         stabilizeForm();  
 }  
   
   
 // Update current device in table view.  
 void qsamplerDeviceForm::updateDevice (void)  
 {  
         //  
         // TODO: Update current device in table view...  
         //  
         m_pMainForm->appendMessages("qsamplerDeviceForm::updateDevice()...");  
   
         m_iDirtyCount++;  
         stabilizeForm();  
 }  
   
144    
145  // Delete current device in table view.          // Prompt user if this is for real...
146  void qsamplerDeviceForm::deleteDevice (void)          qsamplerOptions *pOptions = m_pMainForm->options();
147  {          if (pOptions && pOptions->bConfirmRemove) {
148          //                  if (QMessageBox::warning(this, tr("Warning"),
149          // TODO: Delete current device in table view...                          tr("Delete device:\n\n"
150          //                          "%1\n\n"
151          m_pMainForm->appendMessages("qsamplerDeviceForm::deleteDevice()...");                          "Are you sure?")
152                            .arg(device.deviceName()),
153                            tr("OK"), tr("Cancel")) > 0)
154                            return;
155            }
156    
157          m_iDirtyCount++;          // Go and destroy...
158          stabilizeForm();          if (device.deleteDevice()) {
159                    // Remove it from the device view...
160                    delete pItem;
161                    // Main session should be marked dirty.
162                    m_pMainForm->sessionDirty();
163            }
164  }  }
165    
166    
# Line 262  void qsamplerDeviceForm::refreshDevices Line 171  void qsamplerDeviceForm::refreshDevices
171          m_iDirtySetup++;          m_iDirtySetup++;
172    
173          //          //
174          // TODO: Load device configuration data ...          // (Re)Load complete device configuration data ...
175          //          //
176          m_pMainForm->appendMessages("qsamplerDeviceForm::refreshDevices()");          m_pAudioItems = NULL;
177            m_pMidiItems = NULL;
178          DeviceListView->clear();          DeviceListView->clear();
179          if (m_pClient) {          if (m_pClient) {
                 qsamplerDeviceItem *pItem;  
180                  int *piDeviceIDs;                  int *piDeviceIDs;
181                  // Grab and pop Audio devices...                  // Grab and pop Audio devices...
182                  pItem = new qsamplerDeviceItem(DeviceListView, m_pClient,                  m_pAudioItems = new qsamplerDeviceItem(DeviceListView, m_pMainForm,
183                          qsamplerDevice::Audio);                          qsamplerDevice::Audio);
184                  if (pItem) {                  if (m_pAudioItems) {
                         pItem->setText(0, tr("Audio"));  
185                          piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Audio);                          piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Audio);
186                          for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) {                          for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) {
187                                  new qsamplerDeviceItem(pItem, m_pClient,                                  new qsamplerDeviceItem(m_pAudioItems, m_pMainForm,
188                                          qsamplerDevice::Audio, piDeviceIDs[i]);                                          qsamplerDevice::Audio, piDeviceIDs[i]);
189                          }                          }
190                          pItem->setOpen(true);                          m_pAudioItems->setOpen(true);
191                  }                  }
192                  // Grab and pop MIDI devices...                  // Grab and pop MIDI devices...
193                  pItem = new qsamplerDeviceItem(DeviceListView, m_pClient,                  m_pMidiItems = new qsamplerDeviceItem(DeviceListView, m_pMainForm,
194                          qsamplerDevice::Midi);                          qsamplerDevice::Midi);
195                  if (pItem) {                  if (m_pMidiItems) {
                         pItem->setText(0, tr("MIDI"));  
196                          piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Midi);                          piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Midi);
197                          for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) {                          for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) {
198                                  new qsamplerDeviceItem(pItem, m_pClient,                                  new qsamplerDeviceItem(m_pMidiItems, m_pMainForm,
199                                          qsamplerDevice::Midi, piDeviceIDs[i]);                                          qsamplerDevice::Midi, piDeviceIDs[i]);
200                          }                          }
201                          pItem->setOpen(true);                          m_pMidiItems->setOpen(true);
202                  }                  }
203          }          }
204    
205          // Done.          // Done.
         selectDevice();  
206          m_iDirtySetup--;          m_iDirtySetup--;
207    
208            // Show something.
209            selectDevice();
210  }  }
211    
212    
213  // Driver selection slot.  // Driver selection slot.
214  void qsamplerDeviceForm::selectDriver ( const QString& sDriverName )  void qsamplerDeviceForm::selectDriver ( const QString& sDriverName )
215  {  {
216            if (m_iDirtySetup > 0)
217                    return;
218    
219          //          //
220          //  TODO: Driver name has changed for a new device...          //  Driver name has changed for a new device...
221          //          //
         m_pMainForm->appendMessages("qsamplerDeviceForm::selectDriver(\"" + sDriverName + "\")");  
222    
223          QListViewItem *pItem = DeviceListView->selectedItem();          QListViewItem *pItem = DeviceListView->selectedItem();
224          if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM)          if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM)
225                  return;                  return;
226    
227          qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device();          qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device();
228    
229            // Driver change is only valid for scratch devices...
230          if (m_bNewDevice) {          if (m_bNewDevice) {
231                  device.setDriver(m_pClient, sDriverName);                  m_iDirtySetup++;
232                  m_iDirtyCount++;                  device.setDriver(sDriverName);
233                    DeviceParamTable->refresh(device.params(), m_bNewDevice);
234                    m_iDirtySetup--;
235                    // Done.
236                    stabilizeForm();
237          }          }
   
         // Done.  
         stabilizeForm();  
238  }  }
239    
240    
241  // Device selection slot.  // Device selection slot.
242  void qsamplerDeviceForm::selectDevice (void)  void qsamplerDeviceForm::selectDevice (void)
243  {  {
244            if (m_iDirtySetup > 0)
245                    return;
246    
247          //          //
248          //  TODO: Device selection has changed...          //  Device selection has changed...
249          //          //
         m_pMainForm->appendMessages("qsamplerDeviceForm::selectDevice()");  
250    
251          QListViewItem *pItem = DeviceListView->selectedItem();          QListViewItem *pItem = DeviceListView->selectedItem();
252          if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) {          if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) {
253                    m_deviceType = qsamplerDevice::None;
254                    DeviceNameTextLabel->setText(QString::null);
255                    DeviceParamTable->setNumRows(0);
256                    DevicePortComboBox->clear();
257                    DevicePortParamTable->setNumRows(0);
258                    DevicePortComboBox->setEnabled(false);
259                    DevicePortParamTable->setEnabled(false);
260                  stabilizeForm();                  stabilizeForm();
261                  return;                  return;
262          }          }
263    
264          qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device();          qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device();
265    
266            m_iDirtySetup++;
267            // Flag whether this is a new device.
268          m_bNewDevice = (device.deviceID() < 0);          m_bNewDevice = (device.deviceID() < 0);
269    
270          // Fill the device heading...          // Fill the device/driver heading...
271          DeviceNameTextLabel->setText(' ' + device.deviceName());          DeviceNameTextLabel->setText(device.deviceName());
272          DriverNameComboBox->clear();          // The driver combobox is only rebuilt if device type has changed...
273          DriverNameComboBox->insertStringList(          if (device.deviceType() != m_deviceType) {
274                  qsamplerDevice::getDrivers(m_pClient, device.deviceType()));                  DriverNameComboBox->clear();
275          const QString& sDriverName = device.driverName();                  DriverNameComboBox->insertStringList(
276          if (m_bNewDevice || sDriverName.isEmpty()) {                          qsamplerDevice::getDrivers(m_pClient, device.deviceType()));
277                  device.setDriver(m_pClient, DriverNameComboBox->currentText());                  m_deviceType = device.deviceType();
         } else {  
                 if (DriverNameComboBox->listBox()->findItem(sDriverName, Qt::ExactMatch) == NULL)  
                         DriverNameComboBox->insertItem(sDriverName);  
                 DriverNameComboBox->setCurrentText(sDriverName);  
278          }          }
279            // Do we need a driver name?
280            if (m_bNewDevice || device.driverName().isEmpty())
281                    device.setDriver(DriverNameComboBox->currentText());
282            const QString& sDriverName = device.driverName();
283            if (DriverNameComboBox->listBox()->findItem(sDriverName, Qt::ExactMatch) == NULL)
284                    DriverNameComboBox->insertItem(sDriverName);
285            DriverNameComboBox->setCurrentText(sDriverName);
286          DriverNameTextLabel->setEnabled(m_bNewDevice);          DriverNameTextLabel->setEnabled(m_bNewDevice);
287          DriverNameComboBox->setEnabled(m_bNewDevice);          DriverNameComboBox->setEnabled(m_bNewDevice);
           
288          // Fill the device parameter table...          // Fill the device parameter table...
289          DeviceParamTable->refresh(device);          DeviceParamTable->refresh(device.params(), m_bNewDevice);
290            // And now the device port/channel parameter table...
291            DevicePortComboBox->clear();
292            DevicePortParamTable->setNumRows(0);
293            if (m_bNewDevice) {
294                    DevicePortComboBox->setEnabled(false);
295                    DevicePortParamTable->setEnabled(false);
296            } else {
297                    QPixmap pixmap;
298                    switch (device.deviceType()) {
299                    case qsamplerDevice::Audio:
300                        pixmap = QPixmap::fromMimeSource("audio2.png");
301                        break;
302                    case qsamplerDevice::Midi:
303                        pixmap = QPixmap::fromMimeSource("midi2.png");
304                        break;
305                    case qsamplerDevice::None:
306                        break;
307                    }
308                    qsamplerDevicePortList& ports = device.ports();
309                    qsamplerDevicePort *pPort;
310                    for (pPort = ports.first(); pPort; pPort = ports.next()) {
311                DevicePortComboBox->insertItem(pixmap, device.deviceTypeName()
312                                    + ' ' + device.driverName()
313                                    + ' ' + pPort->portName());
314                    }
315                    bool bEnabled = (ports.count() > 0);
316                    DevicePortComboBox->setEnabled(bEnabled);
317                    DevicePortParamTable->setEnabled(bEnabled);
318            }
319            // Done.
320            m_iDirtySetup--;
321            
322            // Make the device port/channel selection effective.
323            selectDevicePort(DevicePortComboBox->currentItem());
324    }
325    
326    
327    // Device port/channel selection slot.
328    void qsamplerDeviceForm::selectDevicePort ( int iPort )
329    {
330            if (m_iDirtySetup > 0)
331                    return;
332    
333            //
334            //  Device port/channel selection has changed...
335            //
336    
337            QListViewItem *pItem = DeviceListView->selectedItem();
338            if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM)
339                    return;
340    
341            qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device();
342            qsamplerDevicePort *pPort = device.ports().at(iPort);
343            if (pPort) {
344                    m_iDirtySetup++;
345                    DevicePortParamTable->refresh(pPort->params(), false);
346                    m_iDirtySetup--;
347            }
348          // Done.          // Done.
349          stabilizeForm();          stabilizeForm();
350  }  }
351    
352    
353  // Stabilize current form state.  // Device parameter value change slot.
354  void qsamplerDeviceForm::stabilizeForm (void)  void qsamplerDeviceForm::changeDeviceParam ( int iRow, int iCol )
355  {  {
356          // Update the main caption...          if (m_iDirtySetup > 0)
357          QString sDevicesName = devicesName(m_sFilename);                  return;
358          if (m_iDirtyCount > 0)          if (iRow < 0 || iCol < 0)
359                  sDevicesName += '*';                  return;
360          setCaption(tr("Devices - [%1]").arg(sDevicesName));                  
361            //
362            //  Device parameter change...
363            //
364    
365            QListViewItem *pItem = DeviceListView->selectedItem();
366            if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM)
367                    return;
368    
369            qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device();
370    
371            // Table 1st column has the parameter name;
372            const QString sParam = DeviceParamTable->text(iRow, 0);
373            const QString sValue = DeviceParamTable->text(iRow, iCol);
374            // Set the local device parameter value.
375            if (device.setParam(sParam, sValue)) {
376                    selectDevice();
377            } else {
378                    stabilizeForm();
379            }
380            // Main session should be dirtier...
381            m_pMainForm->sessionDirty();
382    }
383    
384    
385    // Device port/channel parameter value change slot.
386    void qsamplerDeviceForm::changeDevicePortParam ( int iRow, int iCol )
387    {
388            if (m_iDirtySetup > 0)
389                    return;
390            if (iRow < 0 || iCol < 0)
391                    return;
392    
393          //          //
394          // TODO: Enable/disable available command buttons.          //  Device port/channel parameter change...
395          //          //
         m_pMainForm->appendMessages("qsamplerDeviceForm::stabilizeForm()");  
396    
397          SaveDevicesPushButton->setEnabled(m_iDirtyCount > 0);          QListViewItem *pItem = DeviceListView->selectedItem();
398            if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM)
399                    return;
400    
401            qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device();
402    
403            int iPort = DevicePortComboBox->currentItem();
404            qsamplerDevicePort *pPort = device.ports().at(iPort);
405            if (pPort == NULL)
406                return;
407    
408            // Table 1st column has the parameter name;
409            const QString sParam = DevicePortParamTable->text(iRow, 0);
410            const QString sValue = DevicePortParamTable->text(iRow, iCol);
411            // Set the local device port/channel parameter value.
412            pPort->setParam(sParam, sValue);
413            // Done.
414            stabilizeForm();
415            // Main session should be dirtier...
416            m_pMainForm->sessionDirty();
417    }
418    
419    
420    // Device list view context menu handler.
421    void qsamplerDeviceForm::contextMenu ( QListViewItem *pItem, const QPoint& pos, int )
422    {
423            int iItemID;
424            
425            // Build the device context menu...
426            QPopupMenu* pContextMenu = new QPopupMenu(this);
427            
428            bool bClient = (m_pClient != NULL);
429            bool bEnabled = (pItem != NULL);
430            iItemID = pContextMenu->insertItem(
431                    QIconSet(QPixmap::fromMimeSource("deviceCreate.png")),
432                    tr("&Create device"), this, SLOT(createDevice()));
433            pContextMenu->setItemEnabled(iItemID, bEnabled || (bClient && m_bNewDevice));
434            iItemID = pContextMenu->insertItem(
435                    QIconSet(QPixmap::fromMimeSource("deviceDelete.png")),
436                    tr("&Delete device"), this, SLOT(deleteDevice()));
437            pContextMenu->setItemEnabled(iItemID, bEnabled && !m_bNewDevice);
438            pContextMenu->insertSeparator();
439            iItemID = pContextMenu->insertItem(
440                    QIconSet(QPixmap::fromMimeSource("formRefresh.png")),
441                    tr("&Refresh"), this, SLOT(refreshDevices()));
442            pContextMenu->setItemEnabled(iItemID, bClient);
443            
444            pContextMenu->exec(pos);
445            
446            delete pContextMenu;
447    }
448    
449    
450    // Stabilize current form state.
451    void qsamplerDeviceForm::stabilizeForm (void)
452    {
453          QListViewItem *pItem = DeviceListView->selectedItem();          QListViewItem *pItem = DeviceListView->selectedItem();
454            bool bClient = (m_pClient != NULL);
455          bool bEnabled = (pItem != NULL);          bool bEnabled = (pItem != NULL);
456          DeviceNameTextLabel->setEnabled(bEnabled);          DeviceNameTextLabel->setEnabled(bEnabled && !m_bNewDevice);
457          DriverNameTextLabel->setEnabled(bEnabled && m_bNewDevice);          DriverNameTextLabel->setEnabled(bEnabled &&  m_bNewDevice);
458          DriverNameComboBox->setEnabled(bEnabled && m_bNewDevice);          DriverNameComboBox->setEnabled(bEnabled && m_bNewDevice);
459          DeviceParamTable->setEnabled(bEnabled);          DeviceParamTable->setEnabled(bEnabled);
460          CreateDevicePushButton->setEnabled(bEnabled && (m_iDirtyCount > 0 ||  m_bNewDevice));          RefreshDevicesPushButton->setEnabled(bClient);
461          UpdateDevicePushButton->setEnabled(bEnabled && (m_iDirtyCount > 0 && !m_bNewDevice));          CreateDevicePushButton->setEnabled(bEnabled || (bClient && m_bNewDevice));
462          DeleteDevicePushButton->setEnabled(bEnabled && (m_iDirtyCount > 0 && !m_bNewDevice));          DeleteDevicePushButton->setEnabled(bEnabled && !m_bNewDevice);
463  }  }
464    
465    
466  // end of qsamplerDeviceForm.ui.h  // end of qsamplerDeviceForm.ui.h
467    
468    
469    

Legend:
Removed from v.431  
changed lines
  Added in v.484

  ViewVC Help
Powered by ViewVC