Commit f0b30860 authored by Dirk Wilden's avatar Dirk Wilden

added option to specify dimension for videocapturing

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6341 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 290b1cc2
......@@ -211,6 +211,9 @@ Core::init() {
connect(coreWidget_, SIGNAL(recentOpen(QAction*)) , this, SLOT(slotRecentOpen(QAction*)));
connect(coreWidget_, SIGNAL(exit()) , this, SLOT(slotExit()));
connect( coreWidget_, SIGNAL( resizeViewers(int,int) ), this, SLOT( resizeViewers(int,int) ) );
connect( coreWidget_, SIGNAL( resizeApplication(int,int) ), this, SLOT( resizeApplication(int,int) ) );
connect( coreWidget_, SIGNAL( stopVideoCapture() ), this, SLOT( stopVideoCapture() ) );
connect( coreWidget_, SIGNAL( startVideoCapture(QString,int,bool) ), this, SLOT( startVideoCapture(QString,int,bool) ) );
......@@ -1085,13 +1088,19 @@ void Core::viewerSnapshot(){
coreWidget_->viewerSnapshot();
}
void Core::resizeViewer(int _width, int _height ){
void Core::resizeViewers(int _width, int _height ){
if ( OpenFlipper::Options::gui() ){
//+40 / +20 corresponds to the bottom and right scrollbar
coreWidget_->examiner_widgets_[0]->resize(_width+40, _height+20);
//+6,+22 to to get the correct dimension when using snapshotFunction
coreWidget_->glView_->resize(_width+6, _height+22);
}
}
void Core::resizeApplication(int _width, int _height ){
if ( OpenFlipper::Options::gui() ){
coreWidget_->resize(_width, _height);
}
}
void Core::writeVersionNumbers(QString _filename){
INIFile ini;
......
......@@ -370,7 +370,10 @@ public slots:
void viewerSnapshot();
/// resize the examinerViewer
void resizeViewer(int _width, int _height );
void resizeViewers(int _width, int _height );
/// resize the whole Application
void resizeApplication(int _width, int _height );
/// write the current versions of all plugins to ini file
void writeVersionNumbers(QString _filename);
......
......@@ -876,6 +876,9 @@ CoreWidget::startVideoCaptureDialog(){
VideoCaptureDialog* dialog = new VideoCaptureDialog();
connect(dialog, SIGNAL(startVideoCapture(QString,int,bool)), this, SIGNAL(startVideoCapture(QString,int,bool)) );
connect(dialog, SIGNAL(resizeViewers(int,int)), this, SIGNAL(resizeViewers(int,int)) );
connect(dialog, SIGNAL(resizeApplication(int,int)), this, SIGNAL(resizeApplication(int,int)) );
dialog->show();
}
......
......@@ -286,6 +286,10 @@ public:
signals:
void startVideoCapture(QString _baseName, int _fps, bool _captureViewers);
void stopVideoCapture();
void resizeViewers(int _width, int _height);
void resizeApplication(int _width, int _height);
private slots:
void startVideoCaptureDialog();
......@@ -689,6 +693,7 @@ public:
std::vector< StackWidgetInfo > stackWidgetList_;
public :
/// Container widget for holding multiple views
QStackedWidget* stackedWidget_;
......
......@@ -24,6 +24,11 @@ void VideoCaptureDialog::slotStartVideoCapture()
return;
}
if ( captureViewers->isChecked() )
emit resizeViewers(videoWidth->value(), videoHeight->value());
else
emit resizeApplication(videoWidth->value(), videoHeight->value());
emit startVideoCapture( filename->text(), fps->value(), captureViewers->isChecked() );
accept();
......
......@@ -14,5 +14,7 @@ class VideoCaptureDialog : public QDialog, public Ui::VideoCaptureDialog
signals:
void startVideoCapture(QString _baseName, int _fps, bool _captureViewers);
void resizeViewers(int _width, int _height);
void resizeApplication(int _width, int _height);
};
......@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>440</width>
<height>180</height>
<width>443</width>
<height>283</height>
</rect>
</property>
<property name="windowTitle">
......@@ -18,7 +18,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
......@@ -60,34 +60,83 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string> Capture Region </string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="captureViewers">
<property name="text">
<string>Viewers only</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="captureApplication">
<property name="text">
<string>Application</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string> Capture Region </string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="captureViewers">
<property name="text">
<string>Viewers only</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="captureApplication">
<property name="text">
<string>Application</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string> Video Resolution </string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Width:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="videoWidth">
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>2000</number>
</property>
<property name="value">
<number>800</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Height:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="videoHeight">
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>2000</number>
</property>
<property name="value">
<number>600</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment