[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdenlive] /: Add proper UI for lut3d effect (avfilter), patch by alcinos
From: Jean-Baptiste Mardelle <jb () kdenlive ! org>
Date: 2016-10-14 8:52:51
Message-ID: E1buyEV-0003gO-3l () code ! kde ! org
[Download RAW message or body]
Git commit 55f3848ceba2d80a43694bb2ca7522e315d2fb01 by Jean-Baptiste Mardelle.
Committed on 14/10/2016 at 08:52.
Pushed by mardelle into branch 'master'.
Add proper UI for lut3d effect (avfilter), patch by alcinos
REVIEW: 129145
M +1 -0 data/blacklisted_effects.txt
M +2 -0 data/effects/README
M +1 -0 data/effects/avfilter/CMakeLists.txt
A +15 -0 data/effects/avfilter/avfilter_lut3d.xml
M +1 -1 data/kdenliveeffectscategory.rc
M +17 -14 src/effectstack/parametercontainer.cpp
M +71 -20 src/ui/urlval_ui.ui
http://commits.kde.org/kdenlive/55f3848ceba2d80a43694bb2ca7522e315d2fb01
diff --git a/data/blacklisted_effects.txt b/data/blacklisted_effects.txt
index eaa8303..3121daa 100644
--- a/data/blacklisted_effects.txt
+++ b/data/blacklisted_effects.txt
@@ -178,5 +178,6 @@ avfilter.volumedetect
avfilter.acompressor
avfilter.aecho
avfilter.agate
+avfilter.lut3d
avfilter.selectivecolor
diff --git a/data/effects/README b/data/effects/README
index 5fff9ef..1dfe365 100644
--- a/data/effects/README
+++ b/data/effects/README
@@ -109,6 +109,8 @@ The rest:
- "url":
- url/path
- represented by button to open "file open" dialog
+ - additional attributes:
+ - "filter": Filter for file extensions. Example : "*.cpp *.cc \
*.C|C++ Source Files\n*.h *.H|Header files" or as using mimetype: "image/png \
text/html"
- "wipe":
- special GUI for the wipe transition makes it possible to select a \
direction of a slide
- "addedgeometry":
diff --git a/data/effects/avfilter/CMakeLists.txt \
b/data/effects/avfilter/CMakeLists.txt index 2260572..e10405b 100644
--- a/data/effects/avfilter/CMakeLists.txt
+++ b/data/effects/avfilter/CMakeLists.txt
@@ -4,4 +4,5 @@ acompressor.xml
aecho.xml
agate.xml
selectivecolor.xml
+avfilter_lut3d.xml
DESTINATION ${DATA_INSTALL_DIR}/kdenlive/effects)
diff --git a/data/effects/avfilter/avfilter_lut3d.xml \
b/data/effects/avfilter/avfilter_lut3d.xml new file mode 100644
index 0000000..191315c
--- /dev/null
+++ b/data/effects/avfilter/avfilter_lut3d.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE kpartgui>
+<effect tag="avfilter.lut3d" id="avfilter.lut3d">
+ <name>Apply LUT</name>
+ <description>Apply a Look Up Table (LUT) to the video.
+ <full><![CDATA[A LUT is an easy way to correct the color of a video. Supported \
formats: .3dl (AfterEffects), .cube (Iridas), .dat(DaVinci), .m3d \
(Pandora)]]></full></description> + <author>libavfilter</author>
+ <parameter type="url" name="av.file" filter="*.cube *.3dl *.dat *.m3d|LUT files">
+ <name>LUT file to apply</name>
+ </parameter>
+ <parameter type="list" name="av.interp" default="0" \
paramlist="nearest;trilinear;tetrahedral "> + <name>Interpolation Mode</name>
+ <paramlistdisplay>Nearest, Trilinear, Tetrahedral</paramlistdisplay>
+ </parameter>
+</effect>
+
diff --git a/data/kdenliveeffectscategory.rc b/data/kdenliveeffectscategory.rc
index c645229..f9a6b2c 100644
--- a/data/kdenliveeffectscategory.rc
+++ b/data/kdenliveeffectscategory.rc
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<data name="effects" version="0">
- <group list="lift_gamma_gain,brightness,gamma,frei0r.colgate,frei0r.balanc0r,frei0r \
.brightness,frei0r.levels,frei0r.three_point_balance,frei0r.curves,frei0r.coloradj_RGB,frei0r.sopsat,frei0r.bezier_curves,avfilter.selectivecolor">
+ <group list="lift_gamma_gain,brightness,gamma,frei0r.colgate,frei0r.balanc0r,frei0 \
r.brightness,frei0r.levels,frei0r.three_point_balance,frei0r.curves,frei0r.coloradj_RGB,frei0r.sopsat,frei0r.bezier_curves,avfilter.selectivecolor,avfilter.lut3d">
<text>Colour correction</text>
</group>
<group list="invert,sepia,tcolor,greyscale,frei0r.B,frei0r.G,frei0r.R,frei0r.contra \
st0r,frei0r.saturat0r,frei0r.tint0r,frei0r.primaries,chroma_hold,frei0r.colorize,frei0r.equaliz0r,frei0r.hueshift0r,frei0r.luminance,lumaliftgaingamma">
diff --git a/src/effectstack/parametercontainer.cpp \
b/src/effectstack/parametercontainer.cpp index 9136892..ccec798 100644
--- a/src/effectstack/parametercontainer.cpp
+++ b/src/effectstack/parametercontainer.cpp
@@ -256,7 +256,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, \
const ItemInfo } else if (type == QLatin1String("list")) {
Listval *lsval = new Listval;
lsval->setupUi(toFillin);
- lsval->list->setFocusPolicy(Qt::StrongFocus);
+ lsval->list->setFocusPolicy(Qt::StrongFocus);
QString items = pa.attribute(QStringLiteral("paramlist"));
QStringList listitems;
if (items == QLatin1String("%lumaPaths")) {
@@ -304,7 +304,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, \
const ItemInfo
if (!value.isEmpty() && listitems.contains(value)) \
lsval->list->setCurrentIndex(listitems.indexOf(value)); }
lsval->name->setText(paramName);
- lsval->setToolTip(comment);
+ lsval->setToolTip(comment);
lsval->labelComment->setText(comment);
lsval->widgetComment->setHidden(true);
if (m_conditionParameter && \
pa.hasAttribute(QStringLiteral("conditional"))) { @@ -612,8 +612,11 @@ \
ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo \
Urlval *cval = new Urlval; cval->setupUi(toFillin);
cval->label->setText(paramName);
- cval->setToolTip(comment);
- cval->urlwidget->setFilter(ClipCreationDialog::getExtensions().join(' \
')); + cval->setToolTip(comment);
+ cval->widgetComment->setHidden(true);
+ QString filter = pa.attribute(QStringLiteral("filter"));
+ if(filter.size()>0)
+ cval->urlwidget->setFilter(filter);
m_valueItems[paramName] = cval;
cval->urlwidget->setUrl(QUrl(value));
connect(cval->urlwidget, SIGNAL(returnPressed()) , this, \
SLOT(slotCollectAllParameters())); @@ -986,21 +989,21 @@ void \
ParameterContainer::slotCollectAllParameters() setValue = \
locale.toString(doubleparam->getValue()); }
} else if (type == QLatin1String("list")) {
- Listval* val = static_cast<Listval*>(m_valueItems.value(paramName));
+ Listval* val = static_cast<Listval*>(m_valueItems.value(paramName));
if (val) {
- KComboBox *box = val->list;
- setValue = box->itemData(box->currentIndex()).toString();
+ KComboBox *box = val->list;
+ setValue = box->itemData(box->currentIndex()).toString();
// special case, list value is allowed to be empty
pa.setAttribute(QStringLiteral("value"), setValue);
setValue.clear();
- }
+ }
} else if (type == QLatin1String("bool")) {
- Boolval* val = static_cast<Boolval*>(m_valueItems.value(paramName));
+ Boolval* val = static_cast<Boolval*>(m_valueItems.value(paramName));
if (val) {
- QCheckBox *box = val->checkBox;
- setValue = box->checkState() == Qt::Checked ? "1" : "0" ;
- }
- } else if (type == QLatin1String("switch")) {
+ QCheckBox *box = val->checkBox;
+ setValue = box->checkState() == Qt::Checked ? "1" : "0" ;
+ }
+ } else if (type == QLatin1String("switch")) {
Boolval* val = static_cast<Boolval*>(m_valueItems.value(paramName));
if (val) {
QCheckBox *box = val->checkBox;
@@ -1009,7 +1012,7 @@ void ParameterContainer::slotCollectAllParameters()
} else if (type == QLatin1String("color")) {
ChooseColorWidget *choosecolor = \
static_cast<ChooseColorWidget*>(m_valueItems.value(paramName)); if (choosecolor) \
setValue = choosecolor->getColor();
- if (pa.hasAttribute(QStringLiteral("paramprefix"))) \
setValue.prepend(pa.attribute(QStringLiteral("paramprefix"))); + if \
(pa.hasAttribute(QStringLiteral("paramprefix"))) \
setValue.prepend(pa.attribute(QStringLiteral("paramprefix"))); } else if (type == \
QLatin1String("geometry")) {
if (m_geometryWidget) \
namenode.item(i).toElement().setAttribute(QStringLiteral("value"), \
m_geometryWidget->getValue()); } else if (type == QLatin1String("addedgeometry")) {
diff --git a/src/ui/urlval_ui.ui b/src/ui/urlval_ui.ui
index 68901f4..625f4bc 100644
--- a/src/ui/urlval_ui.ui
+++ b/src/ui/urlval_ui.ui
@@ -11,26 +11,77 @@
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
- <property name="verticalSpacing">
- <number>0</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item row="1" column="1">
- <widget class="KUrlRequester" name="urlwidget"/>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Param</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- </layout>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item row="0" column="0" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KUrlRequester" name="urlwidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <widget class="QWidget" name="widgetComment" native="true">
+ <layout class="QGridLayout" name="_2">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>15</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="labelComment">
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
</widget>
<customwidgets>
<customwidget>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic