Commit de7fe735 authored by Martin Marmsoler's avatar Martin Marmsoler Committed by Julius Künzel
Browse files

Show details of external proxy profile in project settings

parent f834e2e5
Pipeline #132070 passed with stage
in 5 minutes and 48 seconds
......@@ -103,6 +103,10 @@ ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap<QString, QString> metada
}
});
connect(external_proxy, &QCheckBox::toggled, this, &ProjectSettings::slotExternalProxyChanged);
connect(external_proxy_profile, &QComboBox::currentTextChanged, this, &ProjectSettings::slotExternalProxyProfileChanged);
slotExternalProxyChanged(external_proxy->checkState());
QString currentProf;
if (doc) {
currentProf = pCore->getCurrentProfile()->path();
......@@ -270,6 +274,41 @@ ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap<QString, QString> metada
connect(button_export, &QAbstractButton::clicked, this, &ProjectSettings::slotExportToText);
}
void ProjectSettings::slotExternalProxyChanged(bool enabled)
{
l_relPathOrigToProxy->setVisible(enabled);
le_relPathOrigToProxy->setVisible(enabled);
l_prefix_proxy->setVisible(enabled);
le_prefix_proxy->setVisible(enabled);
l_suffix_proxy->setVisible(enabled);
le_suffix_proxy->setVisible(enabled);
l_relPathProxyToOrig->setVisible(enabled);
le_relPathProxyToOrig->setVisible(enabled);
l_prefix_clip->setVisible(enabled);
le_prefix_clip->setVisible(enabled);
l_suffix_clip->setVisible(enabled);
le_suffix_clip->setVisible(enabled);
slotExternalProxyProfileChanged(external_proxy_profile->currentText());
}
void ProjectSettings::setExternalProxyProfileData(const QString &profileData)
{
auto params = profileData.split(";");
if (params.count() < 6) return;
le_relPathOrigToProxy->setText(params.at(0));
le_prefix_proxy->setText(params.at(1));
le_suffix_proxy->setText(params.at(2));
le_relPathProxyToOrig->setText(params.at(3));
le_prefix_clip->setText(params.at(4));
le_suffix_clip->setText(params.at(5));
}
void ProjectSettings::slotExternalProxyProfileChanged(const QString &)
{
setExternalProxyProfileData(external_proxy_profile->currentData().toString());
}
void ProjectSettings::slotEditMetadata(QTreeWidgetItem *item, int)
{
metadata_list->editItem(item, 1);
......
......@@ -69,6 +69,10 @@ private slots:
void slotManagePreviewProfile();
/** @brief Open editor for metadata item. */
void slotEditMetadata(QTreeWidgetItem *, int);
/** @brief Shows external proxy settings. */
void slotExternalProxyChanged(bool enabled);
void slotExternalProxyProfileChanged(const QString &);
void setExternalProxyProfileData(const QString &profile);
private:
QPushButton *m_buttonOk;
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>563</width>
<height>457</height>
<width>722</width>
<height>711</height>
</rect>
</property>
<property name="windowTitle">
......@@ -270,10 +270,22 @@
<property name="horizontalSpacing">
<number>6</number>
</property>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Proxy video resize (width)</string>
<item row="4" column="2" colspan="4">
<widget class="QSpinBox" name="proxy_imagesize">
<property name="enabled">
<bool>false</bool>
</property>
<property name="suffix">
<string>pixels</string>
</property>
<property name="minimum">
<number>200</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="value">
<number>800</number>
</property>
</widget>
</item>
......@@ -287,18 +299,49 @@
</property>
</widget>
</item>
<item row="7" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
<item row="11" column="3">
<widget class="QLineEdit" name="le_prefix_proxy">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QLineEdit" name="le_relPathOrigToProxy">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="2" colspan="4">
<widget class="QSpinBox" name="proxy_minsize">
<property name="suffix">
<string>pixels</string>
</property>
<property name="maximum">
<number>10000</number>
</property>
<property name="value">
<number>1000</number>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="generate_imageproxy">
<property name="text">
<string>Generate for images larger than</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="5">
<widget class="QComboBox" name="external_proxy_profile"/>
</item>
<item row="9" column="3">
<widget class="QLineEdit" name="le_suffix_clip">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="KComboBox" name="proxy_profile">
......@@ -310,6 +353,13 @@
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="l_prefix_clip">
<property name="text">
<string>Prefix of clip:</string>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QToolButton" name="proxy_manageprofile">
<property name="text">
......@@ -317,61 +367,98 @@
</property>
</widget>
</item>
<item row="3" column="2" colspan="4">
<widget class="QSpinBox" name="proxy_imageminsize">
<property name="suffix">
<string>pixels</string>
<item row="11" column="1">
<widget class="QLabel" name="l_prefix_proxy">
<property name="text">
<string>Prefix of proxy:</string>
</property>
<property name="minimum">
<number>500</number>
</widget>
</item>
<item row="2" column="0" colspan="6">
<widget class="QPlainTextEdit" name="proxyparams">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>100000</number>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="value">
<number>2000</number>
</widget>
</item>
<item row="9" column="1">
<widget class="QLabel" name="l_suffix_clip">
<property name="text">
<string>Suffix of clip:</string>
</property>
</widget>
</item>
<item row="4" column="2" colspan="4">
<widget class="QSpinBox" name="proxy_imagesize">
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Proxy video resize (width)</string>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QLabel" name="l_suffix_proxy">
<property name="text">
<string>Suffix of proxy:</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="image_label">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Proxy image size</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="4">
<widget class="QSpinBox" name="proxy_imageminsize">
<property name="suffix">
<string>pixels</string>
</property>
<property name="minimum">
<number>200</number>
<number>500</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
<property name="value">
<number>800</number>
<number>2000</number>
</property>
</widget>
</item>
<item row="5" column="2" colspan="4">
<widget class="QSpinBox" name="proxy_resize">
<property name="suffix">
<string>pixels</string>
</property>
<property name="minimum">
<number>200</number>
</property>
<property name="maximum">
<number>100000</number>
<item row="7" column="1">
<widget class="QLabel" name="l_relPathOrigToProxy">
<property name="text">
<string>Relative path from clip to proxy:</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="image_label">
<item row="8" column="3">
<widget class="QLineEdit" name="le_prefix_clip">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="external_proxy">
<property name="text">
<string>Proxy image size</string>
<string>Use external proxy clips</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QToolButton" name="checkProxy">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
......@@ -388,60 +475,44 @@
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="generate_imageproxy">
<property name="text">
<string>Generate for images larger than</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="external_proxy">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="generate_proxy">
<property name="text">
<string>Use external proxy clips</string>
<string>Generate for videos larger than</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="6">
<widget class="QPlainTextEdit" name="proxyparams">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly">
<bool>true</bool>
<item row="12" column="3">
<widget class="QLineEdit" name="le_suffix_proxy">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="2" colspan="4">
<widget class="QSpinBox" name="proxy_minsize">
<item row="5" column="2" colspan="4">
<widget class="QSpinBox" name="proxy_resize">
<property name="suffix">
<string>pixels</string>
</property>
<property name="maximum">
<number>10000</number>
<property name="minimum">
<number>200</number>
</property>
<property name="value">
<number>1000</number>
<property name="maximum">
<number>100000</number>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="generate_proxy">
<item row="10" column="1">
<widget class="QLabel" name="l_relPathProxyToOrig">
<property name="text">
<string>Generate for videos larger than</string>
<string>Relative path from proxy to clip:</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="5">
<widget class="QComboBox" name="external_proxy_profile"/>
</item>
<item row="1" column="3">
<widget class="QToolButton" name="checkProxy">
<property name="text">
<string>...</string>
<item row="10" column="3">
<widget class="QLineEdit" name="le_relPathProxyToOrig">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</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