Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
modify crop feature UI
Browse files Browse the repository at this point in the history
  • Loading branch information
CatxFish committed Aug 18, 2017
1 parent 948918b commit b52e81f
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 48 deletions.
4 changes: 2 additions & 2 deletions src/virtual-output/virtual_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ VirtualProperties::VirtualProperties(QWidget *parent) :
ui->spinBox_left->setValue(crop_left);
ui->spinBox_right->setValue(crop_right);
ui->spinBox_top->setValue(crop_top);
ui->spinBox_top->setValue(crop_bottom);
ui->spinBox_bottom->setValue(crop_bottom);

if (autostart){
obs_get_video_info(&video_info);
Expand All @@ -76,7 +76,7 @@ void VirtualProperties::onStart()
int delay = ui->horizontalSlider->value();
ui->spinBox->setEnabled(false);
ui->horizontalSlider->setEnabled(false);
virtual_output_enable(delay);
virtual_output_enable(delay+1);
ui->pushButtonStart->setEnabled(false);
ui->pushButtonStop->setEnabled(true);
onChangeCropValue();
Expand Down
124 changes: 78 additions & 46 deletions src/virtual-output/virtual_properties.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>323</width>
<height>291</height>
<width>378</width>
<height>348</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -16,8 +16,8 @@
<widget class="QPushButton" name="pushButtonStart">
<property name="geometry">
<rect>
<x>150</x>
<y>250</y>
<x>200</x>
<y>300</y>
<width>75</width>
<height>23</height>
</rect>
Expand All @@ -29,8 +29,8 @@
<widget class="QPushButton" name="pushButtonStop">
<property name="geometry">
<rect>
<x>230</x>
<y>250</y>
<x>280</x>
<y>300</y>
<width>75</width>
<height>23</height>
</rect>
Expand All @@ -57,8 +57,8 @@
<rect>
<x>20</x>
<y>50</y>
<width>291</width>
<height>111</height>
<width>341</width>
<height>141</height>
</rect>
</property>
<property name="title">
Expand All @@ -68,43 +68,12 @@
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>271</width>
<height>91</height>
<y>30</y>
<width>321</width>
<height>52</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_source">
<property name="text">
<string>SourceRegion</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_source">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_get_region">
<property name="text">
<string>Apply</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
Expand Down Expand Up @@ -219,13 +188,76 @@
</item>
</layout>
</widget>
<widget class="QPushButton" name="pushButton_get_region">
<property name="geometry">
<rect>
<x>280</x>
<y>100</y>
<width>51</width>
<height>23</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>23</height>
</size>
</property>
<property name="text">
<string>Apply</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox_source">
<property name="geometry">
<rect>
<x>120</x>
<y>100</y>
<width>151</width>
<height>23</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>23</height>
</size>
</property>
</widget>
<widget class="QLabel" name="label_source">
<property name="geometry">
<rect>
<x>20</x>
<y>101</y>
<width>91</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>SourceRegion</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_delay">
<property name="geometry">
<rect>
<x>20</x>
<y>170</y>
<width>291</width>
<y>210</y>
<width>341</width>
<height>71</height>
</rect>
</property>
Expand All @@ -235,7 +267,7 @@
<widget class="QSpinBox" name="spinBox">
<property name="geometry">
<rect>
<x>231</x>
<x>290</x>
<y>30</y>
<width>41</width>
<height>22</height>
Expand All @@ -256,7 +288,7 @@
<rect>
<x>20</x>
<y>30</y>
<width>201</width>
<width>251</width>
<height>20</height>
</rect>
</property>
Expand Down

0 comments on commit b52e81f

Please sign in to comment.