Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
(187) |
Apr
(14) |
May
(38) |
Jun
(84) |
Jul
(60) |
Aug
(35) |
Sep
(32) |
Oct
(192) |
Nov
(130) |
Dec
(124) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(159) |
Feb
(59) |
Mar
(120) |
Apr
(136) |
May
(132) |
Jun
(244) |
Jul
(81) |
Aug
(75) |
Sep
(99) |
Oct
(114) |
Nov
(84) |
Dec
(28) |
2010 |
Jan
(73) |
Feb
(84) |
Mar
(19) |
Apr
(41) |
May
(90) |
Jun
(68) |
Jul
(115) |
Aug
(128) |
Sep
(159) |
Oct
(106) |
Nov
(62) |
Dec
(102) |
2011 |
Jan
(142) |
Feb
(93) |
Mar
(65) |
Apr
(39) |
May
(60) |
Jun
(125) |
Jul
(66) |
Aug
(31) |
Sep
(83) |
Oct
(82) |
Nov
(130) |
Dec
(85) |
2012 |
Jan
(60) |
Feb
(34) |
Mar
(63) |
Apr
(59) |
May
(82) |
Jun
(75) |
Jul
(62) |
Aug
(11) |
Sep
(79) |
Oct
(59) |
Nov
(100) |
Dec
(118) |
2013 |
Jan
(48) |
Feb
(193) |
Mar
(54) |
Apr
(41) |
May
(158) |
Jun
(167) |
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(15) |
2014 |
Jan
(24) |
Feb
(14) |
Mar
(59) |
Apr
(81) |
May
(50) |
Jun
(6) |
Jul
(32) |
Aug
(78) |
Sep
(30) |
Oct
(22) |
Nov
(5) |
Dec
(128) |
2015 |
Jan
(67) |
Feb
(70) |
Mar
(54) |
Apr
(96) |
May
(91) |
Jun
(54) |
Jul
(67) |
Aug
(56) |
Sep
(128) |
Oct
(65) |
Nov
(137) |
Dec
(186) |
2016 |
Jan
(171) |
Feb
(105) |
Mar
(106) |
Apr
(139) |
May
(114) |
Jun
(154) |
Jul
(139) |
Aug
(45) |
Sep
(116) |
Oct
(38) |
Nov
(84) |
Dec
(153) |
2017 |
Jan
(154) |
Feb
(145) |
Mar
(207) |
Apr
(134) |
May
(83) |
Jun
(87) |
Jul
(108) |
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(2) |
2
(3) |
3
(1) |
4
(1) |
5
(2) |
6
|
7
(2) |
8
|
9
(9) |
10
(2) |
11
|
12
|
13
(4) |
14
(1) |
15
(3) |
16
(9) |
17
|
18
(2) |
19
|
20
|
21
|
22
|
23
(1) |
24
|
25
|
26
(4) |
27
(3) |
28
(9) |
29
(13) |
30
(1) |
31
(3) |
|
|
|
|
|
From: <j-b-m@us...> - 2009-08-31 13:31:05
|
Revision: 3866 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3866&view=rev Author: j-b-m Date: 2009-08-31 13:30:59 +0000 (Mon, 31 Aug 2009) Log Message: ----------- Fix inverted rectangles in titles Modified Paths: -------------- trunk/kdenlive/src/graphicsscenerectmove.cpp Modified: trunk/kdenlive/src/graphicsscenerectmove.cpp =================================================================== --- trunk/kdenlive/src/graphicsscenerectmove.cpp 2009-08-31 12:14:41 UTC (rev 3865) +++ trunk/kdenlive/src/graphicsscenerectmove.cpp 2009-08-31 13:30:59 UTC (rev 3866) @@ -479,9 +479,11 @@ } QGraphicsScene::mouseMoveEvent(e); } else if (m_tool == TITLE_RECTANGLE && e->buttons() & Qt::LeftButton) { - if (m_selectedItem == NULL && (m_clickPoint - e->screenPos()).manhattanLength() >= QApplication::startDragDistance()) { + if (m_selectedItem == NULL) { // create new rect item - m_selectedItem = addRect(0, 0, e->scenePos().x() - m_sceneClickPoint.x(), e->scenePos().y() - m_sceneClickPoint.y()); + QRectF r(0, 0, e->scenePos().x() - m_sceneClickPoint.x(), e->scenePos().y() - m_sceneClickPoint.y()); + r = r.normalized(); + m_selectedItem = addRect(QRectF(0, 0, r.width(), r.height())); emit newRect((QGraphicsRectItem *) m_selectedItem); m_selectedItem->setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable); m_selectedItem->setPos(m_sceneClickPoint); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-31 13:22:38
|
Revision: 3864 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3864&view=rev Author: j-b-m Date: 2009-08-31 12:13:46 +0000 (Mon, 31 Aug 2009) Log Message: ----------- Show startup notification when opening a clip in player application Modified Paths: -------------- trunk/kdenlive/src/renderwidget.cpp Modified: trunk/kdenlive/src/renderwidget.cpp =================================================================== --- trunk/kdenlive/src/renderwidget.cpp 2009-08-30 09:17:47 UTC (rev 3863) +++ trunk/kdenlive/src/renderwidget.cpp 2009-08-31 12:13:46 UTC (rev 3864) @@ -31,6 +31,7 @@ #include <KIO/NetAccess> #include <KColorScheme> #include <KNotification> +#include <KStartupInfo> // #include <knewstuff2/engine.h> #include <QDomDocument> @@ -39,8 +40,8 @@ #include <QListWidgetItem> #include <QHeaderView> #include <QMenu> +#include <QInputDialog> #include <QProcess> -#include <QInputDialog> const int GroupRole = Qt::UserRole; const int ExtensionRole = GroupRole + 1; @@ -1658,7 +1659,9 @@ void RenderWidget::slotPlayRendering(QTreeWidgetItem *item, int) { if (KdenliveSettings::defaultplayerapp().isEmpty() || item->data(1, Qt::UserRole + 2).toInt() != FINISHEDJOB) return; - QProcess::startDetached(KdenliveSettings::defaultplayerapp(), QStringList() << item->text(1)); + const QByteArray startId = KStartupInfo::createNewStartupId (); + const QString command = KdenliveSettings::defaultplayerapp() + ' ' + item->text(1); + KRun::runCommand(command, KdenliveSettings::defaultplayerapp(), KdenliveSettings::defaultplayerapp(), this, startId); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-31 13:22:31
|
Revision: 3865 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3865&view=rev Author: j-b-m Date: 2009-08-31 12:14:41 +0000 (Mon, 31 Aug 2009) Log Message: ----------- Rewrite UI for title animation Modified Paths: -------------- trunk/kdenlive/src/graphicsscenerectmove.cpp trunk/kdenlive/src/projectlist.cpp trunk/kdenlive/src/titledocument.cpp trunk/kdenlive/src/titledocument.h trunk/kdenlive/src/titlewidget.cpp trunk/kdenlive/src/titlewidget.h trunk/kdenlive/src/widgets/titlewidget_ui.ui Modified: trunk/kdenlive/src/graphicsscenerectmove.cpp =================================================================== --- trunk/kdenlive/src/graphicsscenerectmove.cpp 2009-08-31 12:13:46 UTC (rev 3864) +++ trunk/kdenlive/src/graphicsscenerectmove.cpp 2009-08-31 12:14:41 UTC (rev 3865) @@ -74,7 +74,7 @@ void GraphicsSceneRectMove::keyPressEvent(QKeyEvent * keyEvent) { - if (m_selectedItem == NULL) { + if (m_selectedItem == NULL || !(m_selectedItem->flags() & QGraphicsItem::ItemIsMovable)) { QGraphicsScene::keyPressEvent(keyEvent); return; } @@ -165,7 +165,7 @@ break; } } - if (item == NULL) { + if (item == NULL || !(item->flags() & QGraphicsItem::ItemIsSelectable)) { if (m_selectedItem && m_selectedItem->type() == 8) { //Â disable text editing QGraphicsTextItem *t = static_cast<QGraphicsTextItem *>(m_selectedItem); @@ -182,7 +182,7 @@ } } } - if (item != NULL) { + if (item != NULL && item->flags() & QGraphicsItem::ItemIsMovable) { m_sceneClickPoint = e->scenePos(); m_selectedItem = item; kDebug() << "///////// ITEMÂ TYPE: " << item->type(); Modified: trunk/kdenlive/src/projectlist.cpp =================================================================== --- trunk/kdenlive/src/projectlist.cpp 2009-08-31 12:13:46 UTC (rev 3864) +++ trunk/kdenlive/src/projectlist.cpp 2009-08-31 12:14:41 UTC (rev 3865) @@ -878,7 +878,7 @@ int height = 50; int width = (int)(height * m_render->dar()); if (clip->clipType() == AUDIO) pix = KIcon("audio-x-generic").pixmap(QSize(width, height)); - else if (clip->clipType() == TEXT || clip->clipType() == IMAGE) pix = KThumb::getFrame(item->referencedClip()->producer(), 0, width, height); + else if (clip->clipType() == IMAGE) pix = KThumb::getFrame(item->referencedClip()->producer(), 0, width, height); else pix = item->referencedClip()->thumbProducer()->extractImage(item->referencedClip()->getClipThumbFrame(), width, height); if (!pix.isNull()) { m_listView->blockSignals(true); Modified: trunk/kdenlive/src/titledocument.cpp =================================================================== --- trunk/kdenlive/src/titledocument.cpp 2009-08-31 12:13:46 UTC (rev 3864) +++ trunk/kdenlive/src/titledocument.cpp 2009-08-31 12:14:41 UTC (rev 3865) @@ -47,7 +47,7 @@ m_height = height; } -QDomDocument TitleDocument::xml(QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv) +QDomDocument TitleDocument::xml(QGraphicsRectItem* startv, QGraphicsRectItem* endv) { QDomDocument doc; @@ -128,18 +128,11 @@ if (startv && endv) { QDomElement endp = doc.createElement("endviewport"); QDomElement startp = doc.createElement("startviewport"); - endp.setAttribute("x", endv->data(0).toString()); - endp.setAttribute("y", endv->data(1).toString()); - endp.setAttribute("size", endv->data(2).toString()); - endp.setAttribute("rect", rectFToString(endv->boundingRect())); + QRectF r(endv->pos().x(), endv->pos().y(), endv->rect().width(), endv->rect().height()); + endp.setAttribute("rect", rectFToString(r)); + QRectF r2(startv->pos().x(), startv->pos().y(), startv->rect().width(), startv->rect().height()); + startp.setAttribute("rect", rectFToString(r2)); - startp.setAttribute("x", startv->data(0).toString()); - startp.setAttribute("y", startv->data(1).toString()); - startp.setAttribute("size", startv->data(2).toString()); - startp.setAttribute("rect", rectFToString(startv->boundingRect())); - - startp.setAttribute("z-index", startv->zValue()); - endp.setAttribute("z-index", endv->zValue()); main.appendChild(startp); main.appendChild(endp); } @@ -169,7 +162,7 @@ } -bool TitleDocument::saveDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv, int out) +bool TitleDocument::saveDocument(const KUrl& url, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int out) { if (!m_scene) return false; @@ -192,7 +185,7 @@ return KIO::NetAccess::upload(tmpfile.fileName(), url, 0); } -int TitleDocument::loadFromXml(QDomDocument doc, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv, int *out) +int TitleDocument::loadFromXml(QDomDocument doc, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int *out) { QDomNodeList titles = doc.elementsByTagName("kdenlivetitle"); //TODO: Check if the opened title size is equal to project size, otherwise warn user and rescale @@ -313,23 +306,14 @@ } } else if (items.item(i).nodeName() == "startviewport" && startv) { QString rect = items.item(i).attributes().namedItem("rect").nodeValue(); - startv->setPolygon(stringToRect(rect)); - int x = items.item(i).attributes().namedItem("x").nodeValue().toInt(); - int y = items.item(i).attributes().namedItem("y").nodeValue().toInt(); - int size = items.item(i).attributes().namedItem("size").nodeValue().toInt(); - startv->setData(0, x); - startv->setData(1, y); - startv->setData(2, size); - //startv->setPos(p); + QRectF r = stringToRect(rect); + startv->setRect(0, 0, r.width(), r.height()); + startv->setPos(r.topLeft()); } else if (items.item(i).nodeName() == "endviewport" && endv) { QString rect = items.item(i).attributes().namedItem("rect").nodeValue(); - endv->setPolygon(stringToRect(rect)); - int x = items.item(i).attributes().namedItem("x").nodeValue().toInt(); - int y = items.item(i).attributes().namedItem("y").nodeValue().toInt(); - int size = items.item(i).attributes().namedItem("size").nodeValue().toInt(); - endv->setData(0, x); - endv->setData(1, y); - endv->setData(2, size); + QRectF r = stringToRect(rect); + endv->setRect(0, 0, r.width(), r.height()); + endv->setPos(r.topLeft()); } } } Modified: trunk/kdenlive/src/titledocument.h =================================================================== --- trunk/kdenlive/src/titledocument.h 2009-08-31 12:13:46 UTC (rev 3864) +++ trunk/kdenlive/src/titledocument.h 2009-08-31 12:14:41 UTC (rev 3865) @@ -22,7 +22,7 @@ #include <KUrl> class QGraphicsScene; -class QGraphicsPolygonItem; +class QGraphicsRectItem; class TitleDocument { @@ -30,9 +30,9 @@ public: TitleDocument(); void setScene(QGraphicsScene* scene, int width, int height); - bool saveDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv, int out); - QDomDocument xml(QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv); - int loadFromXml(QDomDocument doc, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv, int *out); + bool saveDocument(const KUrl& url, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int out); + QDomDocument xml(QGraphicsRectItem* startv, QGraphicsRectItem* endv); + int loadFromXml(QDomDocument doc, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int *out); /** \brief Get the background color (incl. alpha) from the document, if possibly * \returns The background color of the document, inclusive alpha. If none found, returns (0,0,0,0) */ QColor getBackgroundColor(); Modified: trunk/kdenlive/src/titlewidget.cpp =================================================================== --- trunk/kdenlive/src/titlewidget.cpp 2009-08-31 12:13:46 UTC (rev 3864) +++ trunk/kdenlive/src/titlewidget.cpp 2009-08-31 12:14:41 UTC (rev 3865) @@ -86,12 +86,12 @@ connect(rectBColor, SIGNAL(clicked()), this, SLOT(rectChanged())); connect(rectLineWidth, SIGNAL(valueChanged(int)), this, SLOT(rectChanged())); - connect(startViewportX, SIGNAL(valueChanged(int)), this, SLOT(setupViewports())); + /*connect(startViewportX, SIGNAL(valueChanged(int)), this, SLOT(setupViewports())); connect(startViewportY, SIGNAL(valueChanged(int)), this, SLOT(setupViewports())); connect(startViewportSize, SIGNAL(valueChanged(int)), this, SLOT(setupViewports())); connect(endViewportX, SIGNAL(valueChanged(int)), this, SLOT(setupViewports())); connect(endViewportY, SIGNAL(valueChanged(int)), this, SLOT(setupViewports())); - connect(endViewportSize, SIGNAL(valueChanged(int)), this, SLOT(setupViewports())); + connect(endViewportSize, SIGNAL(valueChanged(int)), this, SLOT(setupViewports()));*/ connect(zValue, SIGNAL(valueChanged(int)), this, SLOT(zIndexChanged(int))); connect(itemzoom, SIGNAL(valueChanged(int)), this, SLOT(itemScaled(int))); @@ -261,18 +261,22 @@ // mbd: load saved settings readChoices(); - initViewports(); graphicsView->show(); //graphicsView->setRenderHint(QPainter::Antialiasing); graphicsView->setInteractive(true); //graphicsView->resize(400, 300); kDebug() << "// TITLE WIDGWT: " << graphicsView->viewport()->width() << "x" << graphicsView->viewport()->height(); //toolBox->setItemEnabled(2, false); + m_startViewport = new QGraphicsRectItem(QRectF(0, 0, m_frameWidth, m_frameHeight)); + m_endViewport = new QGraphicsRectItem(QRectF(0, 0, m_frameWidth, m_frameHeight)); if (!url.isEmpty()) loadTitle(url); else { slotTextTool(); QTimer::singleShot(200, this, SLOT(slotAdjustZoom())); } + initAnimation(); + connect(anim_start, SIGNAL(toggled(bool)), this, SLOT(slotAnimStart(bool))); + connect(anim_end, SIGNAL(toggled(bool)), this, SLOT(slotAnimEnd(bool))); } TitleWidget::~TitleWidget() @@ -360,7 +364,12 @@ break; } } + enableToolbars(t); + if (t == TITLE_RECTANGLE && (l.at(0) == m_endViewport || l.at(0) == m_startViewport)) { + //graphicsView->centerOn(l.at(0)); + t = TITLE_NONE; + } showToolbars(t); if (l.size() > 0) { @@ -520,11 +529,10 @@ } } -void TitleWidget::initViewports() +void TitleWidget::initAnimation() { - m_startViewport = new QGraphicsPolygonItem(QPolygonF(QRectF(0, 0, 0, 0))); - m_endViewport = new QGraphicsPolygonItem(QPolygonF(QRectF(0, 0, 0, 0))); - + align_box->setEnabled(false); + align_box->setVisible(false); QPen startpen(Qt::DotLine); QPen endpen(Qt::DashDotLine); startpen.setColor(QColor(100, 200, 100, 140)); @@ -533,9 +541,6 @@ m_startViewport->setPen(startpen); m_endViewport->setPen(endpen); - startViewportSize->setValue(100); - endViewportSize->setValue(100); - m_startViewport->setZValue(-1000); m_endViewport->setZValue(-1000); @@ -718,24 +723,34 @@ showToolbars(TITLE_RECTANGLE); settingUp = true; QGraphicsRectItem *rec = static_cast <QGraphicsRectItem *>(l.at(0)); - toolBox->setCurrentIndex(0); - //toolBox->setItemEnabled(3, true); - rectFAlpha->setValue(rec->pen().color().alpha()); - rectBAlpha->setValue(rec->brush().color().alpha()); - //kDebug() << rec->brush().color().alpha(); - QColor fcol = rec->pen().color(); - QColor bcol = rec->brush().color(); - //fcol.setAlpha(255); - //bcol.setAlpha(255); - rectFColor->setColor(fcol); - rectBColor->setColor(bcol); - settingUp = false; - rectLineWidth->setValue(rec->pen().width()); + if (rec == m_startViewport || rec == m_endViewport) { + toolBox->setCurrentIndex(3); + toolBox->widget(0)->setEnabled(false); + toolBox->widget(1)->setEnabled(false); + enableToolbars(TITLE_NONE); + } + else { + toolBox->widget(0)->setEnabled(true); + toolBox->widget(1)->setEnabled(true); + toolBox->setCurrentIndex(0); + //toolBox->setItemEnabled(3, true); + rectFAlpha->setValue(rec->pen().color().alpha()); + rectBAlpha->setValue(rec->brush().color().alpha()); + //kDebug() << rec->brush().color().alpha(); + QColor fcol = rec->pen().color(); + QColor bcol = rec->brush().color(); + //fcol.setAlpha(255); + //bcol.setAlpha(255); + rectFColor->setColor(fcol); + rectBColor->setColor(bcol); + settingUp = false; + rectLineWidth->setValue(rec->pen().width()); + enableToolbars(TITLE_RECTANGLE); + } updateAxisButtons(l.at(0)); updateCoordinates(rec); updateDimension(rec); - enableToolbars(TITLE_RECTANGLE); } else if (l.at(0)->type() == IMAGEITEM) { showToolbars(TITLE_IMAGE); @@ -1281,7 +1296,7 @@ { //double aspect_ratio = 4.0 / 3.0;//read from project //better zoom centered, but render uses only the created rect, so no problem to change the zoom function - QRectF sp(0, 0, startViewportSize->value() * m_frameWidth / 100.0 , startViewportSize->value()* m_frameHeight / 100.0); + /*QRectF sp(0, 0, startViewportSize->value() * m_frameWidth / 100.0 , startViewportSize->value()* m_frameHeight / 100.0); QRectF ep(0, 0, endViewportSize->value() * m_frameWidth / 100.0, endViewportSize->value() * m_frameHeight / 100.0); // use a polygon thiat uses 16:9 and 4:3 rects forpreview the size in all aspect ratios ? QPolygonF spoly(sp); @@ -1298,7 +1313,7 @@ m_endViewport->setData(0, endViewportX->value()); m_endViewport->setData(1, endViewportY->value()); m_endViewport->setData(2, endViewportSize->value()); - } + }*/ } void TitleWidget::loadTitle(KUrl url) @@ -1322,6 +1337,7 @@ KIO::NetAccess::removeTempFile(tmpfile); } setXml(doc); + /*int out; m_count = m_titledocument.loadDocument(url, m_startViewport, m_endViewport, &out) + 1; adjustFrameSize(); @@ -1342,6 +1358,8 @@ void TitleWidget::saveTitle(KUrl url) { + if (anim_start->isChecked()) slotAnimStart(false); + if (anim_end->isChecked()) slotAnimEnd(false); if (url.isEmpty()) url = KFileDialog::getSaveUrl(KUrl(m_projectTitlePath), "application/x-kdenlivetitle", this, i18n("Save Title")); if (!url.isEmpty()) { if (m_titledocument.saveDocument(url, m_startViewport, m_endViewport, m_tc.getFrameCount(title_duration->text())) == false) @@ -1399,12 +1417,12 @@ horizontalSlider->blockSignals(false); kcolorbutton->blockSignals(false); - startViewportX->setValue(m_startViewport->data(0).toInt()); + /*startViewportX->setValue(m_startViewport->data(0).toInt()); startViewportY->setValue(m_startViewport->data(1).toInt()); startViewportSize->setValue(m_startViewport->data(2).toInt()); endViewportX->setValue(m_endViewport->data(0).toInt()); endViewportY->setValue(m_endViewport->data(1).toInt()); - endViewportSize->setValue(m_endViewport->data(2).toInt()); + endViewportSize->setValue(m_endViewport->data(2).toInt());*/ QTimer::singleShot(200, this, SLOT(slotAdjustZoom())); slotSelectTool(); @@ -1461,6 +1479,8 @@ /** \brief Connected to the accepted signal - calls writeChoices */ void TitleWidget::slotAccepted() { + if (anim_start->isChecked()) slotAnimStart(false); + if (anim_end->isChecked()) slotAnimEnd(false); writeChoices(); } @@ -1534,6 +1554,65 @@ displayBackgroundFrame(); } +void TitleWidget::slotAnimStart(bool anim) +{ + if (anim && anim_end->isChecked()) { + anim_end->setChecked(false); + m_endViewport->setZValue(-1000); + m_endViewport->setBrush(QBrush()); + } + slotSelectTool(); + QList<QGraphicsItem *> list = m_scene->items(); + for (int i = 0; i < list.count(); i++) { + list.at(i)->setFlag(QGraphicsItem::ItemIsMovable, !anim); + list.at(i)->setFlag(QGraphicsItem::ItemIsSelectable, !anim); + } + align_box->setEnabled(anim); + frame_toolbar->setEnabled(!anim); + rect_properties->setEnabled(!anim); + if (anim) { + m_startViewport->setZValue(1100); + QColor col = m_startViewport->pen().color(); + col.setAlpha(100); + m_startViewport->setBrush(col); + m_startViewport->setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable); + } + else { + m_startViewport->setZValue(-1000); + m_startViewport->setBrush(QBrush()); + m_startViewport->setFlags(0); + } + +} +void TitleWidget::slotAnimEnd(bool anim) +{ + if (anim && anim_start->isChecked()) { + anim_start->setChecked(false); + m_startViewport->setZValue(-1000); + m_startViewport->setBrush(QBrush()); + } + slotSelectTool(); + QList<QGraphicsItem *> list = m_scene->items(); + for (int i = 0; i < list.count(); i++) { + list.at(i)->setFlag(QGraphicsItem::ItemIsMovable, !anim); + list.at(i)->setFlag(QGraphicsItem::ItemIsSelectable, !anim); + } + align_box->setEnabled(anim); + frame_toolbar->setEnabled(!anim); + rect_properties->setEnabled(!anim); + if (anim) { + m_endViewport->setZValue(1100); + QColor col = m_endViewport->pen().color(); + col.setAlpha(100); + m_endViewport->setBrush(col); + m_endViewport->setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable); + } + else { + m_endViewport->setZValue(-1000); + m_endViewport->setBrush(QBrush()); + m_endViewport->setFlags(0); + } +} Modified: trunk/kdenlive/src/titlewidget.h =================================================================== --- trunk/kdenlive/src/titlewidget.h 2009-08-31 12:13:46 UTC (rev 3864) +++ trunk/kdenlive/src/titlewidget.h 2009-08-31 12:14:41 UTC (rev 3865) @@ -83,9 +83,9 @@ virtual void resizeEvent(QResizeEvent * event); private: - QGraphicsPolygonItem *m_startViewport, *m_endViewport; + QGraphicsRectItem *m_startViewport, *m_endViewport; GraphicsSceneRectMove *m_scene; - void initViewports(); + void initAnimation(); QMap<QGraphicsItem*, Transform > m_transformations; TitleDocument m_titledocument; QGraphicsRectItem *m_frameBorder; @@ -229,6 +229,8 @@ void slotSelectTool(); void slotImageTool(); + void slotAnimStart(bool); + void slotAnimEnd(bool); /** \brief Called when accepted, stores the user selections for next time use */ void slotAccepted(); Modified: trunk/kdenlive/src/widgets/titlewidget_ui.ui =================================================================== --- trunk/kdenlive/src/widgets/titlewidget_ui.ui 2009-08-31 12:13:46 UTC (rev 3864) +++ trunk/kdenlive/src/widgets/titlewidget_ui.ui 2009-08-31 12:14:41 UTC (rev 3865) @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>736</width> - <height>515</height> + <height>638</height> </rect> </property> <property name="sizePolicy"> @@ -576,6 +576,13 @@ </property> </widget> </item> + <item row="1" column="0" colspan="2"> + <widget class="Line" name="line_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> <item row="2" column="0" colspan="2"> <widget class="QToolBox" name="toolBox"> <property name="sizePolicy"> @@ -585,7 +592,7 @@ </sizepolicy> </property> <property name="currentIndex"> - <number>0</number> + <number>2</number> </property> <widget class="QWidget" name="BasicOperations"> <property name="geometry"> @@ -593,7 +600,7 @@ <x>0</x> <y>0</y> <width>347</width> - <height>140</height> + <height>238</height> </rect> </property> <attribute name="label"> @@ -711,8 +718,8 @@ <rect> <x>0</x> <y>0</y> - <width>94</width> - <height>65</height> + <width>347</width> + <height>238</height> </rect> </property> <attribute name="label"> @@ -758,189 +765,178 @@ <property name="geometry"> <rect> <x>0</x> - <y>-58</y> - <width>330</width> - <height>198</height> + <y>0</y> + <width>347</width> + <height>238</height> </rect> </property> <attribute name="label"> - <string>Viewport</string> + <string>Animation</string> </attribute> - <layout class="QGridLayout"> + <layout class="QGridLayout" name="gridLayout_9"> <item row="0" column="0"> - <layout class="QVBoxLayout"> - <item> - <widget class="QGroupBox" name="groupBox_3"> - <property name="title"> - <string>StartViewport</string> - </property> - <layout class="QGridLayout"> - <item row="0" column="0"> - <layout class="QGridLayout"> - <item row="0" column="0"> - <widget class="QLabel" name="label_8"> - <property name="text"> - <string>X:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="label_9"> - <property name="text"> - <string>Y:</string> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_10"> - <property name="text"> - <string>Size:</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QSpinBox" name="startViewportX"> - <property name="minimum"> - <number>-32000</number> - </property> - <property name="maximum"> - <number>3200</number> - </property> - <property name="singleStep"> - <number>10</number> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QSpinBox" name="startViewportY"> - <property name="minimum"> - <number>-32000</number> - </property> - <property name="maximum"> - <number>32000</number> - </property> - <property name="singleStep"> - <number>10</number> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QSpinBox" name="startViewportSize"> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>1000</number> - </property> - <property name="singleStep"> - <number>5</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox_4"> - <property name="title"> - <string>EndViewport</string> - </property> - <layout class="QGridLayout"> - <item row="0" column="0"> - <layout class="QGridLayout"> - <item row="0" column="0"> - <widget class="QLabel" name="label_5"> - <property name="text"> - <string>X:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="label_6"> - <property name="text"> - <string>Y:</string> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_7"> - <property name="text"> - <string>Size:</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QSpinBox" name="endViewportX"> - <property name="minimum"> - <number>-32000</number> - </property> - <property name="maximum"> - <number>32000</number> - </property> - <property name="singleStep"> - <number>10</number> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QSpinBox" name="endViewportY"> - <property name="minimum"> - <number>-32000</number> - </property> - <property name="maximum"> - <number>32000</number> - </property> - <property name="singleStep"> - <number>10</number> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QSpinBox" name="endViewportSize"> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>1000</number> - </property> - <property name="singleStep"> - <number>5</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <spacer> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> + <widget class="QToolButton" name="anim_start"> + <property name="text"> + <string>Edit start</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> </item> + <item row="1" column="0"> + <widget class="QToolButton" name="anim_end"> + <property name="text"> + <string>Edit end</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QGroupBox" name="align_box"> + <property name="title"> + <string/> + </property> + <layout class="QGridLayout" name="gridLayout_8"> + <item row="0" column="0" colspan="2"> + <widget class="QLabel" name="label_5"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Hor. align</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QToolButton" name="left_align"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string><</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QToolButton" name="hcenter_align"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>|</string> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QToolButton" name="right_align"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>></string> + </property> + </widget> + </item> + <item row="2" column="0" colspan="3"> + <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"> + <string>Vert. align</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QToolButton" name="top_align"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string><</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QToolButton" name="vcenter_align"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>|</string> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QToolButton" name="bottom_align"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>></string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="3" column="0"> + <spacer> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>81</width> + <height>120</height> + </size> + </property> + </spacer> + </item> + <item row="2" column="1"> + <spacer name="horizontalSpacer_7"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> </layout> </widget> </widget> </item> - <item row="1" column="0" colspan="2"> - <widget class="Line" name="line_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> </layout> </widget> </widget> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-30 09:17:55
|
Revision: 3863 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3863&view=rev Author: j-b-m Date: 2009-08-30 09:17:47 +0000 (Sun, 30 Aug 2009) Log Message: ----------- Fix seeking from monitor timecode when in frame mode, change the direction of mouse wheel event to be similar to the timeline ruler seeking Modified Paths: -------------- trunk/kdenlive/src/monitor.cpp Modified: trunk/kdenlive/src/monitor.cpp =================================================================== --- trunk/kdenlive/src/monitor.cpp 2009-08-29 21:59:44 UTC (rev 3862) +++ trunk/kdenlive/src/monitor.cpp 2009-08-30 09:17:47 UTC (rev 3863) @@ -107,7 +107,10 @@ m_timePos = new KRestrictedLine(this); m_timePos->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding); m_frametimecode = KdenliveSettings::frametimecode(); - if (m_frametimecode) m_timePos->setInputMask("999999999"); + if (m_frametimecode) { + m_timePos->setInputMask(QString()); + m_timePos->setValidator(new QIntValidator(this)); + } else m_timePos->setInputMask("99:99:99:99"); toolbar->addWidget(m_timePos); @@ -428,10 +431,10 @@ { if (event->modifiers() == Qt::ControlModifier) { int delta = m_monitorManager->timecode().fps(); - if (event->delta() < 0) delta = 0 - delta; + if (event->delta() > 0) delta = 0 - delta; slotSeek(render->seekFramePosition() - delta); } else { - if (event->delta() <= 0) slotForwardOneFrame(); + if (event->delta() >= 0) slotForwardOneFrame(); else slotRewindOneFrame(); } } @@ -479,6 +482,7 @@ int frames; if (m_frametimecode) frames = m_timePos->text().toInt(); else frames = m_monitorManager->timecode().getFrameCount(m_timePos->text()); + kDebug()<<"// / / SEEK TO: "<<frames; slotSeek(frames); } @@ -786,10 +790,12 @@ m_frametimecode = KdenliveSettings::frametimecode(); if (m_frametimecode) { int frames = m_monitorManager->timecode().getFrameCount(m_timePos->text()); - m_timePos->setInputMask("999999999"); + m_timePos->setValidator(new QIntValidator(this)); + m_timePos->setInputMask(QString()); m_timePos->setText(QString::number(frames)); } else { int pos = m_timePos->text().toInt(); + m_timePos->setValidator(0); m_timePos->setInputMask("99:99:99:99"); m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(pos)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ddennedy@us...> - 2009-08-29 21:59:50
|
Revision: 3862 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3862&view=rev Author: ddennedy Date: 2009-08-29 21:59:44 +0000 (Sat, 29 Aug 2009) Log Message: ----------- Disable Record Monitor, Capture Settings, and Split view on OS X. Fix frame dropping toggle and display of widgets in status bar on OS X. Modified Paths: -------------- trunk/kdenlive/src/kdenlivesettingsdialog.cpp trunk/kdenlive/src/mainwindow.cpp trunk/kdenlive/src/monitor.cpp trunk/kdenlive/src/renderer.cpp Modified: trunk/kdenlive/src/kdenlivesettingsdialog.cpp =================================================================== --- trunk/kdenlive/src/kdenlivesettingsdialog.cpp 2009-08-29 21:01:55 UTC (rev 3861) +++ trunk/kdenlive/src/kdenlivesettingsdialog.cpp 2009-08-29 21:59:44 UTC (rev 3862) @@ -75,6 +75,11 @@ m_configCapture.setupUi(p4); m_page4 = addPage(p4, i18n("Capture"), "media-record"); m_configCapture.tabWidget->setCurrentIndex(KdenliveSettings::defaultcapture()); +#ifdef Q_WS_MAC + m_configCapture.tabWidget->setEnabled(false); + m_configCapture.kcfg_defaultcapture->setEnabled(false); + m_configCapture.label->setText(i18n("Capture is not yet available on OS X.")); +#endif QWidget *p5 = new QWidget; m_configShuttle.setupUi(p5); Modified: trunk/kdenlive/src/mainwindow.cpp =================================================================== --- trunk/kdenlive/src/mainwindow.cpp 2009-08-29 21:01:55 UTC (rev 3861) +++ trunk/kdenlive/src/mainwindow.cpp 2009-08-29 21:59:44 UTC (rev 3862) @@ -194,6 +194,7 @@ m_projectMonitorDock->setWidget(m_projectMonitor); addDockWidget(Qt::TopDockWidgetArea, m_projectMonitorDock); +#ifndef Q_WS_MAC m_recMonitorDock = new QDockWidget(i18n("Record Monitor"), this); m_recMonitorDock->setObjectName("record_monitor"); m_recMonitor = new RecMonitor("record", this); @@ -202,6 +203,7 @@ connect(m_recMonitor, SIGNAL(addProjectClip(KUrl)), this, SLOT(slotAddProjectClip(KUrl))); connect(m_recMonitor, SIGNAL(showConfigDialog(int, int)), this, SLOT(slotPreferences(int, int))); +#endif m_undoViewDock = new QDockWidget(i18n("Undo History"), this); m_undoViewDock->setObjectName("undo_history"); @@ -226,7 +228,9 @@ tabifyDockWidget(m_clipMonitorDock, m_projectMonitorDock); +#ifndef Q_WS_MAC tabifyDockWidget(m_clipMonitorDock, m_recMonitorDock); +#endif setCentralWidget(m_timelineArea); @@ -744,7 +748,11 @@ m_zoomSlider->setMaximumWidth(150); m_zoomSlider->setMinimumWidth(100); +#ifdef Q_WS_MAC + const int contentHeight = QFontMetrics(w->font()).height() + 14; +#else const int contentHeight = QFontMetrics(w->font()).height() + 8; +#endif QString style = "QSlider::groove:horizontal { background-color: rgba(230, 230, 230, 220);border: 1px solid #999999;height: 8px;border-radius: 3px;margin-top:3px }"; style.append("QSlider::handle:horizontal { background-color: white; border: 1px solid #999999;width: 9px;margin: -2px 0;border-radius: 3px; }"); @@ -1895,7 +1903,9 @@ //connect(dialog, SIGNAL(doResetProfile()), this, SLOT(slotDetectAudioDriver())); connect(dialog, SIGNAL(doResetProfile()), m_monitorManager, SLOT(slotResetProfiles())); connect(dialog, SIGNAL(updatePreviewSettings()), this, SLOT(slotUpdatePreviewSettings())); +#ifndef Q_WS_MAC connect(dialog, SIGNAL(updateCaptureFolder()), m_recMonitor, SLOT(slotUpdateCaptureFolder())); +#endif //connect(dialog, SIGNAL(updatePreviewSettings()), this, SLOT(slotUpdatePreviewSettings())); dialog->show(); if (page != -1) dialog->showPage(page, option); Modified: trunk/kdenlive/src/monitor.cpp =================================================================== --- trunk/kdenlive/src/monitor.cpp 2009-08-29 21:01:55 UTC (rev 3861) +++ trunk/kdenlive/src/monitor.cpp 2009-08-29 21:59:44 UTC (rev 3862) @@ -190,9 +190,11 @@ m_contextMenu->addAction(extractFrame); if (m_name != "clip") { +#ifndef Q_WS_MAC QAction *splitView = m_contextMenu->addAction(KIcon("view-split-left-right"), i18n("Split view"), render, SLOT(slotSplitView(bool))); splitView->setCheckable(true); m_configMenu->addAction(splitView); +#endif } else { QAction *setThumbFrame = m_contextMenu->addAction(KIcon("document-new"), i18n("Set current image as thumbnail"), this, SLOT(slotSetThumbFrame())); m_configMenu->addAction(setThumbFrame); Modified: trunk/kdenlive/src/renderer.cpp =================================================================== --- trunk/kdenlive/src/renderer.cpp 2009-08-29 21:01:55 UTC (rev 3861) +++ trunk/kdenlive/src/renderer.cpp 2009-08-29 21:59:44 UTC (rev 3862) @@ -1356,7 +1356,11 @@ int dropFrames = 1; if (show == false) dropFrames = 0; m_mltConsumer->stop(); +#ifdef Q_WS_MAC + m_mltConsumer->set("real_time", dropFrames); +#else m_mltConsumer->set("play.real_time", dropFrames); +#endif if (m_mltConsumer->start() == -1) { emit blockMonitors(); delete m_mltProducer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 21:02:04
|
Revision: 3861 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3861&view=rev Author: j-b-m Date: 2009-08-29 21:01:55 +0000 (Sat, 29 Aug 2009) Log Message: ----------- Dont't update effects while user is typing a value in the spinbox, instead wait for return Modified Paths: -------------- trunk/kdenlive/src/widgets/constval_ui.ui Modified: trunk/kdenlive/src/widgets/constval_ui.ui =================================================================== --- trunk/kdenlive/src/widgets/constval_ui.ui 2009-08-29 18:34:55 UTC (rev 3860) +++ trunk/kdenlive/src/widgets/constval_ui.ui 2009-08-29 21:01:55 UTC (rev 3861) @@ -1,43 +1,48 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>Constval_UI</class> - <widget class="QWidget" name="Constval_UI" > - <property name="geometry" > + <widget class="QWidget" name="Constval_UI"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>261</width> - <height>50</height> + <width>194</width> + <height>42</height> </rect> </property> - <layout class="QGridLayout" name="gridLayout" > - <property name="verticalSpacing" > + <layout class="QGridLayout" name="gridLayout"> + <property name="verticalSpacing"> <number>0</number> </property> - <property name="margin" > + <property name="margin"> <number>0</number> </property> - <item row="0" column="0" colspan="2" > - <widget class="QLabel" name="label" > - <property name="text" > + <item row="0" column="0" colspan="2"> + <widget class="QLabel" name="label"> + <property name="text"> <string>Param</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignCenter</set> </property> </widget> </item> - <item row="1" column="0" > - <widget class="QSlider" name="horizontalSlider" > - <property name="orientation" > + <item row="1" column="0"> + <widget class="QSlider" name="horizontalSlider"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="invertedControls" > + <property name="invertedControls"> <bool>false</bool> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QSpinBox" name="spinBox" /> + <item row="1" column="1"> + <widget class="QSpinBox" name="spinBox"> + <property name="keyboardTracking"> + <bool>false</bool> + </property> + </widget> </item> </layout> </widget> @@ -49,11 +54,11 @@ <receiver>spinBox</receiver> <slot>setValue(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>208</x> <y>68</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>273</x> <y>66</y> </hint> @@ -65,11 +70,11 @@ <receiver>horizontalSlider</receiver> <slot>setValue(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>273</x> <y>66</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>208</x> <y>68</y> </hint> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 18:35:03
|
Revision: 3860 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3860&view=rev Author: j-b-m Date: 2009-08-29 18:34:55 +0000 (Sat, 29 Aug 2009) Log Message: ----------- Remove reference to test file Modified Paths: -------------- trunk/kdenlive/effects/CMakeLists.txt Modified: trunk/kdenlive/effects/CMakeLists.txt =================================================================== --- trunk/kdenlive/effects/CMakeLists.txt 2009-08-29 13:26:23 UTC (rev 3859) +++ trunk/kdenlive/effects/CMakeLists.txt 2009-08-29 18:34:55 UTC (rev 3860) @@ -29,7 +29,6 @@ obscure.xml rotation.xml sepia.xml -sox_balance.xml sox_bass.xml sox_gain.xml sox_phaser.xml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Mads Bondo Dydensborg <mads@dy...> - 2009-08-29 17:55:54
|
Lørdag 29 august 2009 skrev j-b-m@...: I've got an error report from a build wizard user: re sox_balance.xml, that makes this commit seems a bit suspecious: > Added Paths: > ----------- > trunk/kdenlive/effects/frei0r_vertigo.xml > > Modified: trunk/kdenlive/effects/CMakeLists.txt > =================================================================== > --- trunk/kdenlive/effects/CMakeLists.txt 2009-08-29 00:38:25 UTC (rev > 3852) +++ trunk/kdenlive/effects/CMakeLists.txt 2009-08-29 01:11:17 UTC > (rev 3853) @@ -29,6 +29,7 @@ > obscure.xml > rotation.xml > sepia.xml > +sox_balance.xml No such file seems to be present in the svn repo. Is it possibly that you have forgotten to add this file? Build error: -- Installing: /scratch/KdenliveInstall/20090829/share/apps/kdenlive/effects/sepia.xml CMake Error at effects/cmake_install.cmake:36 (FILE): file INSTALL cannot find file "/scratch/Svn/kdenlive/effects/sox_balance.xml" to install. Call Stack (most recent call first): cmake_install.cmake:41 (INCLUDE) make: *** [install] Error 1 Regards Mads -- Mads Bondo Dydensborg mads@... http://www.madsdydensborg.dk/ No rational argument will have a rational effect on a man who does not want to adopt a rational attitude. - Karl Popper |
From: <j-b-m@us...> - 2009-08-29 13:26:34
|
Revision: 3859 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3859&view=rev Author: j-b-m Date: 2009-08-29 13:26:23 +0000 (Sat, 29 Aug 2009) Log Message: ----------- Fix custom effects multiplication: http://kdenlive.org/mantis/view.php?id=1093 Modified Paths: -------------- trunk/kdenlive/src/effectslist.cpp trunk/kdenlive/src/effectslist.h trunk/kdenlive/src/initeffects.cpp trunk/kdenlive/src/mainwindow.cpp Modified: trunk/kdenlive/src/effectslist.cpp =================================================================== --- trunk/kdenlive/src/effectslist.cpp 2009-08-29 13:07:53 UTC (rev 3858) +++ trunk/kdenlive/src/effectslist.cpp 2009-08-29 13:26:23 UTC (rev 3859) @@ -156,6 +156,12 @@ m_baseElement = documentElement(); } +void EffectsList::clearList() +{ + while (!m_baseElement.firstChild().isNull()) + m_baseElement.removeChild(m_baseElement.firstChild()); +} + // static void EffectsList::setParameter(QDomElement effect, const QString &name, const QString &value) { Modified: trunk/kdenlive/src/effectslist.h =================================================================== --- trunk/kdenlive/src/effectslist.h 2009-08-29 13:07:53 UTC (rev 3858) +++ trunk/kdenlive/src/effectslist.h 2009-08-29 13:26:23 UTC (rev 3859) @@ -53,6 +53,7 @@ static bool hasKeyFrames(QDomElement effect); static void setParameter(QDomElement effect, const QString &name, const QString &value); static QString parameter(QDomElement effect, const QString &name); + void clearList(); private: QDomElement m_baseElement; Modified: trunk/kdenlive/src/initeffects.cpp =================================================================== --- trunk/kdenlive/src/initeffects.cpp 2009-08-29 13:07:53 UTC (rev 3858) +++ trunk/kdenlive/src/initeffects.cpp 2009-08-29 13:26:23 UTC (rev 3859) @@ -232,7 +232,7 @@ // static void initEffects::parseCustomEffectsFile() { - MainWindow::customEffects.clear(); + MainWindow::customEffects.clearList(); QString path = KStandardDirs::locateLocal("appdata", "effects/", true); QDir directory = QDir(path); QStringList filter; Modified: trunk/kdenlive/src/mainwindow.cpp =================================================================== --- trunk/kdenlive/src/mainwindow.cpp 2009-08-29 13:07:53 UTC (rev 3858) +++ trunk/kdenlive/src/mainwindow.cpp 2009-08-29 13:26:23 UTC (rev 3859) @@ -522,9 +522,12 @@ void MainWindow::slotReloadEffects() { + kDebug()<<"START RELOAD; COUNR: "<<m_customEffectsMenu->actions().count(); + m_customEffectsMenu->clear(); + kDebug()<<"START RELOAD; CLR: "<<m_customEffectsMenu->actions().count(); initEffects::parseCustomEffectsFile(); - m_customEffectsMenu->clear(); const QStringList effects = customEffects.effectNames(); + kDebug()<<"NEW EFFS: "<<effects; QAction *action; if (effects.isEmpty()) m_customEffectsMenu->setEnabled(false); else m_customEffectsMenu->setEnabled(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 13:08:01
|
Revision: 3858 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3858&view=rev Author: j-b-m Date: 2009-08-29 13:07:53 +0000 (Sat, 29 Aug 2009) Log Message: ----------- Add icon for custom effects Modified Paths: -------------- trunk/kdenlive/src/effectslistwidget.cpp trunk/kdenlive/src/effectstackview.cpp Modified: trunk/kdenlive/src/effectslistwidget.cpp =================================================================== --- trunk/kdenlive/src/effectslistwidget.cpp 2009-08-29 13:07:15 UTC (rev 3857) +++ trunk/kdenlive/src/effectslistwidget.cpp 2009-08-29 13:07:53 UTC (rev 3858) @@ -62,6 +62,7 @@ QStringList effectInfo; KIcon videoIcon("kdenlive-show-video"); KIcon audioIcon("kdenlive-show-audio"); + KIcon customIcon("kdenlive-custom-effect"); int ct = MainWindow::videoEffects.count(); for (int ix = 0; ix < ct; ix ++) { effectInfo = MainWindow::videoEffects.effectIdInfo(ix); @@ -86,7 +87,7 @@ for (int ix = 0; ix < ct; ix ++) { effectInfo = MainWindow::customEffects.effectIdInfo(ix); if (!effectInfo.isEmpty()) { - item = new QListWidgetItem(effectInfo.takeFirst(), this); + item = new QListWidgetItem(customIcon, effectInfo.takeFirst(), this); item->setData(TypeRole, QString::number((int) EFFECT_CUSTOM)); item->setData(IdRole, effectInfo); } Modified: trunk/kdenlive/src/effectstackview.cpp =================================================================== --- trunk/kdenlive/src/effectstackview.cpp 2009-08-29 13:07:15 UTC (rev 3857) +++ trunk/kdenlive/src/effectstackview.cpp 2009-08-29 13:07:53 UTC (rev 3858) @@ -186,6 +186,7 @@ // Issue 238: Add icons for effect type in effectstack. KIcon videoIcon("kdenlive-show-video"); KIcon audioIcon("kdenlive-show-audio"); + KIcon customIcon("kdenlive-custom-effect"); QListWidgetItem* item; for (int i = 0; i < m_clipref->effectsCount(); i++) { @@ -207,7 +208,7 @@ if ("audio" == type) { item = new QListWidgetItem(audioIcon, i18n(namenode.toElement().text().toUtf8().data()), m_ui.effectlist); } else if ("custom" == type) { - item = new QListWidgetItem(i18n(namenode.toElement().text().toUtf8().data()), m_ui.effectlist); + item = new QListWidgetItem(customIcon, i18n(namenode.toElement().text().toUtf8().data()), m_ui.effectlist); } else { item = new QListWidgetItem(videoIcon, i18n(namenode.toElement().text().toUtf8().data()), m_ui.effectlist); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 13:07:22
|
Revision: 3857 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3857&view=rev Author: j-b-m Date: 2009-08-29 13:07:15 +0000 (Sat, 29 Aug 2009) Log Message: ----------- Icon for custom effect Added Paths: ----------- trunk/kdenlive/icons/hi16-action-kdenlive-custom-effect.png trunk/kdenlive/icons/ox16-action-kdenlive-custom-effect.png Added: trunk/kdenlive/icons/hi16-action-kdenlive-custom-effect.png =================================================================== (Binary files differ) Property changes on: trunk/kdenlive/icons/hi16-action-kdenlive-custom-effect.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/kdenlive/icons/ox16-action-kdenlive-custom-effect.png =================================================================== (Binary files differ) Property changes on: trunk/kdenlive/icons/ox16-action-kdenlive-custom-effect.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 12:52:22
|
Revision: 3856 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3856&view=rev Author: j-b-m Date: 2009-08-29 12:52:09 +0000 (Sat, 29 Aug 2009) Log Message: ----------- Fix display of effects in timeline clips Modified Paths: -------------- trunk/kdenlive/src/clipitem.cpp Modified: trunk/kdenlive/src/clipitem.cpp =================================================================== --- trunk/kdenlive/src/clipitem.cpp 2009-08-29 12:29:46 UTC (rev 3855) +++ trunk/kdenlive/src/clipitem.cpp 2009-08-29 12:52:09 UTC (rev 3856) @@ -1360,9 +1360,11 @@ m_effectNames = m_effectList.effectNames().join(" / "); if (fade > 0) m_startFade = fade; else if (fade < 0) m_endFade = -fade; + if (m_selectedEffect == -1) { setSelectedEffect(0); } + else if (m_selectedEffect == ix - 1) setSelectedEffect(m_selectedEffect); if (needRepaint) update(boundingRect()); /*if (animate) { flashClip(); @@ -1449,6 +1451,7 @@ } } m_effectNames = m_effectList.effectNames().join(" / "); + if (m_effectList.isEmpty() || m_selectedEffect + 1 == index.toInt()) { // Current effect was removed if (index.toInt() > m_effectList.count() - 1) { @@ -1456,7 +1459,12 @@ } else setSelectedEffect(index.toInt()); } if (needRepaint) update(boundingRect()); - if (!m_effectList.isEmpty()) flashClip(); + else { + QRectF r = boundingRect(); + r.setHeight(20); + update(r); + } + //if (!m_effectList.isEmpty()) flashClip(); } double ClipItem::speed() const This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 12:29:52
|
Revision: 3855 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3855&view=rev Author: j-b-m Date: 2009-08-29 12:29:46 +0000 (Sat, 29 Aug 2009) Log Message: ----------- update gain effect xml Modified Paths: -------------- trunk/kdenlive/effects/gain.xml Modified: trunk/kdenlive/effects/gain.xml =================================================================== --- trunk/kdenlive/effects/gain.xml 2009-08-29 01:11:51 UTC (rev 3854) +++ trunk/kdenlive/effects/gain.xml 2009-08-29 12:29:46 UTC (rev 3855) @@ -3,7 +3,7 @@ <name>Gain</name> <description>Adjust the audio volume without keyframes</description> <author>Dan Dennedy</author> - <parameter type="constant" name="gain" max="1000" min="0" factor="100" default="10"> - <name>Gain as Percentage</name> + <parameter type="constant" name="gain" max="1000" min="0" factor="100" default="100" suffix="%"> + <name>Gain</name> </parameter> </effect> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 01:11:59
|
Revision: 3854 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3854&view=rev Author: j-b-m Date: 2009-08-29 01:11:51 +0000 (Sat, 29 Aug 2009) Log Message: ----------- update for new frei0r vertigo effect Modified Paths: -------------- trunk/kdenlive/data/blacklisted_effects.txt Modified: trunk/kdenlive/data/blacklisted_effects.txt =================================================================== --- trunk/kdenlive/data/blacklisted_effects.txt 2009-08-29 01:11:17 UTC (rev 3853) +++ trunk/kdenlive/data/blacklisted_effects.txt 2009-08-29 01:11:51 UTC (rev 3854) @@ -19,3 +19,4 @@ frei0r.brightness frei0r.lenscorrection frei0r.saturat0r +frei0r.vertigo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 01:11:24
|
Revision: 3853 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3853&view=rev Author: j-b-m Date: 2009-08-29 01:11:17 +0000 (Sat, 29 Aug 2009) Log Message: ----------- xml info for new frei0r vertigo effect Modified Paths: -------------- trunk/kdenlive/effects/CMakeLists.txt Added Paths: ----------- trunk/kdenlive/effects/frei0r_vertigo.xml Modified: trunk/kdenlive/effects/CMakeLists.txt =================================================================== --- trunk/kdenlive/effects/CMakeLists.txt 2009-08-29 00:38:25 UTC (rev 3852) +++ trunk/kdenlive/effects/CMakeLists.txt 2009-08-29 01:11:17 UTC (rev 3853) @@ -29,6 +29,7 @@ obscure.xml rotation.xml sepia.xml +sox_balance.xml sox_bass.xml sox_gain.xml sox_phaser.xml @@ -53,6 +54,7 @@ frei0r_brightness.xml frei0r_lenscorrection.xml frei0r_saturat0r.xml +frei0r_vertigo.xml gain.xml fade_from_black.xml fade_to_black.xml Added: trunk/kdenlive/effects/frei0r_vertigo.xml =================================================================== --- trunk/kdenlive/effects/frei0r_vertigo.xml (rev 0) +++ trunk/kdenlive/effects/frei0r_vertigo.xml 2009-08-29 01:11:17 UTC (rev 3853) @@ -0,0 +1,15 @@ +<!DOCTYPE kpartgui> +<effect tag="frei0r.vertigo" id="frei0r.vertigo"> + <name>Vertigo</name> + <description>Alpha blending with zoomed and rotated images</description> + <author>Fukuchi Kentarou</author> + <parameter type="constant" name="Mode" default="3" min="0" max="10"> + <name>Mode</name> + </parameter> + <parameter type="constant" name="PhaseIncrement" default="2" min="0" max="10" factor="100"> + <name>Phase Increment</name> + </parameter> + <parameter type="constant" name="Zoomrate" default="101" min="50" max="500" factor="100"> + <name>Zoom Rate</name> + </parameter> +</effect> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 00:38:33
|
Revision: 3852 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3852&view=rev Author: j-b-m Date: 2009-08-29 00:38:25 +0000 (Sat, 29 Aug 2009) Log Message: ----------- improve keyframe grabbing in timeline Modified Paths: -------------- trunk/kdenlive/src/abstractclipitem.cpp trunk/kdenlive/src/abstractclipitem.h trunk/kdenlive/src/clipitem.cpp trunk/kdenlive/src/customtrackview.cpp Modified: trunk/kdenlive/src/abstractclipitem.cpp =================================================================== --- trunk/kdenlive/src/abstractclipitem.cpp 2009-08-29 00:09:52 UTC (rev 3851) +++ trunk/kdenlive/src/abstractclipitem.cpp 2009-08-29 00:38:25 UTC (rev 3852) @@ -245,9 +245,9 @@ } } -int AbstractClipItem::mouseOverKeyFrames(QPointF pos) +int AbstractClipItem::mouseOverKeyFrames(QPointF pos, double maxOffset) { - QRectF br = sceneBoundingRect(); + const QRectF br = sceneBoundingRect(); double maxw = br.width() / cropDuration().frames(m_fps); double maxh = br.height() / 100.0 * m_keyframeFactor; if (m_keyframes.count() > 1) { @@ -257,7 +257,7 @@ while (i != m_keyframes.constEnd()) { x1 = br.x() + maxw * (i.key() - cropStart().frames(m_fps)); y1 = br.bottom() - i.value() * maxh; - if (qAbs(pos.x() - x1) < 6 && qAbs(pos.y() - y1) < 6) { + if (qAbs(pos.x() - x1) < maxOffset && qAbs(pos.y() - y1) < 10) { setToolTip('[' + QString::number((GenTime(i.key(), m_fps) - cropStart()).seconds(), 'f', 2) + i18n("seconds") + ", " + QString::number(i.value(), 'f', 1) + "%]"); return i.key(); } else if (x1 > pos.x()) break; Modified: trunk/kdenlive/src/abstractclipitem.h =================================================================== --- trunk/kdenlive/src/abstractclipitem.h 2009-08-29 00:09:52 UTC (rev 3851) +++ trunk/kdenlive/src/abstractclipitem.h 2009-08-29 00:38:25 UTC (rev 3852) @@ -74,7 +74,7 @@ double m_fps; //QRect visibleRect(); void drawKeyFrames(QPainter *painter, QRectF exposedRect); - int mouseOverKeyFrames(QPointF pos); + int mouseOverKeyFrames(QPointF pos, double maxOffset); virtual void mousePressEvent(QGraphicsSceneMouseEvent * event); }; Modified: trunk/kdenlive/src/clipitem.cpp =================================================================== --- trunk/kdenlive/src/clipitem.cpp 2009-08-29 00:09:52 UTC (rev 3851) +++ trunk/kdenlive/src/clipitem.cpp 2009-08-29 00:38:25 UTC (rev 3852) @@ -848,14 +848,13 @@ OPERATIONTYPE ClipItem::operationMode(QPointF pos) { if (isItemLocked()) return NONE; - + const double scale = projectScene()->scale().x(); + double maximumOffset = 6 / scale; if (isSelected() || (parentItem() && parentItem()->isSelected())) { - m_editedKeyframe = mouseOverKeyFrames(pos); + m_editedKeyframe = mouseOverKeyFrames(pos, maximumOffset); if (m_editedKeyframe != -1) return KEYFRAME; } QRectF rect = sceneBoundingRect(); - const double scale = projectScene()->scale().x(); - double maximumOffset = 6 / scale; int addtransitionOffset = 10; // Don't allow add transition if track height is very small if (rect.height() < 30) addtransitionOffset = 0; Modified: trunk/kdenlive/src/customtrackview.cpp =================================================================== --- trunk/kdenlive/src/customtrackview.cpp 2009-08-29 00:09:52 UTC (rev 3851) +++ trunk/kdenlive/src/customtrackview.cpp 2009-08-29 00:38:25 UTC (rev 3852) @@ -3970,6 +3970,7 @@ m_animation = NULL; double verticalPos = mapToScene(QPoint(0, viewport()->height() / 2)).y(); setMatrix(matrix); + m_cursorLine->setLine(m_cursorLine->line().x1(), 0, m_cursorLine->line().x1(), m_tracksHeight * m_document->tracksCount() * verticalScale); int diff = sceneRect().width() - m_projectDuration; if (diff * matrix.m11() < 50) { if (matrix.m11() < 0.4) setSceneRect(0, 0, (m_projectDuration + 100 / matrix.m11()), sceneRect().height()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-29 00:09:59
|
Revision: 3851 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3851&view=rev Author: j-b-m Date: 2009-08-29 00:09:52 +0000 (Sat, 29 Aug 2009) Log Message: ----------- Several fixes for keyframes, fix bug in clip resize start undo and cleanup Modified Paths: -------------- trunk/kdenlive/src/abstractclipitem.cpp trunk/kdenlive/src/abstractclipitem.h trunk/kdenlive/src/clipitem.cpp trunk/kdenlive/src/clipitem.h trunk/kdenlive/src/customtrackview.cpp trunk/kdenlive/src/customtrackview.h trunk/kdenlive/src/editeffectcommand.cpp trunk/kdenlive/src/editeffectcommand.h trunk/kdenlive/src/editkeyframecommand.cpp trunk/kdenlive/src/effectslist.cpp trunk/kdenlive/src/effectslist.h trunk/kdenlive/src/effectstackedit.cpp trunk/kdenlive/src/effectstackedit.h trunk/kdenlive/src/effectstackview.cpp trunk/kdenlive/src/keyframeedit.cpp trunk/kdenlive/src/keyframeedit.h trunk/kdenlive/src/moveclipcommand.cpp trunk/kdenlive/src/moveclipcommand.h trunk/kdenlive/src/movetransitioncommand.cpp trunk/kdenlive/src/movetransitioncommand.h trunk/kdenlive/src/projectlist.cpp trunk/kdenlive/src/projectlist.h trunk/kdenlive/src/renderwidget.cpp trunk/kdenlive/src/renderwidget.h trunk/kdenlive/src/resizeclipcommand.cpp trunk/kdenlive/src/resizeclipcommand.h trunk/kdenlive/src/transition.cpp trunk/kdenlive/src/transitionsettings.cpp Modified: trunk/kdenlive/src/abstractclipitem.cpp =================================================================== --- trunk/kdenlive/src/abstractclipitem.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/abstractclipitem.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -142,7 +142,7 @@ }*/ } -void AbstractClipItem::resizeEnd(int posx, double speed, bool /*updateKeyFrames*/) +void AbstractClipItem::resizeEnd(int posx, double speed) { GenTime durationDiff = GenTime(posx, m_fps) - endPos(); if (durationDiff == GenTime()) return; @@ -294,7 +294,7 @@ if (!m_keyframes.contains(m_selectedKeyframe)) return; int newpos = (int) pos.frames(m_fps); int start = cropStart().frames(m_fps); - int end = (cropStart() + cropDuration()).frames(m_fps); + int end = (cropStart() + cropDuration()).frames(m_fps) - 1; newpos = qMax(newpos, start); newpos = qMin(newpos, end); if (value < -50 && m_selectedKeyframe != start && m_selectedKeyframe != end) { @@ -330,7 +330,7 @@ QRectF br = sceneBoundingRect(); double maxh = 100.0 / br.height() / m_keyframeFactor; int newval = (br.bottom() - value) * maxh; - kDebug() << "Rect: " << br << "/ SCENE: " << sceneBoundingRect() << ", VALUE: " << value << ", MAX: " << maxh << ", NEWVAL: " << newval; + //kDebug() << "Rect: " << br << "/ SCENE: " << sceneBoundingRect() << ", VALUE: " << value << ", MAX: " << maxh << ", NEWVAL: " << newval; int newpos = (int) pos.frames(m_fps) ; m_keyframes[newpos] = newval; m_selectedKeyframe = newpos; Modified: trunk/kdenlive/src/abstractclipitem.h =================================================================== --- trunk/kdenlive/src/abstractclipitem.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/abstractclipitem.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -55,7 +55,7 @@ virtual GenTime cropStart() const ; virtual GenTime cropDuration() const ; virtual void resizeStart(int posx, double speed = 1.0); - virtual void resizeEnd(int posx, double speed = 1.0, bool updateKeyFrames = true); + virtual void resizeEnd(int posx, double speed = 1.0); virtual double fps() const; virtual GenTime maxDuration() const; virtual void setCropStart(GenTime pos); Modified: trunk/kdenlive/src/clipitem.cpp =================================================================== --- trunk/kdenlive/src/clipitem.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/clipitem.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -305,7 +305,7 @@ void ClipItem::setKeyframes(const int ix, const QString keyframes) { - QDomElement effect = effectAt(ix); + QDomElement effect = getEffectAt(ix); if (effect.attribute("disabled") == "1") return; QDomNodeList params = effect.elementsByTagName("parameter"); for (int i = 0; i < params.count(); i++) { @@ -1074,7 +1074,6 @@ const int previous = cropStart().frames(m_fps); AbstractClipItem::resizeStart(posx, m_speed); if ((int) cropStart().frames(m_fps) != previous) { - checkEffectsKeyframesPos(previous, cropStart().frames(m_fps), true); if (m_hasThumbs && KdenliveSettings::videothumbnails()) { /*connect(m_clip->thumbProducer(), SIGNAL(thumbReady(int, QPixmap)), this, SLOT(slotThumbReady(int, QPixmap)));*/ m_startThumbTimer.start(150); @@ -1082,16 +1081,16 @@ } } -void ClipItem::resizeEnd(int posx, double /*speed*/, bool updateKeyFrames) +void ClipItem::resizeEnd(int posx, double /*speed*/) { const int max = (startPos() - cropStart() + maxDuration()).frames(m_fps); if (posx > max && maxDuration() != GenTime()) posx = max; if (posx == endPos().frames(m_fps)) return; //kDebug() << "// NEW POS: " << posx << ", OLD END: " << endPos().frames(m_fps); - const int previous = (cropStart() + cropDuration()).frames(m_fps); + const int previous = (int)(cropStart() + cropDuration()).frames(m_fps) - 1; AbstractClipItem::resizeEnd(posx, m_speed); - if ((int)(cropStart() + cropDuration()).frames(m_fps) != previous) { - if (updateKeyFrames) checkEffectsKeyframesPos(previous, (cropStart() + cropDuration()).frames(m_fps), false); + const int current = (int)(cropStart() + cropDuration()).frames(m_fps) - 1; + if (current != previous) { if (m_hasThumbs && KdenliveSettings::videothumbnails()) { /*connect(m_clip->thumbProducer(), SIGNAL(thumbReady(int, QPixmap)), this, SLOT(slotThumbReady(int, QPixmap)));*/ m_endThumbTimer.start(150); @@ -1100,8 +1099,9 @@ } -void ClipItem::checkEffectsKeyframesPos(const int previous, const int current, bool fromStart) +bool ClipItem::checkEffectsKeyframesPos(const int previous, const int current, bool fromStart) { + bool modified = false; for (int i = 0; i < m_effectList.count(); i++) { QDomElement effect = m_effectList.at(i); QDomNodeList params = effect.elementsByTagName("parameter"); @@ -1116,24 +1116,31 @@ foreach(const QString &str, keyframes) { pos = str.section(':', 0, 0).toInt(); val = str.section(':', 1, 1).toDouble(); - if (pos == previous) kfr[current] = val; - else { - if (fromStart && pos >= current) kfr[pos] = val; - else if (!fromStart && pos <= current) kfr[pos] = val; + if (pos == previous) { + kfr[current] = val; + modified = true; + } else { + if ((fromStart && pos >= current) || (!fromStart && pos <= current)) { + kfr[pos] = val; + modified = true; + } } } - QString newkfr; - QMap<int, double>::const_iterator k = kfr.constBegin(); - while (k != kfr.constEnd()) { - newkfr.append(QString::number(k.key()) + ':' + QString::number(k.value()) + ';'); - ++k; + if (modified) { + QString newkfr; + QMap<int, double>::const_iterator k = kfr.constBegin(); + while (k != kfr.constEnd()) { + newkfr.append(QString::number(k.key()) + ':' + QString::number(k.value()) + ';'); + ++k; + } + e.setAttribute("keyframes", newkfr); + break; } - e.setAttribute("keyframes", newkfr); - break; } } } - if (m_selectedEffect >= 0) setSelectedEffect(m_selectedEffect); + if (modified && m_selectedEffect >= 0) setSelectedEffect(m_selectedEffect); + return modified; } //virtual @@ -1248,8 +1255,7 @@ } //kDebug() << "CHange EFFECT AT: " << ix << ", CURR: " << m_effectList.at(ix).attribute("tag") << ", NEW: " << effect.attribute("tag"); effect.setAttribute("kdenlive_ix", ix + 1); - m_effectList.insert(ix, effect); - m_effectList.removeAt(ix + 1); + m_effectList.replace(ix, effect); m_effectNames = m_effectList.effectNames().join(" / "); QString id = effect.attribute("id"); if (id == "fadein" || id == "fadeout" || id == "fade_from_black" || id == "fade_to_black") Modified: trunk/kdenlive/src/clipitem.h =================================================================== --- trunk/kdenlive/src/clipitem.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/clipitem.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -48,7 +48,7 @@ QWidget *); virtual int type() const; void resizeStart(int posx, double speed = 1.0); - void resizeEnd(int posx, double speed = 1.0, bool updateKeyFrames = true); + void resizeEnd(int posx, double speed = 1.0); OPERATIONTYPE operationMode(QPointF pos); const QString clipProducer() const; int clipType() const; @@ -112,6 +112,8 @@ void setAudioOnly(bool force); bool isVideoOnly() const; bool isAudioOnly() const; + /** Called when clip start is resized, adjust keyframes values */ + bool checkEffectsKeyframesPos(const int previous, const int current, bool fromStart); protected: //virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event); @@ -153,8 +155,7 @@ QMap<int, QPixmap> m_audioThumbCachePic; bool m_audioThumbReady; double m_framePixelWidth; - /** Called when clip start is resized, adjust keyframes values */ - void checkEffectsKeyframesPos(const int previous, const int current, bool fromStart); + QPixmap m_videoPix; QPixmap m_audioPix; Modified: trunk/kdenlive/src/customtrackview.cpp =================================================================== --- trunk/kdenlive/src/customtrackview.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/customtrackview.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -1134,7 +1134,7 @@ ItemInfo startInfo = clipInfo; clipInfo.endPos = clipInfo.startPos + d.duration(); clipInfo.cropStart = d.cropStart(); - new ResizeClipCommand(this, startInfo, clipInfo, true, moveCommand); + new ResizeClipCommand(this, startInfo, clipInfo, true, false, moveCommand); } if (d.startPos() != clipInfo.startPos) { ItemInfo startInfo = clipInfo; @@ -1147,7 +1147,7 @@ ItemInfo startInfo = clipInfo; clipInfo.endPos = clipInfo.startPos + d.duration(); clipInfo.cropStart = d.cropStart(); - new ResizeClipCommand(this, startInfo, clipInfo, true, moveCommand); + new ResizeClipCommand(this, startInfo, clipInfo, true, false, moveCommand); } m_commandStack->push(moveCommand); } @@ -1167,7 +1167,7 @@ ClipItem *clip = getClipItemAt((int)pos.frames(m_document->fps()), track); if (clip) { clip->setKeyframes(index, keyframes); - updateEffect(m_document->tracksCount() - clip->track(), clip->startPos(), clip->effectAt(index), index); + updateEffect(m_document->tracksCount() - clip->track(), clip->startPos(), clip->effectAt(index), index, false); } else emit displayMessage(i18n("Cannot find clip with keyframe"), ErrorMessage); } @@ -1496,11 +1496,11 @@ setDocumentModified(); } -void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement effect, int ix, bool triggeredByUser) +void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement insertedEffect, int ix, bool triggeredByUser) { ClipItem *clip = getClipItemAt((int)pos.frames(m_document->fps()) + 1, m_document->tracksCount() - track); + QDomElement effect = insertedEffect.cloneNode().toElement(); if (clip) { - // Special case: speed effect if (effect.attribute("id") == "speed") { ItemInfo info = clip->info(); @@ -2709,8 +2709,40 @@ new MoveTransitionCommand(this, trInfo, newTrInfo, true, resizeCommand); } } - updateClipFade(static_cast <ClipItem *>(m_dragItem)); - new ResizeClipCommand(this, m_dragItemInfo, info, false, resizeCommand); + + ClipItem *clip = static_cast < ClipItem * >(m_dragItem); + updateClipFade(clip); + + // check keyframes + QDomDocument doc; + QDomElement root = doc.createElement("list"); + doc.appendChild(root); + QList <int> indexes; + for (int i = 0; i < clip->effectsCount(); i++) { + QDomElement effect = clip->effectAt(i); + if (EffectsList::hasKeyFrames(effect)) { + doc.appendChild(doc.importNode(effect, true)); + indexes.append(i); + } + } + + if (clip->checkEffectsKeyframesPos(m_dragItemInfo.cropStart.frames(m_document->fps()), clip->cropStart().frames(m_document->fps()), true)) { + // Keyframes were modified, updateClip + QDomNodeList effs = doc.elementsByTagName("effect"); + // Hack: + // Since we must always resize clip before updating the keyframes, we + // put a resize command before & after checking keyframes so that + // we are sure the resize is performed before whenever we do or undo the action + + new ResizeClipCommand(this, m_dragItemInfo, info, false, true, resizeCommand); + for (int i = 0; i < indexes.count(); i++) { + new EditEffectCommand(this, m_document->tracksCount() - clip->track(), clip->startPos(), effs.at(i).cloneNode().toElement(), clip->effectAt(indexes.at(i)), indexes.at(i), false, resizeCommand); + updateEffect(m_document->tracksCount() - clip->track(), clip->startPos(), clip->effectAt(indexes.at(i)), indexes.at(i)); + } + new ResizeClipCommand(this, m_dragItemInfo, info, false, true, resizeCommand); + emit clipItemSelected(clip); + } else new ResizeClipCommand(this, m_dragItemInfo, info, false, false, resizeCommand); + m_commandStack->push(resizeCommand); } else { m_dragItem->resizeStart((int) m_dragItemInfo.startPos.frames(m_document->fps())); @@ -2771,9 +2803,39 @@ } } - new ResizeClipCommand(this, m_dragItemInfo, info, false, resizeCommand); + // check keyframes + ClipItem *clip = static_cast < ClipItem * >(m_dragItem); + QDomDocument doc; + QDomElement root = doc.createElement("list"); + doc.appendChild(root); + QList <int> indexes; + for (int i = 0; i < clip->effectsCount(); i++) { + QDomElement effect = clip->effectAt(i); + if (EffectsList::hasKeyFrames(effect)) { + doc.appendChild(doc.importNode(effect, true)); + indexes.append(i); + } + } + + if (clip->checkEffectsKeyframesPos((m_dragItemInfo.cropStart + m_dragItemInfo.endPos - m_dragItemInfo.startPos).frames(m_document->fps()) - 1, (clip->cropStart() + clip->cropDuration()).frames(m_document->fps()) - 1, false)) { + // Keyframes were modified, updateClip + QDomNodeList effs = doc.elementsByTagName("effect"); + // Hack: + // Since we must always resize clip before updating the keyframes, we + // put a resize command before & after checking keyframes so that + // we are sure the resize is performed before whenever we do or undo the action + + new ResizeClipCommand(this, m_dragItemInfo, info, false, true, resizeCommand); + for (int i = 0; i < indexes.count(); i++) { + new EditEffectCommand(this, m_document->tracksCount() - clip->track(), clip->startPos(), effs.at(i).cloneNode().toElement(), clip->effectAt(indexes.at(i)), indexes.at(i), false, resizeCommand); + updateEffect(m_document->tracksCount() - clip->track(), clip->startPos(), clip->effectAt(indexes.at(i)), indexes.at(i)); + } + new ResizeClipCommand(this, m_dragItemInfo, info, false, true, resizeCommand); + emit clipItemSelected(clip); + } else new ResizeClipCommand(this, m_dragItemInfo, info, false, false, resizeCommand); + m_commandStack->push(resizeCommand); - updateClipFade(static_cast <ClipItem *>(m_dragItem)); + updateClipFade(clip); } else { m_dragItem->resizeEnd((int) m_dragItemInfo.endPos.frames(m_document->fps())); emit displayMessage(i18n("Error when resizing clip"), ErrorMessage); @@ -3287,7 +3349,7 @@ return clip; } -void CustomTrackView::moveClip(const ItemInfo start, const ItemInfo end) +void CustomTrackView::moveClip(const ItemInfo start, const ItemInfo end, bool refresh) { if (m_selectionGroup) resetSelectionGroup(false); ClipItem *item = getClipItemAt((int) start.startPos.frames(m_document->fps()), start.track); @@ -3330,7 +3392,7 @@ // undo last move and emit error message emit displayMessage(i18n("Cannot move clip to position %1", m_document->timecode().getTimecodeFromFrames(end.startPos.frames(m_document->fps()))), ErrorMessage); } - m_document->renderer()->doRefresh(); + if (refresh) m_document->renderer()->doRefresh(); //kDebug() << " // MOVED CLIP TO: " << end.startPos.frames(25) << ", ITEM START: " << item->startPos().frames(25); } @@ -3424,7 +3486,7 @@ } else kDebug() << "///////// WARNING; NO GROUP TO MOVE"; } -void CustomTrackView::moveTransition(const ItemInfo start, const ItemInfo end) +void CustomTrackView::moveTransition(const ItemInfo start, const ItemInfo end, bool m_refresh) { Transition *item = getTransitionItemAt(start.startPos, start.track); if (!item) { @@ -3466,17 +3528,15 @@ } emit transitionItemSelected(item, getPreviousVideoTrack(item->track()), p); } - m_document->renderer()->doRefresh(); + if (m_refresh) m_document->renderer()->doRefresh(); } -void CustomTrackView::resizeClip(const ItemInfo start, const ItemInfo end) +void CustomTrackView::resizeClip(const ItemInfo start, const ItemInfo end, bool dontWorry) { - bool resizeClipStart = true; - if (start.startPos == end.startPos) resizeClipStart = false; - /*if (resizeClipStart) offset = 1; - else offset = -1;*/ - ClipItem *item = getClipItemAt((int)(start.startPos.frames(m_document->fps())), start.track); + bool resizeClipStart = (start.startPos != end.startPos); + ClipItem *item = getClipItemAtStart(start.startPos, start.track); if (!item) { + if (dontWorry) return; emit displayMessage(i18n("Cannot move clip at time: %1 on track %2", m_document->timecode().getTimecodeFromFrames(start.startPos.frames(m_document->fps())), start.track), ErrorMessage); kDebug() << "---------------- ERROR, CANNOT find clip to resize at... "; // << startPos; return; @@ -3485,18 +3545,19 @@ // Item is part of a group, reset group resetSelectionGroup(); } + bool snap = KdenliveSettings::snaptopoints(); KdenliveSettings::setSnaptopoints(false); - if (resizeClipStart && start.startPos != end.startPos) { + if (resizeClipStart) { ItemInfo clipinfo = item->info(); clipinfo.track = m_document->tracksCount() - clipinfo.track; - bool success = m_document->renderer()->mltResizeClipStart(clipinfo, end.startPos - item->startPos()); + bool success = m_document->renderer()->mltResizeClipStart(clipinfo, end.startPos - clipinfo.startPos); if (success) { kDebug() << "RESIZE CLP STRAT TO:" << end.startPos.frames(m_document->fps()) << ", OLD ST: " << start.startPos.frames(25); item->resizeStart((int) end.startPos.frames(m_document->fps())); updateClipFade(item); } else emit displayMessage(i18n("Error when resizing clip"), ErrorMessage); - } else if (!resizeClipStart) { + } else { ItemInfo clipinfo = item->info(); clipinfo.track = m_document->tracksCount() - clipinfo.track; bool success = m_document->renderer()->mltResizeClipEnd(clipinfo, end.endPos - clipinfo.startPos); @@ -3505,7 +3566,7 @@ updateClipFade(item); } else emit displayMessage(i18n("Error when resizing clip"), ErrorMessage); } - if (end.cropStart != start.cropStart) { + if (!resizeClipStart && end.cropStart != start.cropStart) { kDebug() << "// RESIZE CROP, DIFF: " << (end.cropStart - start.cropStart).frames(25); ItemInfo clipinfo = end; clipinfo.track = m_document->tracksCount() - end.track; @@ -4267,7 +4328,7 @@ } if (clip->type() == TRANSITIONWIDGET) { m_commandStack->push(new MoveTransitionCommand(this, startInfo, endInfo, true)); - } else m_commandStack->push(new ResizeClipCommand(this, startInfo, endInfo, true)); + } else m_commandStack->push(new ResizeClipCommand(this, startInfo, endInfo, true, false)); } void CustomTrackView::setOutPoint() @@ -4299,7 +4360,7 @@ if (clip->type() == TRANSITIONWIDGET) { m_commandStack->push(new MoveTransitionCommand(this, startInfo, endInfo, true)); - } else m_commandStack->push(new ResizeClipCommand(this, startInfo, endInfo, true)); + } else m_commandStack->push(new ResizeClipCommand(this, startInfo, endInfo, true, false)); } void CustomTrackView::slotUpdateAllThumbs() Modified: trunk/kdenlive/src/customtrackview.h =================================================================== --- trunk/kdenlive/src/customtrackview.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/customtrackview.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -54,11 +54,11 @@ void changeTrack(int ix, TrackInfo type); int cursorPos(); void checkAutoScroll(); - void moveClip(const ItemInfo start, const ItemInfo end); + void moveClip(const ItemInfo start, const ItemInfo end, bool refresh); void moveGroup(QList <ItemInfo> startClip, QList <ItemInfo> startTransition, const GenTime offset, const int trackOffset, bool reverseMove = false); /** move transition, startPos = (old start, old end), endPos = (new start, new end) */ - void moveTransition(const ItemInfo start, const ItemInfo end); - void resizeClip(const ItemInfo start, const ItemInfo end); + void moveTransition(const ItemInfo start, const ItemInfo end, bool m_refresh); + void resizeClip(const ItemInfo start, const ItemInfo end, bool dontWorry = false); void addClip(QDomElement xml, const QString &clipId, ItemInfo info, EffectsList list = EffectsList(), bool refresh = true); void deleteClip(ItemInfo info, bool refresh = true); void slotDeleteClipMarker(const QString &comment, const QString &id, const GenTime &position); @@ -70,7 +70,7 @@ void slotAddGroupEffect(QDomElement effect, AbstractGroupItem *group); void addEffect(int track, GenTime pos, QDomElement effect); void deleteEffect(int track, GenTime pos, QDomElement effect); - void updateEffect(int track, GenTime pos, QDomElement effect, int ix, bool triggeredByUser = true); + void updateEffect(int track, GenTime pos, QDomElement insertedEffect, int ix, bool triggeredByUser = true); void moveEffect(int track, GenTime pos, int oldPos, int newPos); void addTransition(ItemInfo transitionInfo, int endTrack, QDomElement params, bool refresh); void deleteTransition(ItemInfo transitionInfo, int endTrack, QDomElement params, bool refresh); Modified: trunk/kdenlive/src/editeffectcommand.cpp =================================================================== --- trunk/kdenlive/src/editeffectcommand.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/editeffectcommand.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -23,8 +23,8 @@ #include <KLocale> -EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, int stackPos, bool doIt) : - QUndoCommand(), +EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, int stackPos, bool doIt, QUndoCommand *parent) : + QUndoCommand(parent), m_view(view), m_track(track), m_oldeffect(oldeffect), @@ -59,13 +59,11 @@ // virtual void EditEffectCommand::undo() { - //kDebug() << "---- undoing action"; m_view->updateEffect(m_track, m_pos, m_oldeffect, m_stackPos, false); } // virtual void EditEffectCommand::redo() { - //kDebug() << "---- redoing action"; m_view->updateEffect(m_track, m_pos, m_effect, m_stackPos, m_doIt); m_doIt = false; } Modified: trunk/kdenlive/src/editeffectcommand.h =================================================================== --- trunk/kdenlive/src/editeffectcommand.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/editeffectcommand.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -31,7 +31,7 @@ class EditEffectCommand : public QUndoCommand { public: - EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, int stackPos, bool doIt); + EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, int stackPos, bool doIt, QUndoCommand *parent = 0); virtual int id() const; virtual bool mergeWith(const QUndoCommand * command); Modified: trunk/kdenlive/src/editkeyframecommand.cpp =================================================================== --- trunk/kdenlive/src/editkeyframecommand.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/editkeyframecommand.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -44,6 +44,7 @@ void EditKeyFrameCommand::undo() { m_view->editKeyFrame(m_pos, m_track, m_index, m_oldkfr); + m_doIt = true; } // virtual void EditKeyFrameCommand::redo() Modified: trunk/kdenlive/src/effectslist.cpp =================================================================== --- trunk/kdenlive/src/effectslist.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/effectslist.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -221,7 +221,14 @@ void EffectsList::insert(int ix, QDomElement effect) { QDomNodeList effects = m_baseElement.childNodes(); - if (ix >= effects.count()) m_baseElement.appendChild(effect); - else m_baseElement.insertBefore(effect, effects.at(ix)); + if (ix >= effects.count()) m_baseElement.appendChild(importNode(effect, true)); + else m_baseElement.insertBefore(importNode(effect, true), effects.at(ix)); } +void EffectsList::replace(int ix, QDomElement effect) +{ + QDomNodeList effects = m_baseElement.childNodes(); + if (ix < effects.count()) m_baseElement.removeChild(effects.at(ix)); + if (ix == effects.count()) m_baseElement.appendChild(importNode(effect, true)); + else m_baseElement.insertBefore(importNode(effect, true), effects.at(ix)); +} Modified: trunk/kdenlive/src/effectslist.h =================================================================== --- trunk/kdenlive/src/effectslist.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/effectslist.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -49,6 +49,7 @@ void removeAt(int ix); QDomElement item(int ix); void insert(int ix, QDomElement effect); + void replace(int ix, QDomElement effect); static bool hasKeyFrames(QDomElement effect); static void setParameter(QDomElement effect, const QString &name, const QString &value); static QString parameter(QDomElement effect, const QString &name); Modified: trunk/kdenlive/src/effectstackedit.cpp =================================================================== --- trunk/kdenlive/src/effectstackedit.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/effectstackedit.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -65,26 +65,19 @@ QMap<QString, QImage> EffectStackEdit::iconCache; EffectStackEdit::EffectStackEdit(QWidget *parent) : - QObject(parent), + QScrollArea(parent), m_in(0), m_out(0), m_frameSize(QPoint()) { - QVBoxLayout *vbox1 = new QVBoxLayout(parent); - vbox1->setContentsMargins(0, 0, 0, 0); - vbox1->setSpacing(0); + m_baseWidget = new QWidget(this); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + setFrameStyle(QFrame::NoFrame); + setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding)); - QScrollArea *area = new QScrollArea; - m_baseWidget = new QWidget(parent); - area->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - area->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); - area->setFrameStyle(QFrame::NoFrame); - parent->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); - area->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding)); - - vbox1->addWidget(area); - area->setWidget(m_baseWidget); - area->setWidgetResizable(true); + setWidget(m_baseWidget); + setWidgetResizable(true); m_vbox = new QVBoxLayout(m_baseWidget); m_vbox->setContentsMargins(0, 0, 0, 0); m_vbox->setSpacing(0); @@ -241,7 +234,7 @@ } else if (type == "keyframe") { //Â keyframe editor widget kDebug() << "min: " << m_in << ", MAX: " << m_out; - KeyframeEdit *geo = new KeyframeEdit(pa, m_out - m_in, pa.attribute("min").toInt(), pa.attribute("max").toInt(), m_timecode); + KeyframeEdit *geo = new KeyframeEdit(pa, m_out - m_in - 1, pa.attribute("min").toInt(), pa.attribute("max").toInt(), m_timecode); //geo->setupParam(100, pa.attribute("min").toInt(), pa.attribute("max").toInt(), pa.attribute("keyframes")); //connect(geo, SIGNAL(seekToPos(int)), this, SLOT(slotSeekToPos(int))); //geo->setupParam(pa, minFrame, maxFrame); @@ -538,8 +531,9 @@ //qDeleteAll(m_uiItems); QLayoutItem *child; while ((child = m_vbox->takeAt(0)) != 0) { - if (child->widget()) delete child->widget(); + QWidget *wid = child->widget(); delete child; + if (wid) delete wid; } blockSignals(false); } Modified: trunk/kdenlive/src/effectstackedit.h =================================================================== --- trunk/kdenlive/src/effectstackedit.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/effectstackedit.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -27,6 +27,7 @@ #include <QVBoxLayout> #include <QList> #include <QMap> +#include <QScrollArea> enum WIPE_DIRECTON { UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3, CENTER = 4 }; @@ -39,7 +40,7 @@ class QFrame; -class EffectStackEdit : public QObject +class EffectStackEdit : public QScrollArea { Q_OBJECT public: Modified: trunk/kdenlive/src/effectstackview.cpp =================================================================== --- trunk/kdenlive/src/effectstackview.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/effectstackview.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -38,7 +38,12 @@ QWidget(parent) { m_ui.setupUi(this); + QVBoxLayout *vbox1 = new QVBoxLayout(m_ui.frame); m_effectedit = new EffectStackEdit(m_ui.frame); + vbox1->setContentsMargins(0, 0, 0, 0); + vbox1->setSpacing(0); + vbox1->addWidget(m_effectedit); + m_ui.frame->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); //m_ui.effectlist->horizontalHeader()->setVisible(false); //m_ui.effectlist->verticalHeader()->setVisible(false); m_clipref = NULL; @@ -145,6 +150,7 @@ double factor = c->baseClip()->getProperty("aspect_ratio").toDouble(); QPoint p((int)(size.section('x', 0, 0).toInt() * factor + 0.5), size.section('x', 1, 1).toInt()); m_effectedit->setFrameSize(p); + m_effectedit->setFrameSize(p); } else ix = 0; } if (m_clipref == NULL) { Modified: trunk/kdenlive/src/keyframeedit.cpp =================================================================== --- trunk/kdenlive/src/keyframeedit.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/keyframeedit.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -33,62 +33,70 @@ m_timecode(tc), m_previousPos(0) { - m_ui.setupUi(this); - m_ui.keyframe_list->setFont(KGlobalSettings::generalFont()); - m_ui.keyframe_list->setHeaderLabels(QStringList() << i18n("Position") << i18n("Value")); + setupUi(this); + keyframe_list->setFont(KGlobalSettings::generalFont()); + keyframe_list->setHeaderLabels(QStringList() << i18n("Position") << i18n("Value")); //setResizeMode(1, QHeaderView::Interactive); - m_ui.button_add->setIcon(KIcon("document-new")); - m_ui.button_delete->setIcon(KIcon("edit-delete")); - connect(m_ui.keyframe_list, SIGNAL(itemSelectionChanged()/*itemClicked(QTreeWidgetItem *, int)*/), this, SLOT(slotAdjustKeyframeInfo())); + button_add->setIcon(KIcon("document-new")); + button_delete->setIcon(KIcon("edit-delete")); + connect(keyframe_list, SIGNAL(itemSelectionChanged()/*itemClicked(QTreeWidgetItem *, int)*/), this, SLOT(slotAdjustKeyframeInfo())); setupParam(); - m_ui.keyframe_list->header()->resizeSections(QHeaderView::ResizeToContents); - connect(m_ui.button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteKeyframe())); - connect(m_ui.button_add, SIGNAL(clicked()), this, SLOT(slotAddKeyframe())); - connect(m_ui.keyframe_list, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotGenerateParams(QTreeWidgetItem *, int))); - connect(m_ui.keyframe_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(slotSaveCurrentParam(QTreeWidgetItem *, int))); - connect(m_ui.keyframe_pos, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframeValue(int))); - m_ui.keyframe_pos->setPageStep(1); - m_ui.keyframe_list->setItemDelegate(new KeyItemDelegate(minVal, maxVal)); + keyframe_list->header()->resizeSections(QHeaderView::ResizeToContents); + connect(button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteKeyframe())); + connect(button_add, SIGNAL(clicked()), this, SLOT(slotAddKeyframe())); + connect(keyframe_list, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotGenerateParams(QTreeWidgetItem *, int))); + connect(keyframe_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(slotSaveCurrentParam(QTreeWidgetItem *, int))); + connect(keyframe_pos, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframeValue(int))); + keyframe_pos->setPageStep(1); + m_delegate = new KeyItemDelegate(minVal, maxVal); + keyframe_list->setItemDelegate(m_delegate); } +KeyframeEdit::~KeyframeEdit() +{ + keyframe_list->blockSignals(true); + keyframe_list->clear(); + delete m_delegate; +} + void KeyframeEdit::setupParam(QDomElement e) { if (!e.isNull()) m_param = e; - m_ui.keyframe_list->clear(); + keyframe_list->clear(); QStringList frames = m_param.attribute("keyframes").split(";", QString::SkipEmptyParts); for (int i = 0; i < frames.count(); i++) { QString framePos = m_timecode.getTimecodeFromFrames(frames.at(i).section(':', 0, 0).toInt()); QTreeWidgetItem *item = new QTreeWidgetItem(QStringList() << framePos << frames.at(i).section(':', 1, 1)); item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled); - m_ui.keyframe_list->addTopLevelItem(item); + keyframe_list->addTopLevelItem(item); } - QTreeWidgetItem *first = m_ui.keyframe_list->topLevelItem(0); - if (first) m_ui.keyframe_list->setCurrentItem(first); + QTreeWidgetItem *first = keyframe_list->topLevelItem(0); + if (first) keyframe_list->setCurrentItem(first); slotAdjustKeyframeInfo(); - m_ui.button_delete->setEnabled(m_ui.keyframe_list->topLevelItemCount() > 2); + button_delete->setEnabled(keyframe_list->topLevelItemCount() > 2); } void KeyframeEdit::slotDeleteKeyframe() { - if (m_ui.keyframe_list->topLevelItemCount() < 3) return; - QTreeWidgetItem *item = m_ui.keyframe_list->currentItem(); + if (keyframe_list->topLevelItemCount() < 3) return; + QTreeWidgetItem *item = keyframe_list->currentItem(); if (item) { delete item; slotGenerateParams(); } - m_ui.button_delete->setEnabled(m_ui.keyframe_list->topLevelItemCount() > 2); + button_delete->setEnabled(keyframe_list->topLevelItemCount() > 2); } void KeyframeEdit::slotAddKeyframe() { - m_ui.keyframe_list->blockSignals(true); + keyframe_list->blockSignals(true); int pos2; - QTreeWidgetItem *item = m_ui.keyframe_list->currentItem(); + QTreeWidgetItem *item = keyframe_list->currentItem(); if (item == NULL) return; - int ix = m_ui.keyframe_list->indexOfTopLevelItem(item); + int ix = keyframe_list->indexOfTopLevelItem(item); int pos1 = m_timecode.getFrameCount(item->text(0)); - QTreeWidgetItem *below = m_ui.keyframe_list->topLevelItem(ix + 1); - if (below == NULL) below = m_ui.keyframe_list->topLevelItem(ix - 1); + QTreeWidgetItem *below = keyframe_list->topLevelItem(ix + 1); + if (below == NULL) below = keyframe_list->topLevelItem(ix - 1); if (below == NULL) { if (pos1 == 0) pos2 = m_max; else pos2 = 0; @@ -100,11 +108,11 @@ if (result > pos1) ix++; QTreeWidgetItem *newItem = new QTreeWidgetItem(QStringList() << m_timecode.getTimecodeFromFrames(result) << item->text(1)); newItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled); - m_ui.keyframe_list->insertTopLevelItem(ix, newItem); - m_ui.keyframe_list->setCurrentItem(newItem); + keyframe_list->insertTopLevelItem(ix, newItem); + keyframe_list->setCurrentItem(newItem); slotAdjustKeyframeInfo(); - m_ui.keyframe_list->blockSignals(false); - m_ui.button_delete->setEnabled(m_ui.keyframe_list->topLevelItemCount() > 2); + keyframe_list->blockSignals(false); + button_delete->setEnabled(keyframe_list->topLevelItemCount() > 2); slotGenerateParams(); } @@ -122,7 +130,7 @@ pos = m_max; val = m_timecode.getTimecodeFromFrames(pos); } - QList<QTreeWidgetItem *> duplicates = m_ui.keyframe_list->findItems(val, Qt::MatchExactly, 0); + QList<QTreeWidgetItem *> duplicates = keyframe_list->findItems(val, Qt::MatchExactly, 0); duplicates.removeAll(item); if (!duplicates.isEmpty()) { // Trying to insert a keyframe at existing value, revert it @@ -136,8 +144,8 @@ } } QString keyframes; - for (int i = 0; i < m_ui.keyframe_list->topLevelItemCount(); i++) { - QTreeWidgetItem *item = m_ui.keyframe_list->topLevelItem(i); + for (int i = 0; i < keyframe_list->topLevelItemCount(); i++) { + QTreeWidgetItem *item = keyframe_list->topLevelItem(i); keyframes.append(QString::number(m_timecode.getFrameCount(item->text(0))) + ':' + item->text(1) + ';'); } m_param.setAttribute("keyframes", keyframes); @@ -146,23 +154,23 @@ void KeyframeEdit::slotAdjustKeyframeInfo() { - QTreeWidgetItem *item = m_ui.keyframe_list->currentItem(); + QTreeWidgetItem *item = keyframe_list->currentItem(); if (!item) return; int min = 0; int max = m_max; - QTreeWidgetItem *above = m_ui.keyframe_list->itemAbove(item); - QTreeWidgetItem *below = m_ui.keyframe_list->itemBelow(item); + QTreeWidgetItem *above = keyframe_list->itemAbove(item); + QTreeWidgetItem *below = keyframe_list->itemBelow(item); if (above) min = m_timecode.getFrameCount(above->text(0)) + 1; if (below) max = m_timecode.getFrameCount(below->text(0)) - 1; - m_ui.keyframe_pos->blockSignals(true); - m_ui.keyframe_pos->setRange(min, max); - m_ui.keyframe_pos->setValue(m_timecode.getFrameCount(item->text(0))); - m_ui.keyframe_pos->blockSignals(false); + keyframe_pos->blockSignals(true); + keyframe_pos->setRange(min, max); + keyframe_pos->setValue(m_timecode.getFrameCount(item->text(0))); + keyframe_pos->blockSignals(false); } void KeyframeEdit::slotAdjustKeyframeValue(int value) { - QTreeWidgetItem *item = m_ui.keyframe_list->currentItem(); + QTreeWidgetItem *item = keyframe_list->currentItem(); item->setText(0, m_timecode.getTimecodeFromFrames(value)); } Modified: trunk/kdenlive/src/keyframeedit.h =================================================================== --- trunk/kdenlive/src/keyframeedit.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/keyframeedit.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -71,21 +71,22 @@ int m_max; }; -class KeyframeEdit : public QWidget +class KeyframeEdit : public QWidget, public Ui::KeyframeEditor_UI { Q_OBJECT public: explicit KeyframeEdit(QDomElement e, int maxFrame, int minVal, int maxVal, Timecode tc, QWidget* parent = 0); + virtual ~KeyframeEdit(); void setupParam(QDomElement e = QDomElement()); private: - Ui::KeyframeEditor_UI m_ui; QDomElement m_param; int m_max; int m_minVal; int m_maxVal; Timecode m_timecode; int m_previousPos; + KeyItemDelegate *m_delegate; public slots: Modified: trunk/kdenlive/src/moveclipcommand.cpp =================================================================== --- trunk/kdenlive/src/moveclipcommand.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/moveclipcommand.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -31,6 +31,10 @@ m_doIt(doIt) { setText(i18n("Move clip")); + if (parent) { + // command has a parent, so there are several operations ongoing, do not refresh monitor + m_refresh = false; + } else m_refresh = true; } @@ -39,14 +43,14 @@ { // kDebug()<<"---- undoing action"; m_doIt = true; - m_view->moveClip(m_endPos, m_startPos); + m_view->moveClip(m_endPos, m_startPos, m_refresh); } // virtual void MoveClipCommand::redo() { //kDebug() << "---- redoing action"; if (m_doIt) - m_view->moveClip(m_startPos, m_endPos); + m_view->moveClip(m_startPos, m_endPos, m_refresh); m_doIt = true; } Modified: trunk/kdenlive/src/moveclipcommand.h =================================================================== --- trunk/kdenlive/src/moveclipcommand.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/moveclipcommand.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -39,6 +39,7 @@ const ItemInfo m_startPos; const ItemInfo m_endPos; bool m_doIt; + bool m_refresh; }; #endif Modified: trunk/kdenlive/src/movetransitioncommand.cpp =================================================================== --- trunk/kdenlive/src/movetransitioncommand.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/movetransitioncommand.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -28,6 +28,10 @@ m_doIt(doIt) { setText(i18n("Move transition")); + if (parent) { + // command has a parent, so there are several operations ongoing, do not refresh monitor + m_refresh = false; + } else m_refresh = true; } @@ -36,13 +40,13 @@ { // kDebug()<<"---- undoing action"; m_doIt = true; - m_view->moveTransition(m_endPos, m_startPos); + m_view->moveTransition(m_endPos, m_startPos, m_refresh); } // virtual void MoveTransitionCommand::redo() { //kDebug() << "---- redoing action"; - if (m_doIt) m_view->moveTransition(m_startPos, m_endPos); + if (m_doIt) m_view->moveTransition(m_startPos, m_endPos, m_refresh); m_doIt = true; } Modified: trunk/kdenlive/src/movetransitioncommand.h =================================================================== --- trunk/kdenlive/src/movetransitioncommand.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/movetransitioncommand.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -36,6 +36,7 @@ ItemInfo m_startPos; ItemInfo m_endPos; bool m_doIt; + bool m_refresh; }; #endif Modified: trunk/kdenlive/src/projectlist.cpp =================================================================== --- trunk/kdenlive/src/projectlist.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/projectlist.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -103,8 +103,8 @@ connect(m_listView, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotItemEdited(QTreeWidgetItem *, int))); connect(m_listView, SIGNAL(showProperties(DocClipBase *)), this, SIGNAL(showClipProperties(DocClipBase *))); - ItemDelegate *listViewDelegate = new ItemDelegate(m_listView); - m_listView->setItemDelegate(listViewDelegate); + m_listViewDelegate = new ItemDelegate(m_listView); + m_listView->setItemDelegate(m_listViewDelegate); if (KdenliveSettings::activate_nepomuk()) { Nepomuk::ResourceManager::instance()->init(); @@ -119,6 +119,9 @@ { delete m_menu; delete m_toolbar; + m_listView->blockSignals(true); + m_listView->clear(); + delete m_listViewDelegate; } void ProjectList::setupMenu(QMenu *addMenu, QAction *defaultAction) Modified: trunk/kdenlive/src/projectlist.h =================================================================== --- trunk/kdenlive/src/projectlist.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/projectlist.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -172,6 +172,7 @@ QMenu *m_transcodeAction; KdenliveDoc *m_doc; ProjectItem *m_selectedItem; + ItemDelegate *m_listViewDelegate; bool m_refreshed; QToolButton *m_addButton; QMap <QString, QDomElement> m_infoQueue; Modified: trunk/kdenlive/src/renderwidget.cpp =================================================================== --- trunk/kdenlive/src/renderwidget.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/renderwidget.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -156,7 +156,8 @@ m_view.out_file->setMode(KFile::File); m_view.running_jobs->setHeaderLabels(QStringList() << QString() << i18n("File") << i18n("Progress")); - m_view.running_jobs->setItemDelegate(new RenderViewDelegate(this)); + m_jobsDelegate = new RenderViewDelegate(this); + m_view.running_jobs->setItemDelegate(m_jobsDelegate); QHeaderView *header = m_view.running_jobs->header(); QFontMetrics fm = fontMetrics(); @@ -170,7 +171,8 @@ m_view.scripts_list->setHeaderLabels(QStringList() << QString() << i18n("Script Files")); - m_view.scripts_list->setItemDelegate(new RenderViewDelegate(this)); + m_scriptsDelegate = new RenderViewDelegate(this); + m_view.scripts_list->setItemDelegate(m_scriptsDelegate); header = m_view.scripts_list->header(); header->setResizeMode(0, QHeaderView::Fixed); header->resizeSection(0, 30); @@ -186,6 +188,16 @@ focusFirstVisibleItem(); } +RenderWidget::~RenderWidget() +{ + m_view.running_jobs->blockSignals(true); + m_view.scripts_list->blockSignals(true); + m_view.running_jobs->clear(); + m_view.scripts_list->clear(); + delete m_jobsDelegate; + delete m_scriptsDelegate; +} + void RenderWidget::slotEditItem(QListWidgetItem *item) { QString edit = item->data(EditableRole).toString(); Modified: trunk/kdenlive/src/renderwidget.h =================================================================== --- trunk/kdenlive/src/renderwidget.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/renderwidget.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -100,6 +100,7 @@ public: explicit RenderWidget(const QString &projectfolder, QWidget * parent = 0); + virtual ~RenderWidget(); void setGuides(QDomElement guidesxml, double duration); void focusFirstVisibleItem(); void setProfile(MltVideoProfile profile); @@ -144,6 +145,8 @@ Ui::RenderWidget_UI m_view; MltVideoProfile m_profile; QString m_projectFolder; + RenderViewDelegate *m_scriptsDelegate; + RenderViewDelegate *m_jobsDelegate; bool m_blockProcessing; QString m_renderer; void parseProfiles(QString meta = QString(), QString group = QString(), QString profile = QString()); Modified: trunk/kdenlive/src/resizeclipcommand.cpp =================================================================== --- trunk/kdenlive/src/resizeclipcommand.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/resizeclipcommand.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -23,12 +23,13 @@ #include <KLocale> -ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : +ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, bool dontWorry, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), m_endPos(end), - m_doIt(doIt) + m_doIt(doIt), + m_dontWorry(dontWorry) { setText(i18n("Resize clip")); } @@ -38,13 +39,13 @@ { // kDebug()<<"---- undoing action"; m_doIt = true; - if (m_doIt) m_view->resizeClip(m_endPos, m_startPos); + if (m_doIt) m_view->resizeClip(m_endPos, m_startPos, m_dontWorry); } // virtual void ResizeClipCommand::redo() { kDebug() << "---- redoing action"; - if (m_doIt) m_view->resizeClip(m_startPos, m_endPos); + if (m_doIt) m_view->resizeClip(m_startPos, m_endPos, m_dontWorry); m_doIt = true; } Modified: trunk/kdenlive/src/resizeclipcommand.h =================================================================== --- trunk/kdenlive/src/resizeclipcommand.h 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/resizeclipcommand.h 2009-08-29 00:09:52 UTC (rev 3851) @@ -34,7 +34,7 @@ class ResizeClipCommand : public QUndoCommand { public: - ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent = 0); + ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, bool dontWorry, QUndoCommand * parent = 0); virtual void undo(); virtual void redo(); @@ -43,6 +43,7 @@ ItemInfo m_startPos; ItemInfo m_endPos; bool m_doIt; + bool m_dontWorry; }; #endif Modified: trunk/kdenlive/src/transition.cpp =================================================================== --- trunk/kdenlive/src/transition.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/transition.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -147,7 +147,6 @@ const QStyleOptionGraphicsItem *option, QWidget */*widget*/) { - const double scale = option->matrix.m11(); const QRectF exposed = option->exposedRect; painter->setClipRect(exposed); const QRectF br = rect(); Modified: trunk/kdenlive/src/transitionsettings.cpp =================================================================== --- trunk/kdenlive/src/transitionsettings.cpp 2009-08-28 17:57:15 UTC (rev 3850) +++ trunk/kdenlive/src/transitionsettings.cpp 2009-08-29 00:09:52 UTC (rev 3851) @@ -33,7 +33,12 @@ m_autoTrackTransition(0) { m_ui.setupUi(this); + QVBoxLayout *vbox1 = new QVBoxLayout(m_ui.frame); m_effectEdit = new EffectStackEdit(m_ui.frame); + vbox1->setContentsMargins(0, 0, 0, 0); + vbox1->setSpacing(0); + vbox1->addWidget(m_effectEdit); + m_ui.frame->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); connect(m_effectEdit, SIGNAL(seekTimeline(int)), this, SIGNAL(seekTimeline(int))); setEnabled(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-28 17:57:21
|
Revision: 3850 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3850&view=rev Author: j-b-m Date: 2009-08-28 17:57:15 +0000 (Fri, 28 Aug 2009) Log Message: ----------- Fix long standing issue where clips could always be inserted at point 0, 0 in timeline Modified Paths: -------------- trunk/kdenlive/src/customtrackview.cpp trunk/kdenlive/src/customtrackview.h Modified: trunk/kdenlive/src/customtrackview.cpp =================================================================== --- trunk/kdenlive/src/customtrackview.cpp 2009-08-28 16:23:28 UTC (rev 3849) +++ trunk/kdenlive/src/customtrackview.cpp 2009-08-28 17:57:15 UTC (rev 3850) @@ -1198,108 +1198,109 @@ emit activateDocumentMonitor(); } -void CustomTrackView::dragEnterEvent(QDragEnterEvent * event) +bool CustomTrackView::insertDropClips(const QMimeData *data, const QPoint pos) { - if (event->mimeData()->hasFormat("kdenlive/clip")) { + if (data->hasFormat("kdenlive/clip")) { m_clipDrag = true; resetSelectionGroup(); - QStringList list = QString(event->mimeData()->data("kdenlive/clip")).split(';'); - m_selectionGroup = new AbstractGroupItem(m_document->fps()); - QPoint pos; + QStringList list = QString(data->data("kdenlive/clip")).split(';'); DocClipBase *clip = m_document->getBaseClip(list.at(0)); if (clip == NULL) { kDebug() << " WARNING))))))))) CLIP NOT FOUND : " << list.at(0); - return; + return false; } + const QPointF framePos = mapToScene(pos); ItemInfo info; info.startPos = GenTime(); info.cropStart = GenTime(list.at(1).toInt(), m_document->fps()); info.endPos = GenTime(list.at(2).toInt() - list.at(1).toInt(), m_document->fps()); - info.track = (int)(1 / m_tracksHeight); + info.track = 0; + + // Check if clip can be inserted at that position + ItemInfo pasteInfo = info; + pasteInfo.startPos = GenTime((int)(framePos.x() + 0.5), m_document->fps()); + pasteInfo.track = (int)(framePos.y() / m_tracksHeight); + if (!canBePastedTo(pasteInfo, AVWIDGET)) { + return true; + } + m_selectionGroup = new AbstractGroupItem(m_document->fps()); ClipItem *item = new ClipItem(clip, info, m_document->fps(), 1.0, 1); m_selectionGroup->addToGroup(item); item->setFlags(QGraphicsItem::ItemIsSelectable); - //TODO: check if we do not overlap another clip when first dropping in timeline - // if (insertPossible(m_selectionGroup, event->pos())) + QList <GenTime> offsetList; offsetList.append(info.endPos); updateSnapPoints(NULL, offsetList); + m_selectionGroup->setPos(framePos); scene()->addItem(m_selectionGroup); - event->acceptProposedAction(); - } else if (event->mimeData()->hasFormat("kdenlive/producerslist")) { + return true; + } else if (data->hasFormat("kdenlive/producerslist")) { m_clipDrag = true; - QStringList ids = QString(event->mimeData()->data("kdenlive/producerslist")).split(';'); + QStringList ids = QString(data->data("kdenlive/producerslist")).split(';'); m_scene->clearSelection(); resetSelectionGroup(false); - m_selectionGroup = new AbstractGroupItem(m_document->fps()); - QPoint pos; - GenTime start; QList <GenTime> offsetList; + QList <ItemInfo> infoList; + const QPointF framePos = mapToScene(pos); + GenTime start = GenTime((int)(framePos.x() + 0.5), m_document->fps()); + int track = (int)(framePos.y() / m_tracksHeight); + + // Check if clips can be inserted at that position for (int i = 0; i < ids.size(); ++i) { DocClipBase *clip = m_document->getBaseClip(ids.at(i)); if (clip == NULL) { kDebug() << " WARNING))))))))) CLIP NOT FOUND : " << ids.at(i); - return; + return false; } ItemInfo info; info.startPos = start; info.endPos = info.startPos + clip->duration(); - info.track = (int)(1 / m_tracksHeight); - ClipItem *item = new ClipItem(clip, info, m_document->fps(), 1.0, 1, false); + info.track = track; + infoList.append(info); start += clip->duration(); + } + if (!canBePastedTo(infoList, AVWIDGET)) { + return true; + } + m_selectionGroup = new AbstractGroupItem(m_document->fps()); + start = GenTime(); + for (int i = 0; i < ids.size(); ++i) { + DocClipBase *clip = m_document->getBaseClip(ids.at(i)); + ItemInfo info; + info.startPos = start; + info.endPos = info.startPos + clip->duration(); + info.track = 0; + start += clip->duration(); offsetList.append(start); + ClipItem *item = new ClipItem(clip, info, m_document->fps(), 1.0, 1, false); + item->setFlags(QGraphicsItem::ItemIsSelectable); m_selectionGroup->addToGroup(item); - item->setFlags(QGraphicsItem::ItemIsSelectable); m_waitingThumbs.append(item); } - //TODO: check if we do not overlap another clip when first dropping in timeline - //if (insertPossible(m_selectionGroup, event->pos())) + updateSnapPoints(NULL, offsetList); + m_selectionGroup->setPos(framePos); scene()->addItem(m_selectionGroup); m_thumbsTimer.start(); - event->acceptProposedAction(); + return true; } else { // the drag is not a clip (may be effect, ...) m_clipDrag = false; - QGraphicsView::dragEnterEvent(event); + return false; } } -bool CustomTrackView::insertPossible(AbstractGroupItem *group, const QPoint &pos) const + +void CustomTrackView::dragEnterEvent(QDragEnterEvent * event) { - QPolygonF path; - QList<QGraphicsItem *> children = group->childItems(); - for (int i = 0; i < children.count(); i++) { - if (children.at(i)->type() == AVWIDGET) { - ClipItem *clip = static_cast <ClipItem *>(children.at(i)); - ItemInfo info = clip->info(); - kDebug() << " / / INSERT : " << pos.x(); - QRectF shape = QRectF(clip->startPos().frames(m_document->fps()), clip->track() * m_tracksHeight + 1, clip->cropDuration().frames(m_document->fps()) - 0.02, m_tracksHeight - 1); - kDebug() << " / / INSERT RECT: " << shape; - path = path.united(QPolygonF(shape)); - } - } - - QList<QGraphicsItem*> collindingItems = scene()->items(path, Qt::IntersectsItemShape); - if (collindingItems.isEmpty()) return true; - else { - for (int i = 0; i < collindingItems.count(); i++) { - QGraphicsItem *collision = collindingItems.at(i); - if (collision->type() == AVWIDGET) { - // Collision - kDebug() << "// COLLISIION DETECTED"; - return false; - } - } - return true; - } - + if (insertDropClips(event->mimeData(), event->pos())) { + event->acceptProposedAction(); + } else QGraphicsView::dragEnterEvent(event); } - bool CustomTrackView::itemCollision(AbstractClipItem *item, ItemInfo newPos) { QRectF shape = QRectF(newPos.startPos.frames(m_document->fps()), newPos.track * m_tracksHeight + 1, (newPos.endPos - newPos.startPos).frames(m_document->fps()) - 0.02, m_tracksHeight - 1); @@ -1855,11 +1856,17 @@ void CustomTrackView::dragMoveEvent(QDragMoveEvent * event) { - const QPointF pos = mapToScene(event->pos()); - if (m_selectionGroup && m_clipDrag) { - m_selectionGroup->setPos(pos.x(), pos.y()); - emit mousePosition((int)(m_selectionGroup->scenePos().x() + 0.5)); - event->acceptProposedAction(); + if (m_clipDrag) { + const QPointF pos = mapToScene(event->pos()); + if (m_selectionGroup) { + m_selectionGroup->setPos(pos); + emit mousePosition((int)(m_selectionGroup->scenePos().x() + 0.5)); + event->acceptProposedAction(); + } else { + // Drag enter was not possible, try again at mouse position + insertDropClips(event->mimeData(), event->pos()); + event->accept(); + } } else { QGraphicsView::dragMoveEvent(event); } @@ -4046,6 +4053,20 @@ return true; } +bool CustomTrackView::canBePastedTo(QList <ItemInfo> infoList, int type) const +{ + QPainterPath path; + for (int i = 0; i < infoList.count(); i++) { + const QRectF rect((double) infoList.at(i).startPos.frames(m_document->fps()), (double)(infoList.at(i).track * m_tracksHeight + 1), (double)(infoList.at(i).endPos - infoList.at(i).startPos).frames(m_document->fps()), (double)(m_tracksHeight - 1)); + path.addRect(rect); + } + QList<QGraphicsItem *> collisions = scene()->items(path); + for (int i = 0; i < collisions.count(); i++) { + if (collisions.at(i)->type() == type) return false; + } + return true; +} + bool CustomTrackView::canBePasted(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const { for (int i = 0; i < items.count(); i++) { Modified: trunk/kdenlive/src/customtrackview.h =================================================================== --- trunk/kdenlive/src/customtrackview.h 2009-08-28 16:23:28 UTC (rev 3849) +++ trunk/kdenlive/src/customtrackview.h 2009-08-28 17:57:15 UTC (rev 3850) @@ -234,12 +234,13 @@ /** Get the index of the video track that is just below current track */ int getPreviousVideoTrack(int track); void updateClipFade(ClipItem * item); + bool insertDropClips(const QMimeData *data, const QPoint pos); bool canBePastedTo(ItemInfo info, int type) const; + bool canBePastedTo(QList <ItemInfo> infoList, int type) const; bool canBePasted(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const; bool canBeMoved(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const; ClipItem *getClipUnderCursor() const; ClipItem *getMainActiveClip() const; - bool insertPossible(AbstractGroupItem *group, const QPoint &pos) const; void resetSelectionGroup(bool selectItems = true); void groupSelectedItems(bool force = false, bool createNewGroup = false); /** Get available space for clip move (min and max free positions) */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-28 16:23:35
|
Revision: 3849 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3849&view=rev Author: j-b-m Date: 2009-08-28 16:23:28 +0000 (Fri, 28 Aug 2009) Log Message: ----------- Fix scrolling issue on group move Modified Paths: -------------- trunk/kdenlive/src/customtrackview.cpp Modified: trunk/kdenlive/src/customtrackview.cpp =================================================================== --- trunk/kdenlive/src/customtrackview.cpp 2009-08-28 16:07:12 UTC (rev 3848) +++ trunk/kdenlive/src/customtrackview.cpp 2009-08-28 16:23:28 UTC (rev 3849) @@ -2602,7 +2602,7 @@ items += items.at(i)->childItems(); } } - + m_document->renderer()->blockSignals(true); for (int i = 0; i < items.count(); i++) { if (items.at(i)->type() != AVWIDGET && items.at(i)->type() != TRANSITIONWIDGET) continue; AbstractClipItem *item = static_cast <AbstractClipItem *>(items.at(i)); @@ -2620,7 +2620,7 @@ m_document->renderer()->mltDeleteTransition(tr->transitionTag(), tr->transitionEndTrack(), m_document->tracksCount() - info.track, info.startPos, info.endPos, tr->toXML()); } } - + m_document->renderer()->blockSignals(false); for (int i = 0; i < items.count(); i++) { // re-add items in correct place if (items.at(i)->type() != AVWIDGET && items.at(i)->type() != TRANSITIONWIDGET) continue; @@ -3334,7 +3334,7 @@ kDebug() << "// GROUP MOV; OFFSET: " << offset.frames(25) << ", TK OFF: " << trackOffset;*/ resetSelectionGroup(); m_scene->clearSelection(); - + m_document->renderer()->blockSignals(true); for (int i = 0; i < startClip.count(); i++) { if (reverseMove) { startClip[i].startPos = startClip.at(i).startPos - offset; @@ -3362,6 +3362,7 @@ m_document->renderer()->mltDeleteTransition(tr->transitionTag(), tr->transitionEndTrack(), m_document->tracksCount() - startTransition.at(i).track, startTransition.at(i).startPos, startTransition.at(i).endPos, tr->toXML()); } else kDebug() << "//MISSING TRANSITION AT: " << startTransition.at(i).startPos.frames(25); } + m_document->renderer()->blockSignals(false); groupSelectedItems(true); if (m_selectionGroup) { bool snap = KdenliveSettings::snaptopoints(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-28 16:07:25
|
Revision: 3848 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3848&view=rev Author: j-b-m Date: 2009-08-28 16:07:12 +0000 (Fri, 28 Aug 2009) Log Message: ----------- Fix repaint issue when zoomed in and selecting a clip Modified Paths: -------------- trunk/kdenlive/src/customtrackview.cpp Modified: trunk/kdenlive/src/customtrackview.cpp =================================================================== --- trunk/kdenlive/src/customtrackview.cpp 2009-08-28 15:51:25 UTC (rev 3847) +++ trunk/kdenlive/src/customtrackview.cpp 2009-08-28 16:07:12 UTC (rev 3848) @@ -836,8 +836,10 @@ if (event->modifiers() == Qt::ControlModifier || itemSelected == false) { if (event->modifiers() != Qt::ControlModifier) { + resetSelectionGroup(false); m_scene->clearSelection(); - resetSelectionGroup(false); + // A refresh seems necessary otherwise in zoomed mode, some clips disappear + viewport()->update(); } else resetSelectionGroup(); dragGroup = NULL; if (m_dragItem->parentItem() && m_dragItem->parentItem()->type() == GROUPWIDGET) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-28 15:51:33
|
Revision: 3847 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3847&view=rev Author: j-b-m Date: 2009-08-28 15:51:25 +0000 (Fri, 28 Aug 2009) Log Message: ----------- Small repaint fixes Modified Paths: -------------- trunk/kdenlive/src/customtrackview.cpp trunk/kdenlive/src/guide.cpp Modified: trunk/kdenlive/src/customtrackview.cpp =================================================================== --- trunk/kdenlive/src/customtrackview.cpp 2009-08-28 15:02:17 UTC (rev 3846) +++ trunk/kdenlive/src/customtrackview.cpp 2009-08-28 15:51:25 UTC (rev 3847) @@ -122,7 +122,9 @@ setAcceptDrops(true); setFrameShape(QFrame::NoFrame); setLineWidth(0); - + //setCacheMode(QGraphicsView::CacheBackground); + //setViewportUpdateMode(QGraphicsView::FullViewportUpdate); + KdenliveSettings::setTrackheight(m_tracksHeight); m_animationTimer = new QTimeLine(800); m_animationTimer->setFrameRange(0, 5); @@ -138,7 +140,7 @@ verticalScrollBar()->setMaximum(maxHeight); m_cursorLine = projectscene->addLine(0, 0, 0, maxHeight); m_cursorLine->setZValue(1000); - + QPen pen1 = QPen(); pen1.setWidth(1); pen1.setColor(Qt::black); @@ -960,7 +962,7 @@ m_blockRefresh = false; //kDebug()<<pos; - //QGraphicsView::mousePressEvent(event); + QGraphicsView::mousePressEvent(event); } void CustomTrackView::resetSelectionGroup(bool selectItems) @@ -1851,12 +1853,10 @@ void CustomTrackView::dragMoveEvent(QDragMoveEvent * event) { - event->setDropAction(Qt::IgnoreAction); const QPointF pos = mapToScene(event->pos()); if (m_selectionGroup && m_clipDrag) { m_selectionGroup->setPos(pos.x(), pos.y()); emit mousePosition((int)(m_selectionGroup->scenePos().x() + 0.5)); - event->setDropAction(Qt::MoveAction); event->acceptProposedAction(); } else { QGraphicsView::dragMoveEvent(event); @@ -3918,25 +3918,30 @@ void CustomTrackView::drawBackground(QPainter * painter, const QRectF &rect) { - const QRectF r = rect.adjusted(0, 0, 1, 0); - painter->setClipRect(r); - painter->drawLine(r.left(), 0, r.right(), 0); - uint max = m_document->tracksCount(); + //kDebug() << "// DRAW BG: " << rect.width(); + painter->setClipRect(rect); KColorScheme scheme(palette().currentColorGroup(), KColorScheme::Window); + QPen pen1 = painter->pen(); + pen1.setColor(scheme.shade(KColorScheme::DarkShade)); + painter->setPen(pen1); + double min = rect.left(); + double max = rect.right(); + painter->drawLine(QPointF(min, 0), QPointF(max, 0)); + uint maxTrack = m_document->tracksCount(); QColor lockedColor = scheme.background(KColorScheme::NegativeBackground).color(); QColor audioColor = palette().alternateBase().color(); QColor base = scheme.background(KColorScheme::NormalBackground).color(); - for (uint i = 0; i < max; i++) { - TrackInfo info = m_document->trackInfoAt(max - i - 1); + for (uint i = 0; i < maxTrack; i++) { + TrackInfo info = m_document->trackInfoAt(maxTrack - i - 1); if (info.isLocked || info.type == AUDIOTRACK) { - const QRectF track(r.left(), m_tracksHeight * i + 1, r.right() - r.left() + 1, m_tracksHeight - 1); + const QRectF track(min, m_tracksHeight * i + 1, max - min, m_tracksHeight - 1); painter->fillRect(track, info.isLocked ? lockedColor : audioColor); } - painter->drawLine(QPointF(r.left(), m_tracksHeight *(i + 1)), QPointF(r.right(), m_tracksHeight *(i + 1))); + painter->drawLine(QPointF(min, m_tracksHeight *(i + 1)), QPointF(max, m_tracksHeight *(i + 1))); } - int lowerLimit = m_tracksHeight * m_document->tracksCount() + 1; + int lowerLimit = m_tracksHeight * maxTrack + 1; if (height() > lowerLimit) { - const QRectF bg(r.left(), lowerLimit, r.width(), height() - lowerLimit); + const QRectF bg(min, lowerLimit, max - min, height() - lowerLimit); painter->fillRect(bg, base); } } Modified: trunk/kdenlive/src/guide.cpp =================================================================== --- trunk/kdenlive/src/guide.cpp 2009-08-28 15:02:17 UTC (rev 3846) +++ trunk/kdenlive/src/guide.cpp 2009-08-28 15:51:25 UTC (rev 3847) @@ -144,7 +144,6 @@ { QGraphicsLineItem::paint(painter, option); if (KdenliveSettings::showmarkers()) { - //QPointF p1 = painter->matrix().map(line()).p1() + QPointF(1, 0); QPointF p1 = line().p1() + QPointF(1, 0); const QFontMetrics metric = m_view->fontMetrics(); QRectF txtBounding = painter->boundingRect(p1.x(), p1.y() + 10, m_width, metric.height(), Qt::AlignLeft | Qt::AlignTop, ' ' + m_label + ' '); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-28 15:02:23
|
Revision: 3846 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3846&view=rev Author: j-b-m Date: 2009-08-28 15:02:17 +0000 (Fri, 28 Aug 2009) Log Message: ----------- Fix painting issues with timeline cursor Modified Paths: -------------- trunk/kdenlive/src/customtrackview.cpp trunk/kdenlive/src/guide.cpp Modified: trunk/kdenlive/src/customtrackview.cpp =================================================================== --- trunk/kdenlive/src/customtrackview.cpp 2009-08-28 14:27:09 UTC (rev 3845) +++ trunk/kdenlive/src/customtrackview.cpp 2009-08-28 15:02:17 UTC (rev 3846) @@ -138,10 +138,12 @@ verticalScrollBar()->setMaximum(maxHeight); m_cursorLine = projectscene->addLine(0, 0, 0, maxHeight); m_cursorLine->setZValue(1000); - /*QPen pen1; - pen1.setWidthF(0); - pen1.setCosmetic(true); - m_cursorLine->setPen(pen1);*/ + + QPen pen1 = QPen(); + pen1.setWidth(1); + pen1.setColor(Qt::black); + m_cursorLine->setPen(pen1); + m_cursorLine->setFlag(QGraphicsItem::ItemIgnoresTransformations, true); KIcon razorIcon("edit-cut"); m_razorCursor = QCursor(razorIcon.pixmap(22, 22)); @@ -795,7 +797,9 @@ } groupSelectedItems(true); m_operationMode = SPACER; - } else setCursorPos((int)(mapToScene(event->x(), 0).x())); + } else { + setCursorPos((int)(mapToScene(event->x(), 0).x())); + } QGraphicsView::mousePressEvent(event); return; } Modified: trunk/kdenlive/src/guide.cpp =================================================================== --- trunk/kdenlive/src/guide.cpp 2009-08-28 14:27:09 UTC (rev 3845) +++ trunk/kdenlive/src/guide.cpp 2009-08-28 15:02:17 UTC (rev 3846) @@ -35,7 +35,7 @@ m_view(view), m_pen(QPen()) { - setFlags(QGraphicsItem::ItemIsMovable); + setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIgnoresTransformations); setToolTip(label); setLine(0, 0, 0, height); setPos(m_position.frames(m_fps), 0); @@ -144,8 +144,8 @@ { QGraphicsLineItem::paint(painter, option); if (KdenliveSettings::showmarkers()) { - painter->setMatrixEnabled(false); - QPointF p1 = painter->matrix().map(line()).p1() + QPointF(1, 0); + //QPointF p1 = painter->matrix().map(line()).p1() + QPointF(1, 0); + QPointF p1 = line().p1() + QPointF(1, 0); const QFontMetrics metric = m_view->fontMetrics(); QRectF txtBounding = painter->boundingRect(p1.x(), p1.y() + 10, m_width, metric.height(), Qt::AlignLeft | Qt::AlignTop, ' ' + m_label + ' '); QPainterPath path; @@ -153,7 +153,6 @@ painter->fillPath(path, m_pen.color()); painter->setPen(Qt::white); painter->drawText(txtBounding, Qt::AlignCenter, m_label); - painter->setMatrixEnabled(true); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-28 14:27:16
|
Revision: 3845 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3845&view=rev Author: j-b-m Date: 2009-08-28 14:27:09 +0000 (Fri, 28 Aug 2009) Log Message: ----------- Get rid of the display artifacts when using timeline rectangle selection Modified Paths: -------------- trunk/kdenlive/src/customtrackview.cpp Modified: trunk/kdenlive/src/customtrackview.cpp =================================================================== --- trunk/kdenlive/src/customtrackview.cpp 2009-08-28 13:32:28 UTC (rev 3844) +++ trunk/kdenlive/src/customtrackview.cpp 2009-08-28 14:27:09 UTC (rev 3845) @@ -122,7 +122,7 @@ setAcceptDrops(true); setFrameShape(QFrame::NoFrame); setLineWidth(0); - + KdenliveSettings::setTrackheight(m_tracksHeight); m_animationTimer = new QTimeLine(800); m_animationTimer->setFrameRange(0, 5); @@ -133,13 +133,13 @@ m_tipPen.setColor(border); m_tipPen.setWidth(3); setContentsMargins(0, 0, 0, 0); - const int maxWidth = m_tracksHeight * m_document->tracksCount(); - setSceneRect(0, 0, sceneRect().width(), maxWidth); - verticalScrollBar()->setMaximum(maxWidth); - m_cursorLine = projectscene->addLine(0, 0, 0, maxWidth); + const int maxHeight = m_tracksHeight * m_document->tracksCount(); + setSceneRect(0, 0, sceneRect().width(), maxHeight); + verticalScrollBar()->setMaximum(maxHeight); + m_cursorLine = projectscene->addLine(0, 0, 0, maxHeight); m_cursorLine->setZValue(1000); /*QPen pen1; - pen1.setWidthF(1.0); + pen1.setWidthF(0); pen1.setCosmetic(true); m_cursorLine->setPen(pen1);*/ @@ -323,9 +323,10 @@ emit mousePosition(mappedXPos); if (event->buttons() & Qt::MidButton) return; - if (m_operationMode == RUBBERSELECTION || (event->modifiers() == Qt::ControlModifier && m_tool != SPACERTOOL)) { + if (dragMode() == QGraphicsView::RubberBandDrag || (event->modifiers() == Qt::ControlModifier && m_tool != SPACERTOOL)) { + event->setAccepted(true); + m_moveOpMode = NONE; QGraphicsView::mouseMoveEvent(event); - m_moveOpMode = NONE; return; } @@ -412,7 +413,7 @@ AbstractClipItem *clip = static_cast <AbstractClipItem*>(item); if (m_tool == RAZORTOOL) { // razor tool over a clip, display current frame in monitor - if (false && /*!m_blockRefresh && */item->type() == AVWIDGET) { + if (false && !m_blockRefresh && item->type() == AVWIDGET) { //TODO: solve crash when showing frame when moving razor over clip emit showClipFrame(((ClipItem *) item)->baseClip(), mappedXPos - (clip->startPos() - clip->cropStart()).frames(m_document->fps())); } @@ -619,14 +620,15 @@ if (event->modifiers() & Qt::ShiftModifier) { // Rectangle selection + setViewportUpdateMode(QGraphicsView::FullViewportUpdate); setDragMode(QGraphicsView::RubberBandDrag); if (!(event->modifiers() & Qt::ControlModifier)) { resetSelectionGroup(); scene()->clearSelection(); } - QGraphicsView::mousePressEvent(event); m_blockRefresh = false; m_operationMode = RUBBERSELECTION; + QGraphicsView::mousePressEvent(event); return; } @@ -880,7 +882,7 @@ } // If clicked item is selected, allow move - if (event->modifiers() != Qt::ControlModifier && m_operationMode == NONE/* && (m_dragItem->isSelected() || (dragGroup && dragGroup->isSelected()))*/) QGraphicsView::mousePressEvent(event); + if (event->modifiers() != Qt::ControlModifier && m_operationMode == NONE) QGraphicsView::mousePressEvent(event); m_clickPoint = QPoint((int)(mapToScene(event->pos()).x() - m_dragItem->startPos().frames(m_document->fps())), (int)(event->pos().y() - m_dragItem->pos().y())); m_operationMode = m_dragItem->operationMode(mapToScene(event->pos())); @@ -2374,6 +2376,7 @@ { if (m_moveOpMode == SEEK) m_moveOpMode = NONE; QGraphicsView::mouseReleaseEvent(event); + setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate); if (m_scrollTimer.isActive()) m_scrollTimer.stop(); if (event->button() == Qt::MidButton) { return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-28 13:32:36
|
Revision: 3844 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3844&view=rev Author: j-b-m Date: 2009-08-28 13:32:28 +0000 (Fri, 28 Aug 2009) Log Message: ----------- cleanup Modified Paths: -------------- trunk/kdenlive/src/customtrackview.cpp trunk/kdenlive/src/markerdialog.cpp trunk/kdenlive/src/markerdialog.h trunk/kdenlive/src/trackdialog.cpp trunk/kdenlive/src/trackdialog.h Modified: trunk/kdenlive/src/customtrackview.cpp =================================================================== --- trunk/kdenlive/src/customtrackview.cpp 2009-08-28 13:23:20 UTC (rev 3843) +++ trunk/kdenlive/src/customtrackview.cpp 2009-08-28 13:32:28 UTC (rev 3844) @@ -4344,19 +4344,19 @@ void CustomTrackView::slotInsertTrack(int ix) { TrackDialog d(m_document, parentWidget()); - d.view.label->setText(i18n("Insert track")); - d.view.track_nb->setMaximum(m_document->tracksCount() - 1); - d.view.track_nb->setValue(ix); + d.label->setText(i18n("Insert track")); + d.track_nb->setMaximum(m_document->tracksCount() - 1); + d.track_nb->setValue(ix); d.setWindowTitle(i18n("Insert New Track")); d.slotUpdateName(ix); if (d.exec() == QDialog::Accepted) { - ix = d.view.track_nb->value(); - if (d.view.before_select->currentIndex() == 1) { + ix = d.track_nb->value(); + if (d.before_select->currentIndex() == 1) { ix++; } TrackInfo info; - if (d.view.video_track->isChecked()) { + if (d.video_track->isChecked()) { info.type = VIDEOTRACK; info.isMute = false; info.isBlind = false; @@ -4376,16 +4376,16 @@ void CustomTrackView::slotDeleteTrack(int ix) { TrackDialog d(m_document, parentWidget()); - d.view.label->setText(i18n("Delete track")); - d.view.before_select->setHidden(true); - d.view.track_nb->setMaximum(m_document->tracksCount() - 1); - d.view.track_nb->setValue(ix); + d.label->setText(i18n("Delete track")); + d.before_select->setHidden(true); + d.track_nb->setMaximum(m_document->tracksCount() - 1); + d.track_nb->setValue(ix); d.slotUpdateName(ix); d.setWindowTitle(i18n("Delete Track")); - d.view.video_track->setHidden(true); - d.view.audio_track->setHidden(true); + d.video_track->setHidden(true); + d.audio_track->setHidden(true); if (d.exec() == QDialog::Accepted) { - ix = d.view.track_nb->value(); + ix = d.track_nb->value(); TrackInfo info = m_document->trackInfoAt(m_document->tracksCount() - ix - 1); deleteTimelineTrack(ix, info); setDocumentModified(); @@ -4397,25 +4397,25 @@ void CustomTrackView::slotChangeTrack(int ix) { TrackDialog d(m_document, parentWidget()); - d.view.label->setText(i18n("Change track")); - d.view.before_select->setHidden(true); - d.view.track_nb->setMaximum(m_document->tracksCount() - 1); - d.view.track_nb->setValue(ix); + d.label->setText(i18n("Change track")); + d.before_select->setHidden(true); + d.track_nb->setMaximum(m_document->tracksCount() - 1); + d.track_nb->setValue(ix); d.slotUpdateName(ix); d.setWindowTitle(i18n("Change Track Type")); if (m_document->trackInfoAt(m_document->tracksCount() - ix - 1).type == VIDEOTRACK) - d.view.video_track->setChecked(true); + d.video_track->setChecked(true); else - d.view.audio_track->setChecked(true); + d.audio_track->setChecked(true); if (d.exec() == QDialog::Accepted) { TrackInfo info; info.isLocked = false; info.isMute = false; - ix = d.view.track_nb->value(); + ix = d.track_nb->value(); - if (d.view.video_track->isChecked()) { + if (d.video_track->isChecked()) { info.type = VIDEOTRACK; info.isBlind = false; } else { Modified: trunk/kdenlive/src/markerdialog.cpp =================================================================== --- trunk/kdenlive/src/markerdialog.cpp 2009-08-28 13:23:20 UTC (rev 3843) +++ trunk/kdenlive/src/markerdialog.cpp 2009-08-28 13:32:28 UTC (rev 3844) @@ -35,7 +35,7 @@ { setFont(KGlobalSettings::toolBarFont()); m_fps = m_tc.fps(); - m_view.setupUi(this); + setupUi(this); setWindowTitle(caption); m_previewTimer = new QTimer(this); @@ -75,21 +75,21 @@ p.fill(Qt::black); } if (!p.isNull()) { - m_view.clip_thumb->setFixedWidth(p.width()); - m_view.clip_thumb->setFixedHeight(p.height()); - m_view.clip_thumb->setPixmap(p); + clip_thumb->setFixedWidth(p.width()); + clip_thumb->setFixedHeight(p.height()); + clip_thumb->setPixmap(p); } - connect(m_view.marker_position, SIGNAL(textChanged(const QString &)), this, SIGNAL(updateThumb())); - } else m_view.clip_thumb->setHidden(true); + connect(marker_position, SIGNAL(textChanged(const QString &)), this, SIGNAL(updateThumb())); + } else clip_thumb->setHidden(true); - m_view.marker_position->setText(tc.getTimecode(t.time())); + marker_position->setText(tc.getTimecode(t.time())); - m_view.marker_comment->setText(t.comment()); - m_view.marker_comment->selectAll(); - m_view.marker_comment->setFocus(); + marker_comment->setText(t.comment()); + marker_comment->selectAll(); + marker_comment->setFocus(); - connect(m_view.position_up, SIGNAL(clicked()), this, SLOT(slotTimeUp())); - connect(m_view.position_down, SIGNAL(clicked()), this, SLOT(slotTimeDown())); + connect(position_up, SIGNAL(clicked()), this, SLOT(slotTimeUp())); + connect(position_down, SIGNAL(clicked()), this, SLOT(slotTimeDown())); adjustSize(); } @@ -104,38 +104,38 @@ void MarkerDialog::slotUpdateThumb() { m_previewTimer->stop(); - int pos = m_tc.getFrameCount(m_view.marker_position->text()); + int pos = m_tc.getFrameCount(marker_position->text()); int width = 100.0 * m_dar; if (width % 2 == 1) width++; QPixmap p = KThumb::getFrame(m_producer, pos, width, 100); - if (!p.isNull()) m_view.clip_thumb->setPixmap(p); + if (!p.isNull()) clip_thumb->setPixmap(p); else kDebug() << "!!!!!!!!!!! ERROR CREATING THUMB"; } void MarkerDialog::slotTimeUp() { - int duration = m_tc.getFrameCount(m_view.marker_position->text()); + int duration = m_tc.getFrameCount(marker_position->text()); if (m_clip && duration >= m_clip->duration().frames(m_fps)) return; duration ++; - m_view.marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps))); + marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps))); } void MarkerDialog::slotTimeDown() { - int duration = m_tc.getFrameCount(m_view.marker_position->text()); + int duration = m_tc.getFrameCount(marker_position->text()); if (duration <= 0) return; duration --; - m_view.marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps))); + marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps))); } CommentedTime MarkerDialog::newMarker() { - return CommentedTime(GenTime(m_tc.getFrameCount(m_view.marker_position->text()), m_fps), m_view.marker_comment->text()); + return CommentedTime(GenTime(m_tc.getFrameCount(marker_position->text()), m_fps), marker_comment->text()); } void MarkerDialog::wheelEvent(QWheelEvent * event) { - if (m_view.marker_position->underMouse() || m_view.clip_thumb->underMouse()) { + if (marker_position->underMouse() || clip_thumb->underMouse()) { if (event->delta() > 0) slotTimeUp(); else Modified: trunk/kdenlive/src/markerdialog.h =================================================================== --- trunk/kdenlive/src/markerdialog.h 2009-08-28 13:23:20 UTC (rev 3843) +++ trunk/kdenlive/src/markerdialog.h 2009-08-28 13:32:28 UTC (rev 3844) @@ -32,7 +32,7 @@ class Profile; }; -class MarkerDialog : public QDialog +class MarkerDialog : public QDialog, public Ui::MarkerDialog_UI { Q_OBJECT @@ -52,7 +52,6 @@ private: Mlt::Producer *m_producer; Mlt::Profile *m_profile; - Ui::MarkerDialog_UI m_view; DocClipBase *m_clip; Timecode m_tc; double m_fps; Modified: trunk/kdenlive/src/trackdialog.cpp =================================================================== --- trunk/kdenlive/src/trackdialog.cpp 2009-08-28 13:23:20 UTC (rev 3843) +++ trunk/kdenlive/src/trackdialog.cpp 2009-08-28 13:32:28 UTC (rev 3844) @@ -30,8 +30,8 @@ m_doc(doc) { //setFont(KGlobalSettings::toolBarFont()); - view.setupUi(this); - connect(view.track_nb, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateName(int))); + setupUi(this); + connect(track_nb, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateName(int))); } TrackDialog::~TrackDialog() @@ -41,7 +41,7 @@ void TrackDialog::slotUpdateName(int ix) { ix = m_doc->tracksCount() - ix; - view.track_name->setText(m_doc->trackInfoAt(ix - 1).trackName); + track_name->setText(m_doc->trackInfoAt(ix - 1).trackName); } Modified: trunk/kdenlive/src/trackdialog.h =================================================================== --- trunk/kdenlive/src/trackdialog.h 2009-08-28 13:23:20 UTC (rev 3843) +++ trunk/kdenlive/src/trackdialog.h 2009-08-28 13:32:28 UTC (rev 3844) @@ -26,14 +26,13 @@ class KdenliveDoc; -class TrackDialog : public QDialog +class TrackDialog : public QDialog, public Ui::AddTrack_UI { Q_OBJECT public: TrackDialog(KdenliveDoc *doc, QWidget * parent = 0); ~TrackDialog(); - Ui::AddTrack_UI view; public slots: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <j-b-m@us...> - 2009-08-28 13:23:34
|
Revision: 3843 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3843&view=rev Author: j-b-m Date: 2009-08-28 13:23:20 +0000 (Fri, 28 Aug 2009) Log Message: ----------- cleanup Modified Paths: -------------- trunk/kdenlive/src/headertrack.cpp trunk/kdenlive/src/headertrack.h Modified: trunk/kdenlive/src/headertrack.cpp =================================================================== --- trunk/kdenlive/src/headertrack.cpp 2009-08-28 11:43:20 UTC (rev 3842) +++ trunk/kdenlive/src/headertrack.cpp 2009-08-28 13:23:20 UTC (rev 3843) @@ -36,40 +36,40 @@ m_type(info.type) { setFixedHeight(height); - m_view.setupUi(this); - m_view.track_number->setText(info.trackName.isEmpty() ? QString::number(m_index) : info.trackName); + setupUi(this); + track_number->setText(info.trackName.isEmpty() ? QString::number(m_index) : info.trackName); - m_view.buttonVideo->setChecked(info.isBlind); - m_view.buttonVideo->setToolTip(i18n("Hide track")); - m_view.buttonAudio->setChecked(info.isMute); - m_view.buttonAudio->setToolTip(i18n("Mute track")); - m_view.buttonLock->setChecked(info.isLocked); - m_view.buttonLock->setToolTip(i18n("Lock track")); + buttonVideo->setChecked(info.isBlind); + buttonVideo->setToolTip(i18n("Hide track")); + buttonAudio->setChecked(info.isMute); + buttonAudio->setToolTip(i18n("Mute track")); + buttonLock->setChecked(info.isLocked); + buttonLock->setToolTip(i18n("Lock track")); if (m_type == VIDEOTRACK) { setBackgroundRole(QPalette::AlternateBase); setAutoFillBackground(true); - if (!info.isBlind) m_view.buttonVideo->setIcon(KIcon("kdenlive-show-video")); - else m_view.buttonVideo->setIcon(KIcon("kdenlive-hide-video")); + if (!info.isBlind) buttonVideo->setIcon(KIcon("kdenlive-show-video")); + else buttonVideo->setIcon(KIcon("kdenlive-hide-video")); } else { - m_view.buttonVideo->setHidden(true); + buttonVideo->setHidden(true); } - if (!info.isMute) m_view.buttonAudio->setIcon(KIcon("kdenlive-show-audio")); - else m_view.buttonAudio->setIcon(KIcon("kdenlive-hide-audio")); + if (!info.isMute) buttonAudio->setIcon(KIcon("kdenlive-show-audio")); + else buttonAudio->setIcon(KIcon("kdenlive-hide-audio")); - if (!info.isLocked) m_view.buttonLock->setIcon(KIcon("kdenlive-unlock")); - else m_view.buttonLock->setIcon(KIcon("kdenlive-lock")); + if (!info.isLocked) buttonLock->setIcon(KIcon("kdenlive-unlock")); + else buttonLock->setIcon(KIcon("kdenlive-lock")); - connect(m_view.buttonVideo, SIGNAL(clicked()), this, SLOT(switchVideo())); - connect(m_view.buttonAudio, SIGNAL(clicked()), this, SLOT(switchAudio())); - connect(m_view.buttonLock, SIGNAL(clicked()), this, SLOT(switchLock())); + connect(buttonVideo, SIGNAL(clicked()), this, SLOT(switchVideo())); + connect(buttonAudio, SIGNAL(clicked()), this, SLOT(switchAudio())); + connect(buttonLock, SIGNAL(clicked()), this, SLOT(switchLock())); // Don't show track buttons if size is too small if (height < 40) { - m_view.buttonVideo->setHidden(true); - m_view.buttonAudio->setHidden(true); - m_view.buttonLock->setHidden(true); - //m_view.horizontalSpacer; + buttonVideo->setHidden(true); + buttonAudio->setHidden(true); + buttonLock->setHidden(true); + //horizontalSpacer; } setContextMenuPolicy(Qt::ActionsContextMenu); @@ -99,38 +99,38 @@ { // Don't show track buttons if size is too small bool smallTracks = height < 40; - if (m_type == VIDEOTRACK) m_view.buttonVideo->setHidden(smallTracks); - m_view.buttonAudio->setHidden(smallTracks); - m_view.buttonLock->setHidden(smallTracks); + if (m_type == VIDEOTRACK) buttonVideo->setHidden(smallTracks); + buttonAudio->setHidden(smallTracks); + buttonLock->setHidden(smallTracks); setFixedHeight(height); } void HeaderTrack::switchVideo() { - if (m_view.buttonVideo->isChecked()) { - m_view.buttonVideo->setIcon(KIcon("kdenlive-hide-video")); + if (buttonVideo->isChecked()) { + buttonVideo->setIcon(KIcon("kdenlive-hide-video")); } else { - m_view.buttonVideo->setIcon(KIcon("kdenlive-show-video")); + buttonVideo->setIcon(KIcon("kdenlive-show-video")); } emit switchTrackVideo(m_index); } void HeaderTrack::switchAudio() { - if (m_view.buttonAudio->isChecked()) { - m_view.buttonAudio->setIcon(KIcon("kdenlive-hide-audio")); + if (buttonAudio->isChecked()) { + buttonAudio->setIcon(KIcon("kdenlive-hide-audio")); } else { - m_view.buttonAudio->setIcon(KIcon("kdenlive-show-audio")); + buttonAudio->setIcon(KIcon("kdenlive-show-audio")); } emit switchTrackAudio(m_index); } void HeaderTrack::switchLock(bool emitSignal) { - if (m_view.buttonLock->isChecked()) { - m_view.buttonLock->setIcon(KIcon("kdenlive-lock")); + if (buttonLock->isChecked()) { + buttonLock->setIcon(KIcon("kdenlive-lock")); } else { - m_view.buttonLock->setIcon(KIcon("kdenlive-unlock")); + buttonLock->setIcon(KIcon("kdenlive-unlock")); } if (emitSignal) emit switchTrackLock(m_index); } @@ -138,7 +138,7 @@ void HeaderTrack::setLock(bool lock) { - m_view.buttonLock->setChecked(lock); + buttonLock->setChecked(lock); switchLock(false); } Modified: trunk/kdenlive/src/headertrack.h =================================================================== --- trunk/kdenlive/src/headertrack.h 2009-08-28 11:43:20 UTC (rev 3842) +++ trunk/kdenlive/src/headertrack.h 2009-08-28 13:23:20 UTC (rev 3843) @@ -26,7 +26,7 @@ #include "definitions.h" #include "ui_trackheader_ui.h" -class HeaderTrack : public QWidget +class HeaderTrack : public QWidget, public Ui::TrackHeader_UI { Q_OBJECT @@ -39,7 +39,6 @@ private: int m_index; TRACKTYPE m_type; - Ui::TrackHeader_UI m_view; private slots: void switchAudio(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |