Permalink
Browse files

[crop] Show resulting dimensions of the video

  • Loading branch information...
eumagga0x2a committed Aug 22, 2017
1 parent b20b248 commit 5a48f1db91cf40d06a5454440e6759169ddfcdc9
@@ -251,6 +251,7 @@ uint8_t flyCrop::upload(bool redraw, bool toRubber)
w->spinBoxRight->setValue(right);
w->spinBoxTop->setValue(top);
w->spinBoxBottom->setValue(bottom);
dimensions();
if(toRubber)
{
@@ -310,9 +311,24 @@ Ui_cropDialog *w=(Ui_cropDialog *)_cookie;
rubber->nestedIgnore--;
blockChanges(false);
}
dimensions();
return true;
}
/**
* \fn dimensions
* \brief Fill in label displaying video size
*/
void flyCrop::dimensions(void)
{
Ui_cropDialog *w=(Ui_cropDialog *)_cookie;
QString dim=QString(QT_TRANSLATE_NOOP("crop","Size: "));
dim+=QString::number(_w-left-right);
dim+=QString(" x ");
dim+=QString::number(_h-top-bottom);
w->label_5->setText(dim);
}
//
// Video is in YV12 Colorspace
//
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>507</width>
<width>600</width>
<height>300</height>
</rect>
</property>
@@ -46,29 +46,15 @@
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="3">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Right:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<item row="1" column="8">
<widget class="QPushButton" name="pushButtonReset">
<property name="text">
<string>Top:</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QSpinBox" name="spinBoxRight">
<property name="maximum">
<number>2147483647</number>
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer>
<spacer name="horizontalSpacer_1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -83,30 +69,54 @@
</property>
</spacer>
</item>
<item row="1" column="5">
<spacer>
<item row="0" column="4">
<widget class="QSpinBox" name="spinBoxRight">
<property name="maximum">
<number>2147483647</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Top:</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Right:</string>
</property>
</widget>
</item>
<item row="0" column="5">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>26</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="6">
<widget class="QPushButton" name="pushButtonReset">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Reset</string>
<string>Left:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="spinBoxTop">
<property name="maximum">
<number>2147483647</number>
<item row="1" column="3">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Bottom:</string>
</property>
</widget>
</item>
@@ -117,61 +127,61 @@
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_3">
<item row="0" column="8">
<widget class="QPushButton" name="pushButtonAutoCrop">
<property name="text">
<string>Bottom:</string>
<string>Auto Crop</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Left:</string>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBoxLeft">
<property name="maximum">
<number>2147483647</number>
</property>
</widget>
</item>
<item row="0" column="5">
<spacer>
<item row="1" column="1">
<widget class="QSpinBox" name="spinBoxTop">
<property name="maximum">
<number>2147483647</number>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>26</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBoxLeft">
<property name="maximum">
<number>2147483647</number>
</property>
</widget>
</item>
<item row="0" column="6">
<widget class="QPushButton" name="pushButtonAutoCrop">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Auto Crop</string>
<string>Size: </string>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer>
<item row="0" column="7">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>26</width>
<width>40</width>
<height>20</height>
</size>
</property>

0 comments on commit 5a48f1d

Please sign in to comment.