mirror of
https://github.com/vale981/Taevitas
synced 2025-03-04 17:11:40 -05:00
Flippable, right this time.
This commit is contained in:
parent
8bb4f2f7df
commit
0e7eacfb12
3 changed files with 24 additions and 10 deletions
|
@ -230,9 +230,16 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="flipPreview">
|
||||
<widget class="QCheckBox" name="flipPreviewV">
|
||||
<property name="text">
|
||||
<string>Flip Preview</string>
|
||||
<string>Flip Vertical</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="flipPreviewH">
|
||||
<property name="text">
|
||||
<string>Flip Horizontal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -256,12 +256,12 @@ void MainWindow::displayPreview( FlyCapture2::Image * last_capture ) {
|
|||
last_preview_image = last_preview_image.scaledToHeight( 500 );
|
||||
ui->preview_widget->setFixedSize( last_preview_image.width(), last_preview_image.height() );
|
||||
|
||||
// Flip if wanted.
|
||||
last_preview_image = last_preview_image.mirrored( ui->flipPreviewH->isChecked(), ui->flipPreviewV->isChecked() );
|
||||
|
||||
last_preview.convertFromImage( last_preview_image );
|
||||
ui->preview_widget->setPixmap( last_preview );
|
||||
|
||||
if ( ui->flipPreview->isChecked() )
|
||||
last_preview_image = last_preview_image.mirrored();
|
||||
|
||||
if ( resize ) {
|
||||
fit();
|
||||
resize = false;
|
||||
|
|
|
@ -58,7 +58,8 @@ public:
|
|||
QCheckBox *saveFrames;
|
||||
QPushButton *startButton;
|
||||
QPushButton *preview_button;
|
||||
QCheckBox *flipPreview;
|
||||
QCheckBox *flipPreviewV;
|
||||
QCheckBox *flipPreviewH;
|
||||
QGroupBox *groupBox_2;
|
||||
QVBoxLayout *verticalLayout_2;
|
||||
QLabel *statusLabel;
|
||||
|
@ -231,10 +232,15 @@ public:
|
|||
|
||||
verticalLayout_4->addWidget(preview_button);
|
||||
|
||||
flipPreview = new QCheckBox(recOptions);
|
||||
flipPreview->setObjectName(QStringLiteral("flipPreview"));
|
||||
flipPreviewV = new QCheckBox(recOptions);
|
||||
flipPreviewV->setObjectName(QStringLiteral("flipPreviewV"));
|
||||
|
||||
verticalLayout_4->addWidget(flipPreview, 0, Qt::AlignHCenter);
|
||||
verticalLayout_4->addWidget(flipPreviewV, 0, Qt::AlignHCenter);
|
||||
|
||||
flipPreviewH = new QCheckBox(recOptions);
|
||||
flipPreviewH->setObjectName(QStringLiteral("flipPreviewH"));
|
||||
|
||||
verticalLayout_4->addWidget(flipPreviewH, 0, Qt::AlignHCenter);
|
||||
|
||||
|
||||
verticalLayout->addWidget(recOptions);
|
||||
|
@ -362,7 +368,8 @@ public:
|
|||
saveFrames->setText(QApplication::translate("MainWindow", " Save Frames", Q_NULLPTR));
|
||||
startButton->setText(QApplication::translate("MainWindow", "Start", Q_NULLPTR));
|
||||
preview_button->setText(QApplication::translate("MainWindow", "Preview Camera", Q_NULLPTR));
|
||||
flipPreview->setText(QApplication::translate("MainWindow", "Flip Preview", Q_NULLPTR));
|
||||
flipPreviewV->setText(QApplication::translate("MainWindow", "Flip Vertical", Q_NULLPTR));
|
||||
flipPreviewH->setText(QApplication::translate("MainWindow", "Flip Horizontal", Q_NULLPTR));
|
||||
groupBox_2->setTitle(QApplication::translate("MainWindow", "Status", Q_NULLPTR));
|
||||
statusLabel->setText(QApplication::translate("MainWindow", "Waiting.", Q_NULLPTR));
|
||||
label_3->setText(QApplication::translate("MainWindow", "Frames", Q_NULLPTR));
|
||||
|
|
Loading…
Add table
Reference in a new issue