Compare commits

...

12 Commits

Author SHA1 Message Date
Jean-Baptiste Mardelle
0410c3f53c Fix timeline corruption when using scroll wheel over an item in zoomed view 2015-05-27 22:44:47 +02:00
Jean-Baptiste Mardelle
85afb7ccda Fix timeline corruption: Don't allow scrolling while resizing a clip 2015-05-24 11:34:11 +02:00
Jean-Baptiste Mardelle
f977531b98 Get ready for release 2015-05-24 10:54:01 +02:00
Jean-Baptiste Mardelle
9aad1a70b0 Fix saving of custom transcoding settings
BUG: 348151
2015-05-24 10:53:15 +02:00
Jean-Baptiste Mardelle
6f38d6d4ca Fix timeline corruption when zooming with mouse wheel over selected item
Fix transitions appearing behind grouped clips
2015-05-24 10:25:07 +02:00
Jean-Baptiste Mardelle
341314cc18 Color scheme fix for status bar 2015-05-24 00:05:01 +02:00
Jean-Baptiste Mardelle
7fdcaa02ba Development mode re-enabled 2015-05-17 11:37:37 +02:00
Jean-Baptiste Mardelle
cf70641750 Fix custom profiles not displayed
BUG: 347822
2015-05-17 11:34:20 +02:00
Jean-Baptiste Mardelle
1195bb5fb2 Fix markers and guides corrupted on locales with comma separator
BUG: 347391
2015-05-12 22:35:50 +02:00
l10n daemon script
78e4b18c09 SVN_SILENT made messages (after extraction) 2015-05-08 11:12:43 +00:00
Jean-Baptiste Mardelle
96f64cfa4d Fix titleclip text position and outline width incorrectly saved on some locales
CCBUG: 347181
2015-05-04 23:42:42 +02:00
Jean-Baptiste Mardelle
375e4b3545 Improve bookmark compatibility (based on comment from Emmanuel Pescosta) 2015-05-04 21:33:42 +02:00
18 changed files with 141 additions and 81 deletions

View File

@@ -2,7 +2,7 @@ project(Kdenlive)
# An odd patch version number means development version, while an even one means
# stable release. An additional number can be used for bugfix-only releases.
set(KDENLIVE_VERSION 15.04.1)
set(KDENLIVE_VERSION 15.04.2)
cmake_minimum_required(VERSION 2.8.12)
# Minimum versions of main dependencies.
set(MLT_MIN_MAJOR_VERSION 0)

View File

@@ -11,6 +11,7 @@
<name xml:lang="de">Kdenlive</name>
<name xml:lang="en-GB">Kdenlive</name>
<name xml:lang="es">Kdenlive</name>
<name xml:lang="fi">Kdenlive</name>
<name xml:lang="it">Kdenlive</name>
<name xml:lang="nl">Kdenlive</name>
<name xml:lang="pl">Kdenlive</name>
@@ -32,6 +33,7 @@
<summary xml:lang="cs">Editor videí</summary>
<summary xml:lang="de">Video-Editor</summary>
<summary xml:lang="en-GB">Video Editor</summary>
<summary xml:lang="fi">Videoeditori</summary>
<summary xml:lang="it">Editor video</summary>
<summary xml:lang="nl">Videobewerker</summary>
<summary xml:lang="pl">Edytor wideo</summary>
@@ -49,6 +51,7 @@
<p>Kdenlive is a non linear video editor. It is based on the MLT framework and accepts many audio and video formats, allows you to add effects, transitions and render into the format of your choice.</p>
<p xml:lang="ca">El Kdenlive és un editor no lineal de vídeo. Està basat en l'entorn de treball MLT i accepta molts formats d'àudio i vídeo, permetent afegir efectes, transicions i representacions en el format de la vostra elecció.</p>
<p xml:lang="en-GB">Kdenlive is a non linear video editor. It is based on the MLT framework and accepts many audio and video formats, allows you to add effects, transitions and render into the format of your choice.</p>
<p xml:lang="fi">Kdenlive on epälineaarinen videoeditori. Se perustuu MLT-frameworkiin ja toimii monen eri ääni- ja videoformaatin kanssa. Voit lisätä efektejä ja siirtymiä, sekä renderöidä projektin haluamaasi tiedostomuotoon.</p>
<p xml:lang="it">Kdenlive è un editor video non lineare. È basato sull'infrastruttura MLT e accetta numerosi formati audio e video, consente di aggiungere effetti, transizioni e produrre il formato che si desidera.</p>
<p xml:lang="nl">Kdenlive is een niet lineaire videobewerker. Het is gebaseerd op het MLT-framework en accepteert vele audio- en video-formaten, biedt de mogelijkheid effecten en overgangen toe te voegen en om te zetten naar het formaat van uw keuze.</p>
<p xml:lang="pl">Kdenlive jest nieliniowym edytorem wideo. Oparty jest na szkielecie MLT i może pracować na wielu formatach obrazu i dźwięku, umożliwia dodawanie efektów, przejść i renderowanie ich do dowolnego formatu.</p>
@@ -70,6 +73,7 @@
<p xml:lang="cs">Vlastnosti:</p>
<p xml:lang="de">Funktionen:</p>
<p xml:lang="en-GB">Features:</p>
<p xml:lang="fi">Ominaisuuksia:</p>
<p xml:lang="it">Funzionalità:</p>
<p xml:lang="nl">Mogelijkheden:</p>
<p xml:lang="pl">Możliwości:</p>
@@ -88,6 +92,7 @@
<li xml:lang="ca">Interfície multipista intuïtiva.</li>
<li xml:lang="de">Intuitive Benutzerschnittstelle für mehrere Spuren.</li>
<li xml:lang="en-GB">Intuitive multitrack interface.</li>
<li xml:lang="fi">Selkeä moniraitainen käyttöliittymä</li>
<li xml:lang="it">Interfaccia multitraccia intuitiva.</li>
<li xml:lang="nl">Intuïtief interface met meerdere tracks.</li>
<li xml:lang="pl">Intuicyjny interfejs wielościeżkowy.</li>
@@ -106,6 +111,7 @@
<li xml:lang="ca">Molts efectes i transicions.</li>
<li xml:lang="de">Viele Effekte und Übergänge.</li>
<li xml:lang="en-GB">Many effects and transitions.</li>
<li xml:lang="fi">Monia erilaisia efektejä ja siirtymiä</li>
<li xml:lang="it">Numerosi effetti e transizioni.</li>
<li xml:lang="nl">Veel effecten en overgangen.</li>
<li xml:lang="pl">Wiele efektów i przejść.</li>
@@ -123,6 +129,7 @@
<li xml:lang="ar">نطاقات الألوان</li>
<li xml:lang="ca">Àmbits de color</li>
<li xml:lang="en-GB">Colour scopes</li>
<li xml:lang="fi">Väriavaruuksien säätömahdollisuus</li>
<li xml:lang="it">Diagrammi di colore</li>
<li xml:lang="nl">Kleurreeksen</li>
<li xml:lang="pl">Zakresy barw</li>
@@ -141,6 +148,7 @@
<li xml:lang="ast">Encontu básicu pa DVD</li>
<li xml:lang="ca">Assistent bàsic per als DVD</li>
<li xml:lang="en-GB">Basic DVD Wizard</li>
<li xml:lang="fi">Yksinkertainen DVD:n luonti</li>
<li xml:lang="it">Procedura guidata di base DVD</li>
<li xml:lang="nl">Basis dvd-assistent</li>
<li xml:lang="pl">Pomocnik podstawowego DVD</li>

View File

