From 82812d2bbe0841ad5534677c55b7fa84dbd890c0 Mon Sep 17 00:00:00 2001 From: "Simon A. Eugster" Date: Tue, 1 Dec 2009 15:44:26 +0000 Subject: [PATCH] Position of z-index number field changed reindent.sh ;) svn path=/trunk/kdenlive/; revision=4166 --- icons/cp-oxicons-hisc.sh | 6 +- icons/hi16-action-kdenlive-object-height.png | Bin 0 -> 526 bytes icons/hi16-action-kdenlive-object-width.png | Bin 0 -> 488 bytes icons/hisc-action-kdenlive-object-height.svgz | Bin 0 -> 1758 bytes icons/hisc-action-kdenlive-object-width.svgz | Bin 0 -> 1921 bytes icons/ox16-action-kdenlive-object-height.png | Bin 0 -> 526 bytes icons/ox16-action-kdenlive-object-width.png | Bin 0 -> 488 bytes icons/oxsc-action-kdenlive-object-height.svgz | Bin 0 -> 1758 bytes icons/oxsc-action-kdenlive-object-width.svgz | Bin 0 -> 1921 bytes src/clipitem.cpp | 4 +- src/customtrackview.cpp | 16 +-- src/keyframeedit.cpp | 12 +- src/renderwidget.cpp | 31 ++-- src/titlewidget.cpp | 132 +++++++++--------- src/titlewidget.h | 4 +- src/widgets/titlewidget_ui.ui | 58 ++++---- 16 files changed, 133 insertions(+), 130 deletions(-) create mode 100644 icons/hi16-action-kdenlive-object-height.png create mode 100644 icons/hi16-action-kdenlive-object-width.png create mode 100644 icons/hisc-action-kdenlive-object-height.svgz create mode 100644 icons/hisc-action-kdenlive-object-width.svgz create mode 100644 icons/ox16-action-kdenlive-object-height.png create mode 100644 icons/ox16-action-kdenlive-object-width.png create mode 100644 icons/oxsc-action-kdenlive-object-height.svgz create mode 100644 icons/oxsc-action-kdenlive-object-width.svgz diff --git a/icons/cp-oxicons-hisc.sh b/icons/cp-oxicons-hisc.sh index 7ef1990f..74662ea0 100755 --- a/icons/cp-oxicons-hisc.sh +++ b/icons/cp-oxicons-hisc.sh @@ -6,4 +6,8 @@ cp oxsc-action-kdenlive-zindex-down.svgz hisc-action-kdenlive-zindex-down.svgz cp ox16-action-kdenlive-zindex-top.png hi16-action-kdenlive-zindex-top.png cp oxsc-action-kdenlive-zindex-top.svgz hisc-action-kdenlive-zindex-top.svgz cp ox16-action-kdenlive-zindex-bottom.png hi16-action-kdenlive-zindex-bottom.png -cp oxsc-action-kdenlive-zindex-bottom.svgz hisc-action-kdenlive-zindex-bottom.svgz \ No newline at end of file +cp oxsc-action-kdenlive-zindex-bottom.svgz hisc-action-kdenlive-zindex-bottom.svgz +cp ox16-action-kdenlive-object-width.png hi16-action-kdenlive-object-width.png +cp oxsc-action-kdenlive-object-width.svgz hisc-action-kdenlive-object-width.svgz +cp ox16-action-kdenlive-object-height.png hi16-action-kdenlive-object-height.png +cp oxsc-action-kdenlive-object-height.svgz hisc-action-kdenlive-object-height.svgz diff --git a/icons/hi16-action-kdenlive-object-height.png b/icons/hi16-action-kdenlive-object-height.png new file mode 100644 index 0000000000000000000000000000000000000000..180c6441b9326be9afae028e5d1420433029217d GIT binary patch literal 526 zcmV+p0`dKcP)aO-tbn`% zwG~>K*!c{`h=jjj;R}$3LQRAM9|27ukQlgJ*jyWkuq>83$y9UZn{$dWaL%Duk}TRR z7E2WXMx#+MpDTRo={D9Zy9ps}ugB-|dVDTINL!Lcx9%m*`BKXXDU(Vkhl*0;jEy;C zW3DJQo=PW&aze^z^@e!_Nfx&RLAa%qMoy01u-kVK4n+U}hXfov>Q1 zP-hW5UJtt6ZnpW>1RP)}>oJ`tWd#Q^iVE7Tk;7#vd-uLs~-FuJoJP-Cc zzP;4H0Yt??qT<}9V4~t2QE_l1KoEom07SPWj3R^@YXOB~zGB;Uc2~)i(rlraudD!w ziWQzes9jztyYwK%B=GzFHKJk#0D!y6=fVh~S^2hnxOiVc_p!SbkW3{Ze0&5Qqx<1F z&M7a7VlS1v3MCTf5Rc1{PG^8I7hJ}GF?YpwnG5XOK1;}<@o3!JyN$eMS()el)9fS? z`O_0#Uq+vf<77C`^MI&W2?T_`9GAtx(0tG}<9?l(sQ6xrNq6(v+@h3T>zZNu004B& zFkRQF4u;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bKA|?4I&v z%C;T92C}vw(Va|59)~1?zPXWc?!Y3;UGeMVjXcLISa+^%I4ElNHB!*EugIs?QRRy! z-)gqz*Mc4SVbq9Z;;aDme`NL;g!+(`3*9^Fe;rm=w-+-Bm)nc~01Nb>KKdg70FX9& APyhe` literal 0 HcmV?d00001 diff --git a/icons/hisc-action-kdenlive-object-width.svgz b/icons/hisc-action-kdenlive-object-width.svgz new file mode 100644 index 0000000000000000000000000000000000000000..90a20cdbd4d394c6ad20b6137f2b0c2107802926 GIT binary patch literal 1921 zcmV-{2Y&b;iwFP!000000PR|BZ`(Ey{+?fFKjh%j2*P+0M0c(qW9B7HQ z)ySei$+4YZzoXt|%P(7M6l$j}T!0ShJDBsp0t{iZO+p{52xNCRDK zd772Kjv*9#2UBRf-XZ)c{51_~fts-;59kzHQZ=Eu_WtwxMyVh*%)?GMb@Y3FdnrlC zf@UcRXr|TjqWvlg^EsfwF7D^yWZPkz8XpoAXlv6Bm!@#)g zqaL##vOo-CEVFeMC?v?CiE4&}PIx!D;8)^M%KQ&4=M*E^PFqr9d0)@FVn8P7# z=5J$Tf0PEjP4P+I^kHxKSd@&NXHJp~mW9Pw&c$U63-epWbX4m` zF_7!2f_kspARPkFR%}h%G>@kYsg?kPYF59!=mBKtg{Ac@fK_PS?&cWq&kKN!f4l&E zn=(i@3T}4T$YNnQz}ncjg-Bs_P1D%6m;1YNwLmbxerHPzfmBiP&km%>m!-o zhQlysdbm0b97E}J%yUq`uYk^Fo}s>fa?fBEjAPuRf1li=I|cJNs`CuyF)qqH=B1g( zd1ch2pmSjV;^brhB%c$r;8@4l$NNs%2N#bB?z7kjW`9Zgu`f(N=(Vwrbr$YloPK^j zcb&Wlct`2yJALvpE%D@4R08yEp1uF^F1rD8FHAwkYoj217WR))(B)qbI@VJo^5XTm z=beWRm4{U96+ioUGKo=F`{$0`TOw=+l8u+NW^^c>5;%INQRi=Nh_k z0~=GUx~}WF{rwz9PATps)OJzXu9x%yTaen8yJdSWe>k4wJ{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0G_bu}lxU-lpODR>yN{(>F02XAL68m<{}sC?5r@+}m($k;z{Njb0AA8Rv`72w zTXYZ&owtW*&g**Zsu_RfBroB-khUsE{oU1{dEW+Dvr;9Ay)&hp-Zbs%i&K9D== zPEz|C+nbX@=Fo-K__sU}aKhS@lz)-C`Cs|BlB!Ro)9cY(9jd}Lr*H_ooJ{*s zfW=%T>6YxvR|9Hl?so+#>#UHn&kZT>oncBtC!@-GLsYr%995okR#>@bh822msB%u< ztDHB4)q6kxS;2XCEC0;6vfdl6@X5Hcg15ny6`1e+2xy-bROiMNdiLYYbg+InKwg5* z*MiClEcawcO?*!I5s2~vcLJ+FDWV<=+zC0rDDa<1C5EyXSJb%d{Bcc=8oU3(LYgSi zj0m3WuF$nC&}(?O*Cw*vrcPhnXewtBi4tI4BEaD7zkjjClr7O1Y{AIQG8@pysfzr5(5ZaXtW z-p5pL9ZcojQGB1!?M1hc1?g5+kQJ?R3U=$HHjD-1G371Gt$rg`llJ;r^lKI2AJ)?ri>)0MtEv5b9KI8E+{QKjluBk>*_z&ZE zeLs`}WWhF24qc;{7pzezTN@F#Nd`EPm+imqvJ|l0F-F2Nq5Y)ww4BzL>68EeAda#` zDj8oylBS=fkwNosCQU?2Z!4SiYwLy4xY2g+ftNF*jX^b99TaLx7Bro!e=KNDm7@w@ zakeQk7SjfIY9HAV4#iaKNAgJ6ZMDtP3L@5BcIz#yy(O-GH%st7gt%NCc3e0|e5kmC zy{#JZO-jR@&-WWm_Xa)ob2T)=#W}(xFNd92*0De=2zHDQaMEf!<#rM3kYbKA|?4I&v z%C;T92C}vw(Va|59)~1?zPXWc?!Y3;UGeMVjXcLISa+^%I4ElNHB!*EugIs?QRRy! z-)gqz*Mc4SVbq9Z;;aDme`NL;g!+(`3*9^Fe;rm=w-+-Bm)nc~01Nb>KKdg70FX9& APyhe` literal 0 HcmV?d00001 diff --git a/icons/oxsc-action-kdenlive-object-width.svgz b/icons/oxsc-action-kdenlive-object-width.svgz new file mode 100644 index 0000000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 zY}M$?LRKauxECo&LZ1Y{n@bVrrdS{;e~JCwjVs|B6ZUzrglrowCount(); i++) { + if (keyframe_list->item(i, col)) keyframes.append(QString::number(m_timecode.getFrameCount(keyframe_list->verticalHeaderItem(i)->text())) + ':' + keyframe_list->item(i, col)->text() + ';'); + } + m_params[col].setAttribute("keyframes", keyframes); } emit parameterChanged(); } diff --git a/src/renderwidget.cpp b/src/renderwidget.cpp index d815d1c2..100af343 100644 --- a/src/renderwidget.cpp +++ b/src/renderwidget.cpp @@ -840,7 +840,7 @@ void RenderWidget::checkRenderStatus() if (item->data(1, Qt::UserRole + 2).toInt() == WAITINGJOB) { item->setData(1, Qt::UserRole + 1, QTime::currentTime()); waitingJob = true; - startRendering(item); + startRendering(item); break; } item = m_view.running_jobs->itemBelow(item); @@ -851,17 +851,17 @@ void RenderWidget::checkRenderStatus() void RenderWidget::startRendering(QTreeWidgetItem *item) { if (item->data(1, Qt::UserRole + 4).isNull()) { - // Normal render process - if (QProcess::startDetached(m_renderer, item->data(1, Qt::UserRole + 3).toStringList()) == false) { - item->setData(1, Qt::UserRole + 2, FINISHEDJOB); - item->setData(1, Qt::UserRole, i18n("Rendering crashed")); - item->setIcon(0, KIcon("dialog-close")); - item->setData(2, Qt::UserRole, 100); + // Normal render process + if (QProcess::startDetached(m_renderer, item->data(1, Qt::UserRole + 3).toStringList()) == false) { + item->setData(1, Qt::UserRole + 2, FINISHEDJOB); + item->setData(1, Qt::UserRole, i18n("Rendering crashed")); + item->setIcon(0, KIcon("dialog-close")); + item->setData(2, Qt::UserRole, 100); } else KNotification::event("RenderStarted", i18n("Rendering %1 started", item->text(1)), QPixmap(), this); } else { - // Script item + // Script item if (QProcess::startDetached(item->data(1, Qt::UserRole + 3).toString()) == false) { - item->setData(1, Qt::UserRole + 2, FINISHEDJOB); + item->setData(1, Qt::UserRole + 2, FINISHEDJOB); item->setData(1, Qt::UserRole, i18n("Rendering crashed")); item->setIcon(0, KIcon("dialog-close")); item->setData(2, Qt::UserRole, 100); @@ -1461,7 +1461,7 @@ void RenderWidget::slotStartCurrentJob() { QTreeWidgetItem *current = m_view.running_jobs->currentItem(); if (current && current->data(1, Qt::UserRole + 2).toInt() == WAITINGJOB) - startRendering(current); + startRendering(current); m_view.start_job->setEnabled(false); } @@ -1472,12 +1472,11 @@ void RenderWidget::slotCheckJob() if (current) { if (current->data(1, Qt::UserRole + 2).toInt() == RUNNINGJOB) { m_view.abort_job->setText(i18n("Abort Job")); - m_view.start_job->setEnabled(false); - } - else { - m_view.abort_job->setText(i18n("Remove Job")); - m_view.start_job->setEnabled(current->data(1, Qt::UserRole + 2).toInt() == WAITINGJOB); - } + m_view.start_job->setEnabled(false); + } else { + m_view.abort_job->setText(i18n("Remove Job")); + m_view.start_job->setEnabled(current->data(1, Qt::UserRole + 2).toInt() == WAITINGJOB); + } activate = true; } m_view.abort_job->setEnabled(activate); diff --git a/src/titlewidget.cpp b/src/titlewidget.cpp index 931b5d8f..a9560b75 100644 --- a/src/titlewidget.cpp +++ b/src/titlewidget.cpp @@ -187,31 +187,31 @@ TitleWidget::TitleWidget(KUrl url, Timecode tc, QString projectTitlePath, Render m_unicodeAction->setToolTip(i18n("Insert Unicode character") + ' ' + m_unicodeAction->shortcut().toString()); connect(m_unicodeAction, SIGNAL(triggered()), this, SLOT(slotInsertUnicode())); buttonInsertUnicode->setDefaultAction(m_unicodeAction); - + m_zUp = new QAction(KIcon("kdenlive-zindex-up"), QString(), this); m_zUp->setShortcut(Qt::Key_PageUp); m_zUp->setToolTip(i18n("Raise object")); connect(m_zUp, SIGNAL(triggered()), this, SLOT(slotZIndexUp())); zUp->setDefaultAction(m_zUp); - + m_zDown = new QAction(KIcon("kdenlive-zindex-down"), QString(), this); m_zDown->setShortcut(Qt::Key_PageDown); m_zDown->setToolTip(i18n("Lower object")); connect(m_zDown, SIGNAL(triggered()), this, SLOT(slotZIndexDown())); zDown->setDefaultAction(m_zDown); - + m_zTop = new QAction(KIcon("kdenlive-zindex-top"), QString(), this); m_zTop->setShortcut(Qt::Key_Home); m_zTop->setToolTip(i18n("Raise object to top")); connect(m_zTop, SIGNAL(triggered()), this, SLOT(slotZIndexTop())); zTop->setDefaultAction(m_zTop); - + m_zBottom = new QAction(KIcon("kdenlive-zindex-bottom"), QString(), this); m_zBottom->setShortcut(Qt::Key_End); m_zBottom->setToolTip(i18n("Lower object to bottom")); connect(m_zBottom, SIGNAL(triggered()), this, SLOT(slotZIndexBottom())); zBottom->setDefaultAction(m_zBottom); - + zDown->setIcon(KIcon("kdenlive-zindex-down")); zTop->setIcon(KIcon("kdenlive-zindex-top")); zBottom->setIcon(KIcon("kdenlive-zindex-bottom")); @@ -771,7 +771,7 @@ void TitleWidget::selectionChanged() effect_stack->setHidden(true); } #else - effect_list->blockSignals(true); + effect_list->blockSignals(true); effect_list->setCurrentIndex(effect_list->findData((int) NOEFFECT)); effect_list->blockSignals(false); effect_stack->setHidden(true); @@ -966,7 +966,7 @@ void TitleWidget::updateDimension(QGraphicsItem *i) value_h->blockSignals(true); zValue->blockSignals(true); - zValue->setValue((int) i->zValue()); + zValue->setValue((int) i->zValue()); if (i->type() == IMAGEITEM) { // Get multipliers for rotation/scaling @@ -989,7 +989,7 @@ void TitleWidget::updateDimension(QGraphicsItem *i) value_h->setValue((int) t->boundingRect().height()); } - zValue->blockSignals(false); + zValue->blockSignals(false); value_w->blockSignals(false); value_h->blockSignals(false); } @@ -1841,7 +1841,7 @@ void TitleWidget::slotAddEffect(int ix) QList l = graphicsView->scene()->selectedItems(); int effect = effect_list->itemData(ix).toInt(); if (effect == NOEFFECT) { - if (l.size() == 1) l[0]->setData(100, QVariant()); + if (l.size() == 1) l[0]->setData(100, QVariant()); effect_stack->setHidden(true); return; } @@ -1927,83 +1927,83 @@ void TitleWidget::slotEditShadow() qreal TitleWidget::zIndexBounds(bool maxBound) { - qreal bound = maxBound? -99 : 99; - QList l = graphicsView->scene()->selectedItems(); - if (l.size() > 0) { - QList lItems = graphicsView->scene()->items(l[0]->sceneBoundingRect(), Qt::IntersectsItemShape); - if (lItems.size() > 0) { - int n = lItems.size(); - qreal z; - if (maxBound) { - for (int i = 0; i < n; i++) { - z = lItems[i]->zValue(); - if (z > bound && !lItems[i]->isSelected()) { - bound = z; - } - } - } else { - // Get minimum z index. - for (int i = 0; i < n; i++) { - z = lItems[i]->zValue(); - if (z < bound && !lItems[i]->isSelected() && z > -999) { - // There are items at the very bottom (background e.g.) with z-index < -1000. - bound = z; - } - } - } - } - } - return bound; -} - -void TitleWidget::slotZIndexUp() + qreal bound = maxBound ? -99 : 99; + QList l = graphicsView->scene()->selectedItems(); + if (l.size() > 0) { + QList lItems = graphicsView->scene()->items(l[0]->sceneBoundingRect(), Qt::IntersectsItemShape); + if (lItems.size() > 0) { + int n = lItems.size(); + qreal z; + if (maxBound) { + for (int i = 0; i < n; i++) { + z = lItems[i]->zValue(); + if (z > bound && !lItems[i]->isSelected()) { + bound = z; + } + } + } else { + // Get minimum z index. + for (int i = 0; i < n; i++) { + z = lItems[i]->zValue(); + if (z < bound && !lItems[i]->isSelected() && z > -999) { + // There are items at the very bottom (background e.g.) with z-index < -1000. + bound = z; + } + } + } + } + } + return bound; +} + +void TitleWidget::slotZIndexUp() { QList l = graphicsView->scene()->selectedItems(); if (l.size() >= 1) { - qreal currentZ = l[0]->zValue(); - qreal max = zIndexBounds(true); - if (currentZ <= max) { - l[0]->setZValue(currentZ+1); - updateDimension(l[0]); - } + qreal currentZ = l[0]->zValue(); + qreal max = zIndexBounds(true); + if (currentZ <= max) { + l[0]->setZValue(currentZ + 1); + updateDimension(l[0]); + } } } -void TitleWidget::slotZIndexTop() +void TitleWidget::slotZIndexTop() { QList l = graphicsView->scene()->selectedItems(); if (l.size() >= 1) { - qreal currentZ = l[0]->zValue(); - qreal max = zIndexBounds(true); - if (currentZ <= max) { - l[0]->setZValue(max+1); - updateDimension(l[0]); - } + qreal currentZ = l[0]->zValue(); + qreal max = zIndexBounds(true); + if (currentZ <= max) { + l[0]->setZValue(max + 1); + updateDimension(l[0]); + } } } -void TitleWidget::slotZIndexDown() +void TitleWidget::slotZIndexDown() { QList l = graphicsView->scene()->selectedItems(); if (l.size() >= 1) { - qreal currentZ = l[0]->zValue(); - qreal min = zIndexBounds(false); - if (currentZ >= min) { - l[0]->setZValue(currentZ-1); - updateDimension(l[0]); - } + qreal currentZ = l[0]->zValue(); + qreal min = zIndexBounds(false); + if (currentZ >= min) { + l[0]->setZValue(currentZ - 1); + updateDimension(l[0]); + } } } -void TitleWidget::slotZIndexBottom() +void TitleWidget::slotZIndexBottom() { QList l = graphicsView->scene()->selectedItems(); if (l.size() >= 1) { - qreal currentZ = l[0]->zValue(); - qreal min = zIndexBounds(false); - if (currentZ >= min) { - l[0]->setZValue(min-1); - updateDimension(l[0]); - } + qreal currentZ = l[0]->zValue(); + qreal min = zIndexBounds(false); + if (currentZ >= min) { + l[0]->setZValue(min - 1); + updateDimension(l[0]); + } } } diff --git a/src/titlewidget.h b/src/titlewidget.h index cfafd897..c7708a3b 100644 --- a/src/titlewidget.h +++ b/src/titlewidget.h @@ -160,7 +160,7 @@ private: void updateInfoText(); /** \brief Remove the "start" and "end" info text from animation viewports */ void deleteAnimInfoText(); - + qreal maxZIndex(); qreal zIndexBounds(bool maxBound); @@ -267,7 +267,7 @@ private slots: void slotEditBlur(int ix); void slotEditShadow(); void slotEditTypewriter(int ix); - + /** \brief Changes the z index of objects. */ void slotZIndexUp(); void slotZIndexDown(); diff --git a/src/widgets/titlewidget_ui.ui b/src/widgets/titlewidget_ui.ui index 440d3fee..5b43801e 100644 --- a/src/widgets/titlewidget_ui.ui +++ b/src/widgets/titlewidget_ui.ui @@ -103,7 +103,7 @@ - + W @@ -136,6 +136,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -155,34 +183,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- 2.39.2