44 #include "VideoCaptureDialog.hh" 46 #include <QMessageBox> 47 #include <QFileDialog> 49 VideoCaptureDialog::VideoCaptureDialog(QWidget *parent) : QDialog(parent)
53 connect(cancelButton, SIGNAL(clicked()),
this, SLOT(reject()) );
54 connect(findButton, SIGNAL(clicked()),
this, SLOT(findFile()) );
55 connect(resButton, SIGNAL(clicked()),
this, SLOT(slotChangeResolution()) );
56 connect(startButton, SIGNAL(clicked()),
this, SLOT(slotStartVideoCapture()) );
59 void VideoCaptureDialog::slotChangeResolution()
61 if ( captureViewers->isChecked() )
62 emit resizeViewers(videoWidth->value(), videoHeight->value());
64 emit resizeApplication(videoWidth->value(), videoHeight->value());
67 void VideoCaptureDialog::slotStartVideoCapture()
70 if (filename->text() ==
""){
72 msgBox.setText(tr(
"The Filename is empty!"));
77 if ( captureViewers->isChecked() )
78 emit resizeViewers(videoWidth->value(), videoHeight->value());
80 emit resizeApplication(videoWidth->value(), videoHeight->value());
82 emit startVideoCapture( filename->text(), fps->value(), captureViewers->isChecked() );
87 void VideoCaptureDialog::findFile()
90 QString file = QFileDialog::getSaveFileName(
this, tr(
"Output File"),
91 OpenFlipper::Options::applicationDirStr() + OpenFlipper::Options::dirSeparator() +
"untitled.jpg",
92 tr(
"Images (*.jpg)"));
95 filename->setText( file );