Commit 72a75612 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Merge branch '2012'

parents 2f0bb85f 1c134a91
Pipeline #42618 passed with stage
in 10 minutes and 2 seconds
......@@ -4,7 +4,7 @@ frei0r.water
# WORKING BUT NOT USEFUL OR DUPLICATE EFFECTS
# avfilter.datascope
# avfilter.pixscope
avfilter.pixscope
# avfilter.zoompan
# avfilter.hflip
# avfilter.vflip
......@@ -96,39 +96,39 @@ avfilter.unsharp_opencl
avfilter.zmq
# WORKING BUT WARNING OR PARTIALLY WORKING
# avfilter.atadenoise
# avfilter.dedot
# avfilter.deflicker
# avfilter.doubleweave
# avfilter.random
# avfilter.tmix
# avfilter.vertigo
# avfilter.w3fdif
# avfilter.weave
# avfilter.yadif
avfilter.atadenoise
avfilter.dedot
avfilter.deflicker
avfilter.doubleweave
avfilter.random
avfilter.tmix
avfilter.vertigo
avfilter.w3fdif
avfilter.weave
avfilter.yadif
# WORKING BUT NEED CHECKS
# avfilter.amplify
# avfilter.bwdif
# avfilter.deblock
# avfilter.deflate
# avfilter.derain
# avfilter.deshake
# avfilter.inflate
# avfilter.nlmeans
# avfilter.owdenoise
# avfilter.removegrain
# avfilter.sr
# deshake
# fieldorder
# frei0r.bgsubtract0r
# frei0r.colorhalftone
# frei0r.delaygrab
# frei0r.lightgraffiti
# frei0r.premultiply
# gtkrescale
# region
# resize
avfilter.amplify
avfilter.bwdif
avfilter.deblock
avfilter.deflate
avfilter.derain
avfilter.deshake
avfilter.inflate
avfilter.nlmeans
avfilter.owdenoise
avfilter.removegrain
avfilter.sr
deshake
fieldorder
frei0r.bgsubtract0r
frei0r.colorhalftone
frei0r.delaygrab
frei0r.lightgraffiti
frei0r.premultiply
gtkrescale
region
resize
# WORKING
# avfilter.boxblur
......@@ -152,7 +152,7 @@ avfilter.zmq
# avfilter.drawbox
# avfilter.drawgrid
# avfilter.elbg
# avfilter.fspp
avfilter.fspp
# avfilter.gblur
# avfilter.hqdn3d
# avfilter.hqx
......@@ -266,9 +266,9 @@ avfilter.convolution
# wave
# FRAME BUFFER ISSUES
# avfilter.hqdn3d
# avfilter.lagfun
# frei0r.baltan
# frei0r.bgsubtract0r
# frei0r.lightgraffiti
# frei0r.tehroxx0r
avfilter.hqdn3d
avfilter.lagfun
frei0r.baltan
frei0r.bgsubtract0r
frei0r.lightgraffiti
frei0r.tehroxx0r
<!DOCTYPE kpartgui>
<effect tag="avfilter.subtitles">
<effect tag="avfilter.subtitles" type="hidden">
<name>Subtitles</name>
<description>Render subtitles onto the video</description>
<author>libavfilter</author>
......
......@@ -31,7 +31,7 @@
<group list="avfilter.colormatrix,avfilter.hqx,avfilter.deband,avfilter.colorspace,avfilter.fieldorder,rescale,avfilter.super2xsai,avfilter.xbr,avfilter.setrange,avfilter.kerndeint,avfilter.mcdeint,avfilter.il,avfilter.phase,avfilter.dilation,avfilter.erosion">
<text>Image adjustment</text>
</group>
<group list="frei0r.glow,frei0r.edgeglow,frei0r.softglow,charcoal,frei0r.cartoon,frei0r.emboss,frei0r.posterize,frei0r.sigmoidaltransfer,frei0r.sobel,frei0r.threelay0r,frei0r.threshold0r,frei0r.twolay0r,lightgraffiti,oldfilm,threshold,frei0r.pixeliz0r,avfilter.edgedetect,avfilter.elbg,avfilter.prewitt,avfilter.rgbashift,avfilter.roberts,avfilter.sobel,frei0r.lightgraffiti,frei0r.rgbsplit0r,frei0r.ndvi,frei0r.colordistance,frei0r.colortap,avfilter.chromashift,frei0r.primaries">
<group list="frei0r.glow,frei0r.edgeglow,frei0r.softglow,charcoal,frei0r.cartoon,frei0r.emboss,frei0r.posterize,frei0r.sigmoidaltransfer,frei0r.sobel,frei0r.threelay0r,frei0r.threshold0r,frei0r.twolay0r,lightgraffiti,oldfilm,threshold,frei0r.pixeliz0r,avfilter.edgedetect,avfilter.elbg,avfilter.prewitt,avfilter.rgbashift,avfilter.roberts,avfilter.sobel,frei0r.lightgraffiti,frei0r.rgbsplit0r,frei0r.ndvi,frei0r.colordistance,frei0r.colortap,avfilter.chromashift,frei0r.primaries,frei0r.aech0r">
<text>Stylize</text>
</group>
<group list="fade_from_black,fade_to_black,avfilter.lagfun,frei0r.nervous,freeze,frei0r.glitch0r,frei0r.vertigo,frei0r.baltan">
......
......@@ -66,7 +66,6 @@ CollapsibleEffectView::CollapsibleEffectView(const std::shared_ptr<EffectItemMod
m_regionEffect = true;
decoframe->setObjectName(QStringLiteral("decoframegroup"));
}
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
buttonUp->setIcon(QIcon::fromTheme(QStringLiteral("kdenlive-up")));
buttonUp->setToolTip(i18n("Move effect up"));
buttonDown->setIcon(QIcon::fromTheme(QStringLiteral("kdenlive-down")));
......
......@@ -97,6 +97,7 @@ EffectStackView::EffectStackView(AssetPanel *parent)
m_effectsTree->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
m_effectsTree->setHeaderHidden(true);
m_effectsTree->setRootIsDecorated(false);
m_effectsTree->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
QString style = QStringLiteral("QTreeView {border: none;}");
// m_effectsTree->viewport()->setAutoFillBackground(false);
m_effectsTree->setStyleSheet(style);
......@@ -189,6 +190,7 @@ void EffectStackView::setModel(std::shared_ptr<EffectStackModel> model, const QS
disconnect(&m_timerHeight, &QTimer::timeout, this, &EffectStackView::updateTreeHeight);
m_mutex.lock();
unsetModel(false);
m_effectsTree->setFixedHeight(0);
m_model = std::move(model);
m_sourceFrameSize = frameSize;
m_effectsTree->setModel(m_model.get());
......@@ -233,7 +235,6 @@ void EffectStackView::loadEffects()
updateTreeHeight();
return;
}
connect(&m_timerHeight, &QTimer::timeout, this, &EffectStackView::updateTreeHeight);
int active = qBound(0, m_model->getActiveEffect(), max - 1);
QModelIndex activeIndex;
for (int i = 0; i < max; i++) {
......@@ -277,6 +278,7 @@ void EffectStackView::loadEffects()
if (activeIndex.isValid()) {
doActivateEffect(active, activeIndex, true);
}
connect(&m_timerHeight, &QTimer::timeout, this, &EffectStackView::updateTreeHeight);
qDebug() << "MUTEX UNLOCK!!!!!!!!!!!! loadEffects";
}
......@@ -297,9 +299,10 @@ void EffectStackView::updateTreeHeight()
totalHeight += w->height();
}
}
m_effectsTree->setFixedHeight(totalHeight);
emit scrollView(m_effectsTree->visualRect(m_effectsTree->currentIndex()));
m_scrollTimer.start();
if (totalHeight != m_effectsTree->height()) {
m_effectsTree->setFixedHeight(totalHeight);
m_scrollTimer.start();
}
}
void EffectStackView::slotActivateEffect(const std::shared_ptr<EffectItemModel> &effectModel)
......@@ -342,7 +345,7 @@ void EffectStackView::slotAdjustDelegate(const std::shared_ptr<EffectItemModel>
QModelIndex ix = m_model->getIndexFromItem(effectModel);
if (ix.isValid()) {
auto *del = static_cast<WidgetDelegate *>(m_effectsTree->itemDelegate(ix));
if (del) {
if (del && del->height(ix) != newHeight) {
del->setHeight(ix, newHeight);
m_timerHeight.start();
}
......@@ -462,6 +465,15 @@ void EffectStackView::doActivateEffect(int row, QModelIndex activeIx, bool force
if (w) {
w->slotActivateEffect(true);
}
if (force && row > 0) {
// Some effects have a complex timed layout, so we need to wait a bit before getting the correct position for the effect
QTimer::singleShot(100, this, &EffectStackView::slotFocusEffect);
}
}
void EffectStackView::slotFocusEffect()
{
emit scrollView(m_effectsTree->visualRect(m_effectsTree->currentIndex()));
}
void EffectStackView::slotSaveStack()
......
......@@ -106,6 +106,7 @@ private slots:
void loadEffects();
void updateTreeHeight();
void doActivateEffect(int row, QModelIndex ix, bool force = false);
void slotFocusEffect();
/** @brief Save current effect stack
*/
void slotSaveStack();
......
......@@ -55,6 +55,7 @@ FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing)
FlowLayout::FlowLayout(int margin, int hSpacing, int vSpacing)
: m_hSpace(hSpacing)
, m_vSpace(vSpacing)
, m_minimumSize(200, 200)
{
setContentsMargins(margin, margin, margin, margin);
}
......@@ -108,7 +109,7 @@ QLayoutItem *FlowLayout::takeAt(int index)
Qt::Orientations FlowLayout::expandingDirections() const
{
return nullptr;
return Qt::Horizontal | Qt::Vertical;
}
bool FlowLayout::hasHeightForWidth() const
......@@ -124,6 +125,9 @@ int FlowLayout::heightForWidth(int width) const
void FlowLayout::setGeometry(const QRect &rect)
{
if (m_itemList.size() < 3) {
return;
}
doLayout(rect, false);
QLayout::setGeometry(rect);
}
......@@ -142,12 +146,12 @@ int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
{
QMargins mrg = contentsMargins();
QRect effectiveRect = rect.adjusted(mrg.left(), mrg.top(), -mrg.right(), -mrg.bottom());
if (m_itemList.isEmpty() || effectiveRect.width() <= 0) {
return 0;
}
int x = effectiveRect.x();
int y = effectiveRect.y();
int itemCount = 0;
if (m_itemList.isEmpty() || effectiveRect.width() <= 0 || effectiveRect.height() <= 0) {
return 0;
}
QWidget *wid = m_itemList.at(0)->widget();
QSize min = wid->minimumSize();
int columns = qMin(qFloor((double)rect.width() / min.width()), m_itemList.size());
......@@ -155,13 +159,12 @@ int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
int realWidth = rect.width() / columns - horizontalSpacing();
int totalHeight = y - rect.y() + mrg.bottom() + qCeil((double)m_itemList.size() / columns) * (realWidth + verticalSpacing());
m_minimumSize = QSize(rect.width(), totalHeight);
QSize hint = QSize(qMin(wid->maximumWidth(), realWidth), qMin(wid->maximumWidth(), realWidth));
if (testOnly) {
return totalHeight;
}
for (QLayoutItem *item : m_itemList) {
// We consider all items have the same dimensions
wid = item->widget();
QSize hint = QSize(qMin(wid->maximumWidth(), realWidth), qMin(wid->maximumWidth(), realWidth));
item->setGeometry(QRect(QPoint(x, y), hint));
itemCount++;
//qDebug()<<"=== ITEM: "<<itemCount<<", POS: "<<x<<"x"<<y<<", SIZE: "<<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