cleanup and proper (de)activation of actions
This commit is contained in:
parent
ec203ba1ad
commit
a3418bc25e
@ -61,8 +61,8 @@ PylonRecorder::PylonRecorder(QWidget *parent)
|
|||||||
QPalette progressPalette = pressureBar->palette();
|
QPalette progressPalette = pressureBar->palette();
|
||||||
progressPalette.setBrush(QPalette::Highlight, QBrush(color));
|
progressPalette.setBrush(QPalette::Highlight, QBrush(color));
|
||||||
pressureBar->setPalette(progressPalette);
|
pressureBar->setPalette(progressPalette);
|
||||||
QLabel *preassureLabel = new QLabel("Buffer preassure:", this);
|
QLabel *pressureLabel = new QLabel("Buffer pressure:", this);
|
||||||
preassureLabel->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial;font-weight: Bold}");
|
pressureLabel->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial;font-weight: Bold}");
|
||||||
loadBar = new QProgressBar(this);
|
loadBar = new QProgressBar(this);
|
||||||
loadBar->setRange(0, defaultBufferSize);
|
loadBar->setRange(0, defaultBufferSize);
|
||||||
loadBar->setFixedSize(200, 25);
|
loadBar->setFixedSize(200, 25);
|
||||||
@ -89,7 +89,7 @@ PylonRecorder::PylonRecorder(QWidget *parent)
|
|||||||
fileHeader->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial; font-weight: Bold}");
|
fileHeader->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial; font-weight: Bold}");
|
||||||
statusBar()->addWidget(camHeader);
|
statusBar()->addWidget(camHeader);
|
||||||
statusBar()->addWidget(cameraConnectedLabel);
|
statusBar()->addWidget(cameraConnectedLabel);
|
||||||
statusBar()->addWidget(preassureLabel);
|
statusBar()->addWidget(pressureLabel);
|
||||||
statusBar()->addWidget(pressureBar);
|
statusBar()->addWidget(pressureBar);
|
||||||
statusBar()->addWidget(loadLabel);
|
statusBar()->addWidget(loadLabel);
|
||||||
statusBar()->addWidget(loadBar);
|
statusBar()->addWidget(loadBar);
|
||||||
@ -434,6 +434,7 @@ void PylonRecorder::createActions() {
|
|||||||
connect_camera_action->setStatusTip(tr("Connect to to camera and open device"));
|
connect_camera_action->setStatusTip(tr("Connect to to camera and open device"));
|
||||||
disconnect_camera_action = camera_menu->addAction(disconnect_icon, tr("&disconnect"), this, &PylonRecorder::disconnectCamera);
|
disconnect_camera_action = camera_menu->addAction(disconnect_icon, tr("&disconnect"), this, &PylonRecorder::disconnectCamera);
|
||||||
disconnect_camera_action->setStatusTip(tr("Disconnect from the camera device"));
|
disconnect_camera_action->setStatusTip(tr("Disconnect from the camera device"));
|
||||||
|
disconnect_camera_action->setEnabled(false);
|
||||||
camera_menu->addSeparator();
|
camera_menu->addSeparator();
|
||||||
grab_still_action = camera_menu->addAction(snapshot_icon, tr("&grab still"), this, &PylonRecorder::grabStillFromPylon);
|
grab_still_action = camera_menu->addAction(snapshot_icon, tr("&grab still"), this, &PylonRecorder::grabStillFromPylon);
|
||||||
grab_still_action->setStatusTip(tr("Grab single image from Pylon camera"));
|
grab_still_action->setStatusTip(tr("Grab single image from Pylon camera"));
|
||||||
@ -534,11 +535,10 @@ void PylonRecorder::updateActions() {
|
|||||||
zoomInAct->setEnabled(!fitToWindowAct->isChecked());
|
zoomInAct->setEnabled(!fitToWindowAct->isChecked());
|
||||||
zoomOutAct->setEnabled(!fitToWindowAct->isChecked());
|
zoomOutAct->setEnabled(!fitToWindowAct->isChecked());
|
||||||
normalSizeAct->setEnabled(!fitToWindowAct->isChecked());
|
normalSizeAct->setEnabled(!fitToWindowAct->isChecked());
|
||||||
disconnect_camera_action->setEnabled(deviceList.size() > 0);
|
disconnect_camera_action->setEnabled(cameraOpened);
|
||||||
connect_camera_action->setEnabled(true);
|
connect_camera_action->setEnabled(true);
|
||||||
grab_still_action->setEnabled(deviceList.size() > 0);
|
grab_still_action->setEnabled(cameraOpened);
|
||||||
grab_continuous_action->setEnabled(cameraOpened && !grabbing);
|
grab_continuous_action->setEnabled(cameraOpened && !grabbing);
|
||||||
// grab_continuous_action->setEnabled(!grabbing);
|
|
||||||
grab_stop_action->setEnabled(grabbing);
|
grab_stop_action->setEnabled(grabbing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user