@@ -54,19 +54,20 @@ const QString stopmotionMonitor("stopmotionMonitor");
enum OperationType {
None = 0,
MoveOperation = 1,
ResizeStart = 2,
ResizeEnd = 3,
FadeIn = 4,
FadeOut = 5,
TransitionStart = 6,
TransitionEnd = 7,
MoveGuide = 8,
KeyFrame = 9,
Seek = 10,
Spacer = 11,
RubberSelection = 12,
ScrollTimeline = 13
MoveOperation,
ResizeStart,
ResizeEnd,
FadeIn,
FadeOut,
TransitionStart,
TransitionEnd,
MoveGuide,
KeyFrame,
Seek,
Spacer,
RubberSelection,
ScrollTimeline,
ZoomTimeline
};
enum ClipType {

View File

@@ -850,8 +850,9 @@ void KdenliveSettingsDialog::loadTranscodeProfiles()
void KdenliveSettingsDialog::saveTranscodeProfiles()
{
KSharedConfigPtr config = KSharedConfig::openConfig(QStandardPaths::locate(QStandardPaths::DataLocation, "kdenlivetranscodingrc"), KConfig::CascadeConfig);
//KSharedConfigPtr config = KSharedConfig::openConfig();
QString transcodeFile = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/kdenlivetranscodingrc";
KSharedConfigPtr config = KSharedConfig::openConfig(transcodeFile);
KConfigGroup transConfig(config, "Transcoding");
// read the entries
transConfig.deleteGroup();

View File

@@ -312,7 +312,7 @@ bool ProfilesDialog::existingProfileDescription(const QString &desc)
}
// List custom profiles
QStringList customProfiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, "profiles");
QStringList customProfiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, "/profiles/", QStandardPaths::LocateDirectory);
for (int i = 0; i < customProfiles.size(); ++i) {
QDir customDir(customProfiles.at(i));
profilesFiles = customDir.entryList(profilesFilter, QDir::Files);
@@ -350,7 +350,7 @@ QString ProfilesDialog::existingProfile(const MltVideoProfile &profile)
}
// Check custom profiles
QStringList customProfiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, "profiles");
QStringList customProfiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, "/profiles/", QStandardPaths::LocateDirectory);
for (int i = 0; i < customProfiles.size(); ++i) {
profilesFiles = QDir(customProfiles.at(i)).entryList(profilesFilter, QDir::Files);
for (int j = 0; j < profilesFiles.size(); ++j) {
@@ -388,7 +388,7 @@ QMap <QString, QString> ProfilesDialog::getProfilesInfo()
}
// List custom profiles
QStringList customProfiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, "profiles");
QStringList customProfiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, "/profiles/", QStandardPaths::LocateDirectory);
for (int i = 0; i < customProfiles.size(); ++i) {
profilesFiles = QDir(customProfiles.at(i)).entryList(profilesFilter, QDir::Files);
for (int j = 0; j < profilesFiles.size(); ++j) {
@@ -457,7 +457,7 @@ QMap <QString, QString> ProfilesDialog::getProfilesFromProperties(int width, int
}
// List custom profiles
QStringList customProfiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, "profiles");
QStringList customProfiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, "/profiles/", QStandardPaths::LocateDirectory);
for (int i = 0; i < customProfiles.size(); ++i) {
QStringList profiles = QDir(customProfiles.at(i)).entryList(profilesFilter, QDir::Files);
for (int j = 0; j < profiles.size(); ++j) {

View File

@@ -588,7 +588,7 @@ void KdenliveDoc::syncGuides(const QList <Guide *> &guides)
for (int i = 0; i < guides.count(); ++i) {
e = m_guidesXml.createElement("guide");
e.setAttribute("time", guides.at(i)->position().ms() / 1000);
e.setAttribute("time", QString::number(guides.at(i)->position().ms() / 1000));
e.setAttribute("comment", guides.at(i)->label());
guideNode.appendChild(e);
}
@@ -769,7 +769,7 @@ QDomDocument KdenliveDoc::xmlSceneList(const QString &scene, const QStringList &
QList < CommentedTime > marks = list.at(i)->commentedSnapMarkers();
for (int j = 0; j < marks.count(); ++j) {
QDomElement marker = sceneList.createElement("marker");
marker.setAttribute("time", marks.at(j).time().ms() / 1000);
marker.setAttribute("time", QString::number(marks.at(j).time().ms() / 1000));
marker.setAttribute("comment", marks.at(j).comment());
marker.setAttribute("id", e.attribute("id"));
marker.setAttribute("type", marks.at(j).markerType());
@@ -1669,7 +1669,7 @@ void KdenliveDoc::updateProjectFolderPlacesEntry()
*/
const QString file = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/user-places.xbel";
KBookmarkManager *bookmarkManager = KBookmarkManager::managerForFile(file, "kfilePlaces");
KBookmarkManager *bookmarkManager = KBookmarkManager::managerForExternalFile(file);
if (!bookmarkManager) return;
KBookmarkGroup root = bookmarkManager->root();

View File

@@ -458,7 +458,7 @@ void MainWindow::slotThemeChanged(const QString &theme)
KSharedConfigPtr config = KSharedConfig::openConfig(theme);
setPalette(KColorScheme::createApplicationPalette(config));
qApp->setPalette(palette());
KdenliveSettings::setColortheme(ThemeManager::instance()->currentThemeName());
KdenliveSettings::setColortheme(theme);
QPalette plt = palette();
if (m_effectStack) m_effectStack->updatePalette();
if (m_effectList) m_effectList->updatePalette();

View File

@@ -44,9 +44,9 @@ StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) :
m_closeButton(0)
{
setMinimumHeight(KIconLoader::SizeSmall);
QPalette palette;
/*QPalette palette);
palette.setColor(QPalette::Background, Qt::transparent);
setPalette(palette);
setPalette(palette);*/
m_closeButton = new QPushButton(i18nc("@action:button", "Confirm"), this);
m_closeButton->hide();
@@ -224,7 +224,7 @@ void StatusBarMessageLabel::paintEvent(QPaintEvent*)
backgroundColor = KStatefulBrush(KColorScheme::Window, KColorScheme::NegativeBackground, KSharedConfig::openConfig(KdenliveSettings::colortheme())).brush(this).color();
}
if (m_state == Desaturate && m_illumination > 0) {
backgroundColor.setAlpha(m_illumination * 2);
backgroundColor.setAlpha(qMax(m_illumination * 2, 255));
}
painter.fillRect(0, 0, width(), height(), backgroundColor);
@@ -238,7 +238,7 @@ void StatusBarMessageLabel::paintEvent(QPaintEvent*)
}
// draw text
painter.setPen(palette().windowText().color());
painter.setPen(palette().text().color());
int flags = Qt::AlignVCenter;
if (height() > m_minTextHeight) {
flags = flags | Qt::TextWordWrap;

View File

@@ -184,10 +184,20 @@ void AbstractGroupItem::paint(QPainter *p, const QStyleOptionGraphicsItem *optio
QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant &value)
{
if (change == QGraphicsItem::ItemSelectedChange) {
if (value.toBool()) setZValue(10);
if (value.toBool()) setZValue(3);
else setZValue(1);
}
if (change == ItemPositionChange && scene() && parentItem() == 0) {
CustomTrackScene *scene = NULL;
if (change == ItemPositionChange && parentItem() == 0) {
scene = projectScene();
}
if (scene) {
// calculate new position.
if (scene->isZooming) {
// For some reason, mouse wheel on selected itm sometimes triggered
// a position change event corrupting timeline, so discard it
return pos();
}
// calculate new position.
const int trackHeight = KdenliveSettings::trackheight();
QPointF start = sceneBoundingRect().topLeft();
@@ -277,7 +287,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant
QPainterPath shape;
if (projectScene()->editMode() == NormalEdit) {
shape = clipGroupShape(newPos - pos());
collidingItems = scene()->items(shape, Qt::IntersectsItemShape);
collidingItems = scene->items(shape, Qt::IntersectsItemShape);
collidingItems.removeAll(this);
for (int i = 0; i < children.count(); ++i) {
if (children.at(i)->type() == GroupWidget) {
@@ -315,7 +325,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant
newPos.setX(newPos.x() + offset);
}
// If there is still a collision after our position adjust, restore original pos
collidingItems = scene()->items(clipGroupShape(newPos - pos()), Qt::IntersectsItemShape);
collidingItems = scene->items(clipGroupShape(newPos - pos()), Qt::IntersectsItemShape);
collidingItems.removeAll(this);
for (int i = 0; i < children.count(); ++i) {
if (children.at(i)->type() == GroupWidget) {
@@ -333,7 +343,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant
if (projectScene()->editMode() == NormalEdit) {
shape = transitionGroupShape(newPos - pos());
collidingItems = scene()->items(shape, Qt::IntersectsItemShape);
collidingItems = scene->items(shape, Qt::IntersectsItemShape);
collidingItems.removeAll(this);
for (int i = 0; i < children.count(); ++i) {
if (children.at(i)->type() == GroupWidget) {
@@ -372,7 +382,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant
newPos.setX(newPos.x() + offset);
}
// If there is still a collision after our position adjust, restore original pos
collidingItems = scene()->items(transitionGroupShape(newPos - pos()), Qt::IntersectsItemShape);
collidingItems = scene->items(transitionGroupShape(newPos - pos()), Qt::IntersectsItemShape);
for (int i = 0; i < children.count(); ++i) {
collidingItems.removeAll(children.at(i));
}

View File

@@ -1368,23 +1368,32 @@ QVariant ClipItem::itemChange(GraphicsItemChange change, const QVariant &value)
{
if (change == QGraphicsItem::ItemSelectedChange) {
if (value.toBool())
setZValue(10);
setZValue(3);
else
setZValue(2);
}
if (change == ItemPositionChange && scene()) {
CustomTrackScene *scene = NULL;
if (change == ItemPositionChange) {
scene = projectScene();
}
if (scene) {
// calculate new position.
//if (parentItem()) return pos();
if (scene->isZooming) {
// For some reason, mouse wheel on selected itm sometimes triggered
// a position change event corrupting timeline, so discard it
return pos();
}
if (property("resizingEnd").isValid()) return pos();
QPointF newPos = value.toPointF();
////qDebug() << "/// MOVING CLIP ITEM.------------\n++++++++++";
int xpos = projectScene()->getSnapPointForPos((int) newPos.x(), KdenliveSettings::snaptopoints());
int xpos = scene->getSnapPointForPos((int) newPos.x(), KdenliveSettings::snaptopoints());
xpos = qMax(xpos, 0);
newPos.setX(xpos);
// Warning: newPos gives a position relative to the click event, so hack to get absolute pos
int yOffset = property("y_absolute").toInt() + newPos.y();
int newTrack = yOffset / KdenliveSettings::trackheight();
newTrack = qMin(newTrack, projectScene()->tracksCount() - 1);
newTrack = qMin(newTrack, scene->tracksCount() - 1);
newTrack = qMax(newTrack, 0);
QStringList lockedTracks = property("locked_tracks").toStringList();
if (lockedTracks.contains(QString::number(newTrack))) {
@@ -1396,8 +1405,8 @@ QVariant ClipItem::itemChange(GraphicsItemChange change, const QVariant &value)
QRectF sceneShape = rect();
sceneShape.translate(newPos);
QList<QGraphicsItem*> items;
if (projectScene()->editMode() == NormalEdit) {
items = scene()->items(sceneShape, Qt::IntersectsItemShape);
if (scene->editMode() == NormalEdit) {
items = scene->items(sceneShape, Qt::IntersectsItemShape);
}
items.removeAll(this);
bool forwardMove = newPos.x() > pos().x();
@@ -1425,7 +1434,7 @@ QVariant ClipItem::itemChange(GraphicsItemChange change, const QVariant &value)
sceneShape.translate(QPointF(offset, 0));
newPos.setX(newPos.x() + offset);
}
QList<QGraphicsItem*> subitems = scene()->items(sceneShape, Qt::IntersectsItemShape);
QList<QGraphicsItem*> subitems = scene->items(sceneShape, Qt::IntersectsItemShape);
subitems.removeAll(this);
for (int j = 0; j < subitems.count(); ++j) {
if (!subitems.at(j)->isEnabled()) continue;

View File

@@ -25,7 +25,8 @@ CustomTrackScene::CustomTrackScene(KdenliveDoc *doc, QObject *parent) :
QGraphicsScene(parent),
m_document(doc),
m_scale(1.0, 1.0),
m_editMode(NormalEdit)
m_editMode(NormalEdit),
isZooming(false)
{
}

View File

@@ -59,6 +59,7 @@ public:
MltVideoProfile profile() const;
void setEditMode(EditMode mode);
EditMode editMode() const;
bool isZooming;
private:
KdenliveDoc *m_document;

View File

@@ -315,14 +315,32 @@ bool CustomTrackView::checkTrackHeight()
void CustomTrackView::wheelEvent(QWheelEvent * e)
{
if (e->modifiers() == Qt::ControlModifier) {
if (e->delta() > 0) emit zoomIn();
else emit zoomOut();
if (m_operationMode == None || m_operationMode == ZoomTimeline) {
if (e->delta() > 0) emit zoomIn();
else emit zoomOut();
}
} else {
if (m_operationMode == ResizeStart || m_operationMode == ResizeEnd) {
// Don't allow scrolling + resizing
return;
}
if (m_operationMode == None || m_operationMode == ZoomTimeline) {
// Prevent unwanted object move
m_scene->isZooming = true;
}
if (e->delta() <= 0) horizontalScrollBar()->setValue(horizontalScrollBar()->value() + horizontalScrollBar()->singleStep());
else horizontalScrollBar()->setValue(horizontalScrollBar()->value() - horizontalScrollBar()->singleStep());
if (m_operationMode == None || m_operationMode == ZoomTimeline) {
m_scene->isZooming = false;
}
}
}
void CustomTrackView::setOperation(OperationType op)
{
m_operationMode = op;
}
int CustomTrackView::getPreviousVideoTrack(int track)
{
track = m_document->tracksCount() - track - 1;
@@ -501,7 +519,6 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event)
QGraphicsView::mouseMoveEvent(event);
return;
}
if (event->buttons() & Qt::MidButton) return;
if (dragMode() == QGraphicsView::RubberBandDrag || (event->modifiers() == Qt::ControlModifier && m_tool != SpacerTool && m_operationMode != ResizeStart && m_operationMode != ResizeEnd)) {
event->setAccepted(true);
@@ -512,7 +529,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event)
if (event->buttons() != Qt::NoButton) {
bool move = (event->pos() - m_clickEvent).manhattanLength() >= QApplication::startDragDistance();
if (m_dragItem && move) m_clipDrag = true;
if (m_dragItem && move && m_operationMode != ZoomTimeline) m_clipDrag = true;
if (m_dragItem && m_tool == SelectTool) {
if (m_operationMode == MoveOperation && m_clipDrag) {
QGraphicsView::mouseMoveEvent(event);
@@ -607,7 +624,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event)
return;
}
if (item && event->buttons() == Qt::NoButton) {
if (item && event->buttons() == Qt::NoButton && m_operationMode != ZoomTimeline) {
AbstractClipItem *clip = static_cast <AbstractClipItem*>(item);
if (m_tool == RazorTool) {
// razor tool over a clip, display current frame in monitor
@@ -1002,7 +1019,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event)
}
QGraphicsView::mousePressEvent(event);
event->ignore();
return;
return;
}
if (m_tool == SpacerTool) {
@@ -3664,15 +3681,14 @@ void CustomTrackView::completeSpaceOperation(int track, GenTime &timeOffset)
}
clearSelection();
m_operationMode = None;
m_operationMode = None;
return;
}
void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
{
if (m_moveOpMode == Seek) m_moveOpMode = None;
if (m_operationMode == ScrollTimeline) {
if (m_operationMode == ScrollTimeline || m_operationMode == ZoomTimeline) {
m_operationMode = None;
setDragMode(QGraphicsView::NoDrag);
QGraphicsView::mouseReleaseEvent(event);
@@ -5805,8 +5821,10 @@ void CustomTrackView::setTool(ProjectTool tool)
void CustomTrackView::setScale(double scaleFactor, double verticalScale)
{
QMatrix newmatrix;
newmatrix = newmatrix.scale(scaleFactor, verticalScale);
m_scene->isZooming = true;
m_scene->setScale(scaleFactor, verticalScale);
removeTipAnimation();
bool adjust = false;
@@ -5830,6 +5848,7 @@ void CustomTrackView::setScale(double scaleFactor, double verticalScale)
}
double verticalPos = mapToScene(QPoint(0, viewport()->height() / 2)).y();
centerOn(QPointF(cursorPos(), verticalPos));
m_scene->isZooming = false;
}
void CustomTrackView::slotRefreshGuides()

View File

@@ -220,6 +220,8 @@ public:
void createGroupForSelectedItems(QList<QGraphicsItem *> &selection);
void selectItemsRightOfFrame(int frame);
void resetSelectionGroup(bool selectItems = true);
/** @brief We are performing a timeline operation. */
void setOperation(OperationType op);
public slots:
/** @brief Send seek request to MLT. */

View File

@@ -37,7 +37,7 @@ Transition::Transition(const ItemInfo &info, int transitiontrack, double fps, co
m_automaticTransition(automaticTransition),
m_transitionTrack(transitiontrack)
{
setZValue(3);
setZValue(4);
m_info.cropDuration = info.endPos - info.startPos;
setPos(info.startPos.frames(fps), (int)(info.track * KdenliveSettings::trackheight() + itemOffset() + 1));
@@ -204,11 +204,20 @@ int Transition::type() const
QVariant Transition::itemChange(GraphicsItemChange change, const QVariant &value)
{
if (change == QGraphicsItem::ItemSelectedChange) {
if (value.toBool()) setZValue(10);
else setZValue(3);
if (value.toBool()) setZValue(5);
else setZValue(4);
}
if (change == ItemPositionChange && scene()) {
CustomTrackScene *scene = NULL;
if (change == ItemPositionChange) {
scene = projectScene();
}
if (scene) {
// calculate new position.
if (scene->isZooming) {
// For some reason, mouse wheel on selected itm sometimes triggered
// a position change event corrupting timeline, so discard it
return pos();
}
QPointF newPos = value.toPointF();
int xpos = projectScene()->getSnapPointForPos((int) newPos.x(), KdenliveSettings::snaptopoints());
xpos = qMax(xpos, 0);
@@ -228,7 +237,7 @@ QVariant Transition::itemChange(GraphicsItemChange change, const QVariant &value
QList<QGraphicsItem*> items;
// TODO: manage transitions in OVERWRITE MODE
//if (projectScene()->editMode() == NORMALEDIT)
items = scene()->items(sceneShape, Qt::IntersectsItemShape);
items = scene->items(sceneShape, Qt::IntersectsItemShape);
items.removeAll(this);
bool forwardMove = newPos.x() > pos().x();
@@ -256,7 +265,7 @@ QVariant Transition::itemChange(GraphicsItemChange change, const QVariant &value
sceneShape.translate(QPointF(offset, 0));
newPos.setX(newPos.x() + offset);
}
QList<QGraphicsItem*> subitems = scene()->items(sceneShape, Qt::IntersectsItemShape);
QList<QGraphicsItem*> subitems = scene->items(sceneShape, Qt::IntersectsItemShape);
subitems.removeAll(this);
for (int j = 0; j < subitems.count(); ++j) {
if (!subitems.at(j)->isEnabled()) continue;

View File

@@ -173,7 +173,7 @@ QDomDocument TitleDocument::xml(QGraphicsRectItem* startv, QGraphicsRectItem* en
cursor.select(QTextCursor::Document);
QColor fontcolor = cursor.charFormat().foreground().color();
content.setAttribute("font-color", colorToString(fontcolor));
if (!t->data(101).isNull()) content.setAttribute("font-outline", t->data(101).toDouble());
if (!t->data(101).isNull()) content.setAttribute("font-outline", QString::number(t->data(101).toDouble()));
if (!t->data(102).isNull()) {
QVariant variant = t->data(102);
QColor outlineColor = variant.value<QColor>();
@@ -183,7 +183,7 @@ QDomDocument TitleDocument::xml(QGraphicsRectItem* startv, QGraphicsRectItem* en
if (!t->data(100).isNull()) {
QStringList effectParams = t->data(100).toStringList();
QString effectName = effectParams.takeFirst();
content.setAttribute("textwidth", t->sceneBoundingRect().width());
content.setAttribute("textwidth", QString::number(t->sceneBoundingRect().width()));
content.setAttribute(effectName, effectParams.join(";"));
}
@@ -204,8 +204,8 @@ QDomDocument TitleDocument::xml(QGraphicsRectItem* startv, QGraphicsRectItem* en
// position
QDomElement pos = doc.createElement("position");
pos.setAttribute("x", item->pos().x());
pos.setAttribute("y", item->pos().y());
pos.setAttribute("x", QString::number(item->pos().x()));
pos.setAttribute("y", QString::number(item->pos().y()));
QTransform transform = item->transform();
QDomElement tr = doc.createElement("transform");
if (!item->data(ZOOMFACTOR).isNull()) {
@@ -230,7 +230,7 @@ QDomDocument TitleDocument::xml(QGraphicsRectItem* startv, QGraphicsRectItem* en
QDomElement effect = doc.createElement("effect");
if (blur) {
effect.setAttribute("type", "blur");
effect.setAttribute("blurradius", blur->blurRadius());
effect.setAttribute("blurradius", QString::number(blur->blurRadius()));
} /*else {
//WARNING:those effects are anyways broken because they use QPixmaps which are not safe for MLT's threaded workflow
QGraphicsDropShadowEffect *shadow = static_cast <QGraphicsDropShadowEffect *>(eff);

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>334</width>
<height>296</height>
<width>376</width>
<height>458</height>
</rect>
</property>
<property name="windowTitle">
@@ -243,26 +243,13 @@
</property>
</widget>
</item>
<item row="2" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="4" colspan="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
@@ -293,6 +280,19 @@
</property>
</widget>
</item>
<item row="2" column="2" colspan="2">
<spacer name="horizontalSpacer_2">
<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>
<customwidgets>

View File

@@ -111,13 +111,12 @@ QString ThemeManager::currentThemeName() const
: action->text().remove('&'));
}
void ThemeManager::setCurrentTheme(const QString& name)
void ThemeManager::setCurrentTheme(const QString& filename)
{
if (!d->themeMenuAction || !d->themeMenuActionGroup)
return;
QString name = d->themeMap.key(filename, d->defaultThemeName);
QList<QAction*> list = d->themeMenuActionGroup->actions();
foreach(QAction* const action, list)
{
if (action->text().remove('&') == name)