//----------------------------------------------------------------------------- void MainWindow::updateStatusBar() //----------------------------------------------------------------------------- { bool isOpen = _port.isOpen(); if( isOpen ) { _pConnectionStatus->setText(QString("connected to ") + QString::fromStdString(_port.getPortName())); initialiseUi(); } else { _pConnectionStatus->setText("Not connected"); } for(int i = 0; i < _pUi->verticalLayout->count(); ++i) { QWidget* pItem = _pUi->verticalLayout->itemAt(i)->widget(); if( pItem ) { pItem->setEnabled(isOpen); } } }
ImageModelPropertiesDialog::ImageModelPropertiesDialog(ScreenieImageModel &screenieImageModel, ScreenieControl &screenieControl, QWidget *parent, Qt::WindowFlags flags) : ScreenieModelPropertiesDialog(screenieImageModel, screenieControl, parent, flags), d(new ImageModelPropertiesDialogPrivate(screenieImageModel, screenieControl)) { initialiseUi(); }