Commit bb35ba42 authored by Simon Eugster's avatar Simon Eugster
Browse files

Frame rate: Also show fields per second (frame rate * 2 for interlaced) to avoid confusion.

svn path=/trunk/kdenlive/; revision=4741
parent 43d8397e
......@@ -72,7 +72,7 @@ void ProfilesDialog::slotProfileEdited()
void ProfilesDialog::fillList(const QString selectedProfile)
{
// List the Mlt profiles
// List the Mlt profiles
m_view.profiles_list->clear();
QMap <QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
QMapIterator<QString, QString> i(profilesInfo);
......@@ -196,7 +196,7 @@ MltVideoProfile ProfilesDialog::getVideoProfile(QString name)
if (name.contains('/')) isCustom = true;
if (!isCustom) {
// List the Mlt profiles
// List the Mlt profiles
profilesFiles = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
if (profilesFiles.contains(name)) path = KdenliveSettings::mltpath() + name;
}
......@@ -206,7 +206,7 @@ MltVideoProfile ProfilesDialog::getVideoProfile(QString name)
if (path.isEmpty() || !QFile::exists(path)) {
if (name == "dv_pal") {
kDebug() << "!!! WARNING, COULD NOT FIND DEFAULT MLT PROFILE";
kDebug() << "!!! WARNING, COULD NOT FIND DEFAULT MLT PROFILE";
return result;
}
if (name == KdenliveSettings::default_profile()) KdenliveSettings::setDefault_profile("dv_pal");
......@@ -249,7 +249,7 @@ bool ProfilesDialog::existingProfileDescription(const QString &desc)
QStringList profilesFilter;
profilesFilter << "*";
// List the Mlt profiles
// List the Mlt profiles
QStringList profilesFiles = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
for (int i = 0; i < profilesFiles.size(); ++i) {
KConfig confFile(KdenliveSettings::mltpath() + profilesFiles.at(i), KConfig::SimpleConfig);
......@@ -275,7 +275,7 @@ QString ProfilesDialog::existingProfile(MltVideoProfile profile)
QStringList profilesFilter;
profilesFilter << "*";
// Check the Mlt profiles
// Check the Mlt profiles
QStringList profilesFiles = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
for (int i = 0; i < profilesFiles.size(); ++i) {
KConfig confFile(KdenliveSettings::mltpath() + profilesFiles.at(i), KConfig::SimpleConfig);
......@@ -319,7 +319,7 @@ QMap <QString, QString> ProfilesDialog::getProfilesInfo()
QStringList profilesFilter;
profilesFilter << "*";
// List the Mlt profiles
// List the Mlt profiles
QStringList profilesFiles = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
for (int i = 0; i < profilesFiles.size(); ++i) {
KConfig confFile(KdenliveSettings::mltpath() + profilesFiles.at(i), KConfig::SimpleConfig);
......@@ -367,7 +367,7 @@ QMap< QString, QString > ProfilesDialog::getSettingsForProfile(const QString pro
QStringList profilesFilter;
profilesFilter << "*";
// List the Mlt profiles
// List the Mlt profiles
profilesFiles = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
for (int i = 0; i < profilesFiles.size(); ++i) {
KConfig confFile(KdenliveSettings::mltpath() + profilesFiles.at(i), KConfig::SimpleConfig);
......@@ -402,7 +402,7 @@ QString ProfilesDialog::getPathFromDescription(const QString profileDesc)
QStringList profilesFilter;
profilesFilter << "*";
// List the Mlt profiles
// List the Mlt profiles
profilesFiles = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
for (int i = 0; i < profilesFiles.size(); ++i) {
KConfig confFile(KdenliveSettings::mltpath() + profilesFiles.at(i), KConfig::SimpleConfig);
......@@ -476,6 +476,11 @@ void ProfilesDialog::slotUpdateDisplay()
m_view.frame_num->setValue(values.value("frame_rate_num").toInt());
m_view.frame_den->setValue(values.value("frame_rate_den").toInt());
m_view.progressive->setChecked(values.value("progressive").toInt());
if (values.value("progressive").toInt()) {
m_view.fields->setText(QString::number((double)values.value("frame_rate_num").toInt()/values.value("frame_rate_den").toInt(), 'f', 2));
} else {
m_view.fields->setText(QString::number((double)2*values.value("frame_rate_num").toInt()/values.value("frame_rate_den").toInt(), 'f', 2));
}
m_profileIsModified = false;
}
......
......@@ -196,8 +196,12 @@ void ProjectSettings::slotUpdateDisplay()
p_fps->setText(values.value("frame_rate_num") + '/' + values.value("frame_rate_den"));
p_aspect->setText(values.value("sample_aspect_num") + '/' + values.value("sample_aspect_den"));
p_display->setText(values.value("display_aspect_num") + '/' + values.value("display_aspect_den"));
if (values.value("progressive").toInt() == 0) p_progressive->setText(i18n("Interlaced"));
else p_progressive->setText(i18n("Progressive"));
if (values.value("progressive").toInt() == 0) {
p_progressive->setText(i18n("Interlaced (%1 fields per second)",
QString::number((double)2*values.value("frame_rate_num").toInt()/values.value("frame_rate_den").toInt(), 'f', 2)));
} else {
p_progressive->setText(i18n("Progressive"));
}
}
void ProjectSettings::slotUpdateButton(const QString &path)
......
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ProfilesDialog_UI</class>
<widget class="QDialog" name="ProfilesDialog_UI" >
<property name="geometry" >
<widget class="QDialog" name="ProfilesDialog_UI">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
......@@ -9,26 +10,26 @@
<height>332</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Profiles</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Profile</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="KComboBox" name="profiles_list" />
<item row="0" column="1">
<widget class="KComboBox" name="profiles_list"/>
</item>
<item row="0" column="2" >
<spacer name="horizontalSpacer" >
<property name="orientation" >
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
......@@ -36,163 +37,156 @@
</property>
</spacer>
</item>
<item row="1" column="0" colspan="7" >
<widget class="QGroupBox" name="properties" >
<property name="title" >
<item row="1" column="0" colspan="7">
<widget class="QGroupBox" name="properties">
<property name="title">
<string>Properties</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="3" >
<widget class="KLineEdit" name="description" />
<item row="0" column="1" colspan="3">
<widget class="KLineEdit" name="description"/>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>Size</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="KIntSpinBox" name="size_w" >
<property name="maximum" >
<item row="1" column="1">
<widget class="KIntSpinBox" name="size_w">
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QLabel" name="label_6" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<item row="1" column="2">
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>x</string>
</property>
</widget>
</item>
<item row="1" column="3" >
<widget class="KIntSpinBox" name="size_h" >
<property name="maximum" >
<item row="1" column="3">
<widget class="KIntSpinBox" name="size_h">
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Frame rate</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="KIntSpinBox" name="frame_num" >
<property name="maximum" >
<item row="2" column="1">
<widget class="KIntSpinBox" name="frame_num">
<property name="maximum">
<number>500000</number>
</property>
</widget>
</item>
<item row="2" column="2" >
<widget class="QLabel" name="label_4" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<item row="2" column="2">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>/</string>
</property>
</widget>
</item>
<item row="2" column="3" >
<widget class="KIntSpinBox" name="frame_den" >
<property name="maximum" >
<item row="2" column="3">
<widget class="KIntSpinBox" name="frame_den">
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<item row="4" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Pixel aspect ratio</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="KIntSpinBox" name="aspect_num" />
<item row="4" column="1">
<widget class="KIntSpinBox" name="aspect_num"/>
</item>
<item row="3" column="2" >
<widget class="QLabel" name="label_7" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<item row="4" column="2">
<widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>/</string>
</property>
</widget>
</item>
<item row="3" column="3" >
<widget class="KIntSpinBox" name="aspect_den" />
<item row="4" column="3">
<widget class="KIntSpinBox" name="aspect_den"/>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_10" >
<property name="text" >
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Display aspect ratio</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="KIntSpinBox" name="display_num" >
<property name="maximum" >
<item row="5" column="1">
<widget class="KIntSpinBox" name="display_num">
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="4" column="2" >
<widget class="QLabel" name="label_8" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<item row="5" column="2">
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>/</string>
</property>
</widget>
</item>
<item row="4" column="3" >
<widget class="KIntSpinBox" name="display_den" >
<property name="maximum" >
<item row="5" column="3">
<widget class="KIntSpinBox" name="display_den">
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="5" column="0" colspan="4" >
<widget class="QCheckBox" name="progressive" >
<property name="text" >
<item row="6" column="0" colspan="4">
<widget class="QCheckBox" name="progressive">
<property name="text">
<string>Progressive</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2" >
<spacer name="verticalSpacer" >
<property name="orientation" >
<item row="7" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>105</width>
<height>17</height>
......@@ -200,22 +194,43 @@
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Size</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Fields per second</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="fields">
<property name="text">
<string notr="true">interl: 2*fps</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="KPushButton" name="button_default" >
<property name="text" >
<item row="2" column="0" colspan="2">
<widget class="KPushButton" name="button_default">
<property name="text">
<string>Use as default</string>
</property>
</widget>
</item>
<item row="2" column="2" >
<spacer name="horizontalSpacer_2" >
<property name="orientation" >
<item row="2" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
......@@ -223,39 +238,39 @@
</property>
</spacer>
</item>
<item row="2" column="4" colspan="3" >
<widget class="QDialogButtonBox" name="buttonBox" >
<property name="orientation" >
<item row="2" column="4" colspan="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons" >
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="0" column="3" >
<widget class="QToolButton" name="button_create" >
<property name="text" >
<item row="0" column="3">
<widget class="QToolButton" name="button_create">
<property name="text">
<string>C</string>
</property>
</widget>
</item>
<item row="0" column="4" >
<widget class="QToolButton" name="button_save" >
<property name="enabled" >
<item row="0" column="4">
<widget class="QToolButton" name="button_save">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>S</string>
</property>
</widget>
</item>
<item row="0" column="5" >
<widget class="QToolButton" name="button_delete" >
<property name="enabled" >
<item row="0" column="5">
<widget class="QToolButton" name="button_delete">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>D</string>
</property>
</widget>
......@@ -263,6 +278,16 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KPushButton</class>
<extends>QPushButton</extends>
<header>kpushbutton.h</header>
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
......@@ -273,16 +298,6 @@
<extends>QSpinBox</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
<customwidget>
<class>KPushButton</class>
<extends>QPushButton</extends>
<header>kpushbutton.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
......@@ -292,11 +307,11 @@
<receiver>ProfilesDialog_UI</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
......@@ -308,11 +323,11 @@
<receiver>ProfilesDialog_UI</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
......
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