@SuppressWarnings("unused") private void updatePreviewEnabled() { previewEnabled = previewEnabledCheckbox.isChecked(); getSettings().setPreviewEnabled(previewEnabled); if (!previewEnabled) { previewPicture.reset(); } previewPicture.updatePicture(); }
private void initUI() { final QHBoxLayout mainHbox = new QHBoxLayout(); { final QGroupBox videoBox = new QGroupBox(Strings.grpRenderingVideoFrames); final QVBoxLayout videoVbox = new QVBoxLayout(); { final QHBoxLayout hbox = new QHBoxLayout(); hbox.addWidget(new QLabel(Strings.lblLastFrameProcessed)); lblLastFrameProcessed = new QLabel(Strings.lblLastFrameProcessedDefault); lblLastFrameProcessed.setAlignment(AlignmentFlag.AlignRight); hbox.addWidget(lblLastFrameProcessed); videoVbox.addLayout(hbox, 0); } { final QHBoxLayout hbox = new QHBoxLayout(); hbox.addWidget(new QLabel(Strings.lblFramesProcessedPerSecond)); lblFramesProcessedPerSecond = new QLabel(Strings.lblFramesProcessedPerSecondDefault); lblFramesProcessedPerSecond.setAlignment(AlignmentFlag.AlignRight); hbox.addWidget(lblFramesProcessedPerSecond); videoVbox.addLayout(hbox, 0); } { final QHBoxLayout hbox = new QHBoxLayout(); hbox.addWidget(new QLabel(Strings.lblLastFrameSaved)); lblLastFrameSaved = new QLabel(Strings.lblLastFrameSavedDefault); lblLastFrameSaved.setAlignment(AlignmentFlag.AlignRight); hbox.addWidget(lblLastFrameSaved); videoVbox.addLayout(hbox, 0); } { previewPicture = new UpdatablePicture( Files.iconRenderingDefault, maximumPreviewWidth, maximumPreviewHeight); videoVbox.addWidget(previewPicture, 1); } { previewEnabledCheckbox = new QCheckBox(Strings.lblEnablePreview); previewEnabledCheckbox.stateChanged.connect(this, "updatePreviewEnabled()"); previewEnabled = getSettings().getPreviewEnabled(); previewEnabledCheckbox.setChecked(previewEnabled); videoVbox.addWidget(previewEnabledCheckbox, 0, AlignmentFlag.AlignHCenter); } videoBox.setLayout(videoVbox); mainHbox.addWidget(videoBox, 1); } { final QGroupBox audioBox = new QGroupBox(Strings.grpRenderingAudioBuffer); final QVBoxLayout audioVbox = new QVBoxLayout(); { audioBuffer = new QProgressBar(); audioBuffer.setOrientation(Orientation.Vertical); audioBuffer.setSizePolicy(Policy.Expanding, Policy.Expanding); audioVbox.addWidget(audioWidget(audioBuffer), 1, AlignmentFlag.AlignHCenter); lblAudioBuffer1 = new QLabel(); audioVbox.addWidget(audioWidget(lblAudioBuffer1), 0, AlignmentFlag.AlignCenter); lblAudioBuffer2 = new QLabel(); audioVbox.addWidget(audioWidget(lblAudioBuffer2), 0, AlignmentFlag.AlignCenter); btnFlushAudioBuffer = new QPushButton(Strings.btnRenderAudioBufferFlush); btnFlushAudioBuffer.clicked.connect(this, "onFlushAudioBuffer()"); btnFlushAudioBuffer.setEnabled(false); audioVbox.addWidget(audioWidget(btnFlushAudioBuffer), 0, AlignmentFlag.AlignCenter); } audioBox.setLayout(audioVbox); mainHbox.addWidget(audioBox, 0); } setLayout(mainHbox); }