From: Marco Gittler Date: Thu, 27 Mar 2008 22:50:29 +0000 (+0000) Subject: some small updates X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ebaf9e6b47d20eb530d7887f6b4e6cc8d91a555f;p=kdenlive some small updates svn path=/branches/KDE4/; revision=2130 --- diff --git a/po/de/kdenlive.po b/po/de/kdenlive.po index 28d65ba8..f7ae4487 100644 --- a/po/de/kdenlive.po +++ b/po/de/kdenlive.po @@ -84,7 +84,7 @@ msgid "Add Clip" msgstr "Datei hinzufügen" msgid "Add Color Clip" -msgstr "Farbeclip hinzufügen" +msgstr "Farbclip hinzufügen" msgid "Add Custom Effect" msgstr "Benutzerdefinierten Effekt hinzufügen" @@ -207,7 +207,7 @@ msgid "Clear" msgstr "" msgid "Clip Color" -msgstr "Farbeclip" +msgstr "Farbclip" msgid "Clip Monitor" msgstr "Clip-Monitor" diff --git a/src/clipitem.cpp b/src/clipitem.cpp index 81ccec54..43785059 100644 --- a/src/clipitem.cpp +++ b/src/clipitem.cpp @@ -350,10 +350,28 @@ void ClipItem::paint(QPainter *painter, // painter->drawRect(boundingRect()); //painter->drawRoundRect(-10, -10, 20, 20); if (m_hover) { + int pointy = (int)(br.y() + br.height() / 2 - 5); + int pointx1 = (int)(br.x() + 10); + int pointx2 = (int)(br.x() + br.width() - 20); +#if 0 painter->setPen(QPen(Qt::black)); - painter->setBrush(QBrush(Qt::yellow)); - painter->drawEllipse((int)(br.x() + 10), (int)(br.y() + br.height() / 2 - 5) , 10, 10); - painter->drawEllipse((int)(br.x() + br.width() - 20), (int)(br.y() + br.height() / 2 - 5), 10, 10); + painter->setBrush(QBrush(QColor(50, 50, 0))); +#else + QRadialGradient gradient(pointx1 + 5, pointy + 5 , 5, 2, 2); + gradient.setColorAt(0.2, Qt::white); + gradient.setColorAt(0.8, Qt::yellow); + gradient.setColorAt(1, Qt::black); + painter->setBrush(gradient); +#endif + painter->drawEllipse(pointx1, pointy , 10, 10); + + QRadialGradient gradient1(pointx2 + 5, pointy + 5 , 5, 2, 2); + gradient1.setColorAt(0.2, Qt::white); + gradient1.setColorAt(0.8, Qt::yellow); + gradient1.setColorAt(1, Qt::black); + painter->setBrush(gradient1); + painter->drawEllipse(pointx2, pointy, 10, 10); + } } diff --git a/src/effectstackedit.cpp b/src/effectstackedit.cpp index 4062ea0a..35fc9374 100644 --- a/src/effectstackedit.cpp +++ b/src/effectstackedit.cpp @@ -81,10 +81,10 @@ void EffectStackEdit::transferParamDesc(const QDomElement& d, int , int) { QString value = pa.attribute("value").isNull() ? pa.attribute("default") : pa.attribute("value"); if (type == "geometry") { - pa.setAttribute("namedesc", "X;Y;W;H"); - pa.setAttribute("format", "%d,%d:%dx%d"); - pa.setAttribute("min", "-100;-100;0;0"); - pa.setAttribute("max", "0;0;100;100"); + pa.setAttribute("namedesc", "X;Y;W;H;M"); + pa.setAttribute("format", "%d%,%d%:%d%x%d%:%d%"); + pa.setAttribute("min", "-200;-20;0;0;0"); + pa.setAttribute("max", "200;200;100;100;100"); } if (type == "complex") { //pa.setAttribute("namedesc",pa.attribute("name")); @@ -105,10 +105,10 @@ void EffectStackEdit::transferParamDesc(const QDomElement& d, int , int) { for (int i = 0;i < lsval->list->count();i++) { QString entry = lsval->list->itemText(i); if (!entry.isEmpty() && (entry.endsWith(".png") || entry.endsWith(".pgm"))) { - /*if (!EffectStackEdit::iconCache.contains(entry)) { - QPixmap pix(entry); + if (!EffectStackEdit::iconCache.contains(entry)) { + QImage pix(entry); EffectStackEdit::iconCache[entry] = pix.scaled(30, 30); - }*/ + } lsval->list->setIconSize(QSize(30, 30)); lsval->list->setItemIcon(i, QPixmap::fromImage(iconCache[entry])); } diff --git a/src/effectstackview.cpp b/src/effectstackview.cpp index 717586b6..939733b3 100644 --- a/src/effectstackview.cpp +++ b/src/effectstackview.cpp @@ -61,8 +61,6 @@ EffectStackView::EffectStackView(EffectsList *audioEffectList, EffectsList *vide ui.infoBox->hide(); setEnabled(false); - setEnabled(false); - } void EffectStackView::slotUpdateEffectParams(const QDomElement& old, const QDomElement& e) { diff --git a/src/initeffects.cpp b/src/initeffects.cpp index f99def50..3decbf20 100644 --- a/src/initeffects.cpp +++ b/src/initeffects.cpp @@ -33,7 +33,7 @@ #include "effectstackedit.h" initEffectsThumbnailer::initEffectsThumbnailer() { - connect(this, SIGNAL(prepareThumbnails(const QStringList&)), this, SLOT(slotPrepareThumbnails(const QStringList&)), Qt::QueuedConnection); + } void initEffectsThumbnailer::prepareThumbnailsCall(const QStringList& list) { @@ -516,10 +516,10 @@ void initEffects::fillTransitionsList(Mlt::Repository * repository, EffectsList* paramList.append(quickParameterFill(ret, "Softness", "softness", "double", "0", "0", "100", "", "100")); paramList.append(quickParameterFill(ret, "Invert", "invert", "bool", "0", "0", "1")); paramList.append(quickParameterFill(ret, "ImageFile", "resource", "list", "", "", "", imagefiles)); - thumbnailer.prepareThumbnailsCall(imagelist); + //thumbnailer.prepareThumbnailsCall(imagelist); } else if (name == "composite") { - paramList.append(quickParameterFill(ret, "Geometry", "geometry", "geometry", "0%,0%:100%x100%", "0%,0%:100%x100%", "0%,0%:100%x100%")); + paramList.append(quickParameterFill(ret, "Geometry", "geometry", "geometry", "0;0;100;100;100", "0;0;100;100;100", "0;0;100;100;100")); tname.appendChild(ret.createTextNode("Composite")); QDomDocument ret1; @@ -547,7 +547,7 @@ void initEffects::fillTransitionsList(Mlt::Repository * repository, EffectsList* paramList.append(quickParameterFill(ret, "Fix Shear Z", "fix_shear_z", "double", "0", "0", "360")); paramList.append(quickParameterFill(ret, "Mirror", "mirror_off", "bool", "0", "0", "1")); paramList.append(quickParameterFill(ret, "Repeat", "repeat_off", "bool", "0", "0", "1")); - paramList.append(quickParameterFill(ret, "Geometry", "geometry", "geometry", "0%,0%:100%x100%", "0%,0%:100%x100%", "0%,0%:100%x100%")); + paramList.append(quickParameterFill(ret, "Geometry", "geometry", "geometry", "0;0;100;100;100", "0;0;100;100;100", "0;0;100;100;100")); tname.appendChild(ret.createTextNode("Composite")); } else if (name == "region") { tname.appendChild(ret.createTextNode("Region")); diff --git a/src/parameterplotter.cpp b/src/parameterplotter.cpp index 7d8d5d57..4f7394c0 100644 --- a/src/parameterplotter.cpp +++ b/src/parameterplotter.cpp @@ -92,12 +92,11 @@ void ParameterPlotter::setPointLists(const QDomElement& d, const QString& paramN else if (pa.attribute("default").contains(";")) defaults = pa.attribute("default").split(";"); QStringList maxv = pa.attribute("max").split(";"); - QStringList minv = pa.attribute("max").split(";"); + QStringList minv = pa.attribute("min").split(";"); for (int i = 0;i < maxv.size() && i < minv.size();i++) { if (max_y < maxv[i].toInt()) max_y = maxv[i].toInt(); if (min_y > minv[i].toInt()) min_y = minv[i].toInt(); } - for (int i = 0;i < parameterNameList.count();i++) { KPlotObject *plot = new KPlotObject(colors[plotobjects.size()%colors.size()]); plot->setShowLines(true); diff --git a/src/transition.cpp b/src/transition.cpp index 867cd964..df70e972 100644 --- a/src/transition.cpp +++ b/src/transition.cpp @@ -115,8 +115,15 @@ void Transition::paint(QPainter *painter, QPainterPath resultClipPath = roundRectPathUpper.united(roundRectPathLower); painter->setClipPath(resultClipPath.intersected(clippath), Qt::IntersectClip); - //painter->fillPath(roundRectPath, brush()); //, QBrush(QColor(Qt::red))); +#if 0 + QRadialGradient radialGrad(QPointF(br.x() + 50, br.y() + 20), 70); + radialGrad.setColorAt(0, QColor(200, 200, 0, 100)); + radialGrad.setColorAt(0.5, QColor(150, 150, 0, 100)); + radialGrad.setColorAt(1, QColor(100, 100, 0, 100)); + painter->fillRect(br.intersected(rectInView), QBrush(radialGrad)/*,Qt::Dense4Pattern*/); +#else painter->fillRect(br.intersected(rectInView), QBrush(QColor(200, 200, 0, 160)/*,Qt::Dense4Pattern*/)); +#endif painter->setClipRect(option->exposedRect); painter->drawPixmap((int)(br.x() + 10), (int)(br.y() + 10), transitionPixmap()); painter->drawPath(resultClipPath.intersected(clippath));