Commit 42cd79b5 authored by Nicolas Carion's avatar Nicolas Carion
Browse files

style

parent 5e7248e8
......@@ -100,5 +100,3 @@ QList<QModelIndex> AssetTreeModel::getChildrenIndexes()
return indexes;
}
......@@ -81,7 +81,6 @@ void AssetListWidget::activate(const QModelIndex &ix)
emit activateAsset(data);
}
bool AssetListWidget::showDescription() const
{
return KdenliveSettings::showeffectinfo();
......
......@@ -48,7 +48,7 @@ AssetParameterModel::AssetParameterModel(Mlt::Properties *asset, const QDomEleme
}
}
qDebug() << "XML parsing of "<<assetId<<". found : "<<nodeList.count();
qDebug() << "XML parsing of " << assetId << ". found : " << nodeList.count();
for (int i = 0; i < nodeList.count(); ++i) {
QDomElement currentParameter = nodeList.item(i).toElement();
......
......@@ -40,12 +40,11 @@ AssetParameterView::AssetParameterView(QWidget *parent)
void AssetParameterView::setModel(std::shared_ptr<AssetParameterModel> model)
{
qDebug()<<"set model "<<model.get();
qDebug() << "set model " << model.get();
unsetModel();
m_model = model;
connect(m_model.get(), &AssetParameterModel::dataChanged, this, &AssetParameterView::refresh);
for (int i = 0; i < model->rowCount(); ++i) {
QModelIndex index = model->index(i, 0);
auto w = AbstractParamWidget::construct(model, index, this);
......
......@@ -22,8 +22,8 @@
#ifndef MARKERLISTMODEL_H
#define MARKERLISTMODEL_H
#include "gentime.h"
#include "definitions.h"
#include "gentime.h"
#include "undohelper.hpp"
#include <QAbstractListModel>
......@@ -35,7 +35,6 @@
class DocUndoStack;
class SnapModel;
/* @brief This class is the model for a list of markers.
A marker is defined by a time, a type (the color used to represent it) and a comment string.
We store them in a sorted fashion using a std::map
......@@ -79,7 +78,8 @@ public:
Q_INVOKABLE bool hasMarker(int frame) const;
/* @brief Registers a snapModel to the marker model.
This is intended to be used for a guide model, so that the timelines can register their snapmodel to be updated when the guide moves. This is also used on the clip monitor to keep tracking the clip markers
This is intended to be used for a guide model, so that the timelines can register their snapmodel to be updated when the guide moves. This is also used
on the clip monitor to keep tracking the clip markers
The snap logic for clips is managed from the Timeline
Note that no deregistration is necessary, the weak_ptr will be discarded as soon as it becomes invalid.
*/
......
......@@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "mltcontroller/clipcontroller.h"
#include "mltcontroller/clippropertiescontroller.h"
#include "model/markerlistmodel.hpp"
#include "timeline2/model/snapmodel.hpp"
#include "profiles/profilemodel.hpp"
#include "project/projectcommands.h"
#include "project/projectmanager.h"
......@@ -41,6 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "projectsubclip.h"
#include "timecode.h"
#include "timeline/clip.h"
#include "timeline2/model/snapmodel.hpp"
#include "utils/KoIconUtils.h"
#include "kdenlive_debug.h"
......
......@@ -30,7 +30,6 @@
#include "effectslist/initeffects.h"
#include "kdenlivesettings.h"
#include "mainwindow.h"
#include "renderer.h"
#include "mltcontroller/bincontroller.h"
#include "mltcontroller/clipcontroller.h"
#include "mltcontroller/effectscontroller.h"
......@@ -38,6 +37,7 @@
#include "profiles/profilemodel.hpp"
#include "project/clipmanager.h"
#include "project/projectcommands.h"
#include "renderer.h"
#include "timeline/transitionhandler.h"
#include "titler/titlewidget.h"
#include "utils/KoIconUtils.h"
......@@ -71,8 +71,8 @@
const double DOCUMENTVERSION = 0.96;
KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGroup *undoGroup, const QString &profileName,
const QMap<QString, QString> &properties, const QMap<QString, QString> &metadata, const QPoint &tracks,
bool *openBackup, MainWindow *parent)
const QMap<QString, QString> &properties, const QMap<QString, QString> &metadata, const QPoint &tracks, bool *openBackup,
MainWindow *parent)
: QObject(parent)
, m_autosave(nullptr)
, m_url(url)
......@@ -588,7 +588,8 @@ void KdenliveDoc::slotAutoSave()
qCDebug(KDENLIVE_LOG) << "ERROR; CANNOT CREATE AUTOSAVE FILE";
}
// qCDebug(KDENLIVE_LOG) << "// AUTOSAVE FILE: " << m_autosave->fileName();
QDomDocument sceneList = xmlSceneList(pCore->monitorManager()->projectMonitor()->sceneList(m_url.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash).toLocalFile()));
QDomDocument sceneList =
xmlSceneList(pCore->monitorManager()->projectMonitor()->sceneList(m_url.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash).toLocalFile()));
if (sceneList.isNull()) {
// Make sure we don't save if scenelist is corrupted
KMessageBox::error(QApplication::activeWindow(), i18n("Cannot write to file %1, scene list is corrupted.", m_autosave->fileName()));
......@@ -1440,7 +1441,8 @@ QMap<QString, QString> KdenliveDoc::documentProperties()
m_projectFolder + QLatin1Char('/') + m_documentProperties.value(QStringLiteral("documentid")));
}
m_documentProperties.insert(QStringLiteral("profile"), profilePath());
m_documentProperties.insert(QStringLiteral("position"), QString::number(pCore->monitorManager()->projectMonitor()->position().frames(pCore->getCurrentFps())));
m_documentProperties.insert(QStringLiteral("position"),
QString::number(pCore->monitorManager()->projectMonitor()->position().frames(pCore->getCurrentFps())));
if (!m_documentProperties.contains(QStringLiteral("decimalPoint"))) {
m_documentProperties.insert(QStringLiteral("decimalPoint"), QLocale().decimalPoint());
}
......@@ -1759,8 +1761,8 @@ void KdenliveDoc::checkPreviewStack()
void KdenliveDoc::saveMltPlaylist(const QString &fileName)
{
//TODO REFAC
//m_render->preparePreviewRendering(fileName);
// TODO REFAC
// m_render->preparePreviewRendering(fileName);
}
void KdenliveDoc::initCacheDirs()
......@@ -1862,7 +1864,7 @@ std::shared_ptr<MarkerListModel> KdenliveDoc::getGuideModel() const
void KdenliveDoc::addGuides(QList<CommentedTime> &markers)
{
for (int i = 0; i < markers.count(); ++i) {
qDebug()<<"** *ADDING MARKERS: "<<markers.at(i).time().frames(25)<<", TYPE: "<<markers.at(i).markerType();
qDebug() << "** *ADDING MARKERS: " << markers.at(i).time().frames(25) << ", TYPE: " << markers.at(i).markerType();
if (markers.at(i).markerType() < 0) {
m_guideModel->removeMarker(markers.at(i).time());
} else {
......@@ -1870,4 +1872,3 @@ void KdenliveDoc::addGuides(QList<CommentedTime> &markers)
}
}
}
......@@ -66,4 +66,3 @@ QString EffectListWidget::getMimeType(const QString &assetId) const
Q_UNUSED(assetId);
return QStringLiteral("kdenlive/effect");
}
......@@ -2377,8 +2377,8 @@ void MainWindow::slotEditClipMarker()
pCore->bin()->slotAddClipMarker(id, QList<CommentedTime>() << d->newMarker());
QString hash = clip->getClipHash();
if (!hash.isEmpty()) {
pCore->projectManager()->current()->cacheImage(
hash + QLatin1Char('#') + QString::number(d->newMarker().time().frames(pCore->getCurrentFps())), d->markerImage());
pCore->projectManager()->current()->cacheImage(hash + QLatin1Char('#') + QString::number(d->newMarker().time().frames(pCore->getCurrentFps())),
d->markerImage());
}
if (d->newMarker().time() != pos) {
// remove old marker
......@@ -3629,7 +3629,6 @@ void MainWindow::slotShutdown()
}
}
void MainWindow::slotSwitchMonitors()
{
pCore->monitorManager()->slotSwitchMonitors(!m_clipMonitor->isActive());
......
......@@ -23,15 +23,15 @@
#include <QApplication>
#include <QOpenGLFunctions_3_2_Core>
#include <QPainter>
#include <QQuickItem>
#include <QQmlContext>
#include <QQuickItem>
#include "core.h"
#include "glwidget.h"
#include "timeline2/view/qml/timelineitems.h"
#include "kdenlivesettings.h"
#include "mltcontroller/bincontroller.h"
#include "qml/qmlaudiothumb.h"
#include "timeline2/view/qml/timelineitems.h"
#include <mlt++/Mlt.h>
#ifndef GL_UNPACK_ROW_LENGTH
......@@ -1674,7 +1674,7 @@ int GLWidget::getCurrentPos() const
void GLWidget::setRulerInfo(int duration, int in, int out, std::shared_ptr<MarkerListModel> model)
{
qDebug()<<" ** * SETTING Duration: "<<out<<" - "<<in;
qDebug() << " ** * SETTING Duration: " << out << " - " << in;
rootObject()->setProperty("duration", duration);
rootContext()->setContextProperty("markersModel", model.get());
}
......@@ -31,9 +31,9 @@
#include <QThread>
#include <QTimer>
#include "bin/model/markerlistmodel.hpp"
#include "definitions.h"
#include "scopes/sharedframe.h"
#include "bin/model/markerlistmodel.hpp"
class QOpenGLFunctions_3_2_Core;
......@@ -267,19 +267,19 @@ public:
class MonitorProxy : public QObject
{
Q_OBJECT
//Q_PROPERTY(int consumerPosition READ consumerPosition NOTIFY consumerPositionChanged)
// Q_PROPERTY(int consumerPosition READ consumerPosition NOTIFY consumerPositionChanged)
Q_PROPERTY(int seekPosition READ seekPosition WRITE setSeekPosition NOTIFY seekPositionChanged)
public:
MonitorProxy(GLWidget *parent) : QObject(parent)
, q(parent)
, m_seekPosition(-1)
MonitorProxy(GLWidget *parent)
: QObject(parent)
, q(parent)
, m_seekPosition(-1)
{
}
int seekPosition() const {
return m_seekPosition;
}
void setSeekPosition(int pos) {
int seekPosition() const { return m_seekPosition; }
void setSeekPosition(int pos)
{
m_seekPosition = pos;
emit seekPositionChanged();
}
......@@ -293,5 +293,4 @@ private:
int m_seekPosition;
};
#endif
......@@ -35,7 +35,6 @@
#include <memory>
#include <unordered_set>
class SmallRuler;
class SnapModel;
class ProjectClip;
......
......@@ -25,7 +25,6 @@
#include <KColorScheme>
#include <QWidget>
class SmallRuler : public QWidget
{
Q_OBJECT
......
......@@ -20,8 +20,8 @@
#include "proxyclipjob.h"
#include "bin/bin.h"
#include "core.h"
#include "bin/projectclip.h"
#include "core.h"
#include "doc/kdenlivedoc.h"
#include "kdenlive_debug.h"
#include "kdenlivesettings.h"
......
......@@ -529,11 +529,10 @@ void ProjectManager::doOpenFile(const QUrl &url, KAutoSaveFile *stale)
m_progressDialog->show();
bool openBackup;
m_notesPlugin->clear();
KdenliveDoc *doc =
new KdenliveDoc(stale ? QUrl::fromLocalFile(stale->fileName()) : url, QString(), pCore->window()->m_commandStack,
KdenliveSettings::default_profile().isEmpty() ? KdenliveSettings::current_profile() : KdenliveSettings::default_profile(),
QMap<QString, QString>(), QMap<QString, QString>(), QPoint(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks()),
&openBackup, pCore->window());
KdenliveDoc *doc = new KdenliveDoc(
stale ? QUrl::fromLocalFile(stale->fileName()) : url, QString(), pCore->window()->m_commandStack,
KdenliveSettings::default_profile().isEmpty() ? KdenliveSettings::current_profile() : KdenliveSettings::default_profile(), QMap<QString, QString>(),
QMap<QString, QString>(), QPoint(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks()), &openBackup, pCore->window());
if (stale == nullptr) {
stale = new KAutoSaveFile(url, doc);
doc->m_autosave = stale;
......@@ -894,5 +893,5 @@ void ProjectManager::updateTimeline(Mlt::Tractor tractor)
void ProjectManager::activateAsset(const QVariantMap data)
{
pCore->window()->getMainTimeline()->addAsset(data);
pCore->window()->getMainTimeline()->addAsset(data);
}
......@@ -736,8 +736,8 @@ int CustomTrackView::spaceToolSelectTrackOnly(int track, QList<QGraphicsItem *>
}
QRectF rect;
if (pos > GenTime()) {
rect = QRectF(pos.frames(pCore->getCurrentFps()), getPositionFromTrack(track) + m_tracksHeight / 2, sceneRect().width() - pos.frames(pCore->getCurrentFps()),
m_tracksHeight / 2 - 2);
rect = QRectF(pos.frames(pCore->getCurrentFps()), getPositionFromTrack(track) + m_tracksHeight / 2,
sceneRect().width() - pos.frames(pCore->getCurrentFps()), m_tracksHeight / 2 - 2);
} else {
rect = QRectF(mapToScene(m_clickEvent).x(), getPositionFromTrack(track) + m_tracksHeight / 2, sceneRect().width() - mapToScene(m_clickEvent).x(),
m_tracksHeight / 2 - 2);
......@@ -1502,7 +1502,8 @@ void CustomTrackView::mouseDoubleClickEvent(QMouseEvent *event)
(item->cropStart() + item->cropDuration()).frames(pCore->getCurrentFps()) - 1, -1, true);
}
// QString previous = item->keyframes(item->selectedEffectIndex());
item->insertKeyframe(m_document->getProfileInfo(), item->getEffectAtIndex(item->selectedEffectIndex()), keyFramePos.frames(pCore->getCurrentFps()), val);
item->insertKeyframe(m_document->getProfileInfo(), item->getEffectAtIndex(item->selectedEffectIndex()), keyFramePos.frames(pCore->getCurrentFps()),
val);
// QString next = item->keyframes(item->selectedEffectIndex());
QDomElement newEffect = item->selectedEffect().cloneNode().toElement();
EditEffectCommand *command =
......@@ -2937,7 +2938,8 @@ Transition *CustomTrackView::cutTransition(const ItemInfo &info, const GenTime &
ItemInfo transitionInfo = dup->info();
if (!m_timeline->transitionHandler->deleteTransition(dup->transitionTag(), dup->transitionEndTrack(), transitionInfo.track, cutTime, transitionInfo.endPos,
dup->toXML(), false)) {
emit displayMessage(i18n("Error removing transition at %1 on track %2", m_document->timecode().getTimecodeFromFrames(cutTime.frames(pCore->getCurrentFps())),
emit displayMessage(i18n("Error removing transition at %1 on track %2",
m_document->timecode().getTimecodeFromFrames(cutTime.frames(pCore->getCurrentFps())),
m_timeline->getTrackInfo(info.track).trackName),
ErrorMessage);
return nullptr;
......@@ -2997,7 +2999,8 @@ void CustomTrackView::slotAddTransitionToSelectedClips(const QDomElement &transi
}
// Check there is no other transition at that place
double startY = getPositionFromTrack(info.track) + 1 + m_tracksHeight / 2;
QRectF r(info.startPos.frames(pCore->getCurrentFps()), startY, (info.endPos - info.startPos).frames(pCore->getCurrentFps()), m_tracksHeight / 2);
QRectF r(info.startPos.frames(pCore->getCurrentFps()), startY, (info.endPos - info.startPos).frames(pCore->getCurrentFps()),
m_tracksHeight / 2);
QList<QGraphicsItem *> selection = m_scene->items(r);
bool transitionAccepted = true;
for (int i = 0; i < selection.count(); ++i) {
......@@ -3042,7 +3045,8 @@ void CustomTrackView::slotAddTransitionToSelectedClips(const QDomElement &transi
// Check there is no other transition at that place
double startY = getPositionFromTrack(info.track) + 1 + m_tracksHeight / 2;
QRectF r(info.startPos.frames(pCore->getCurrentFps()), startY, (info.endPos - info.startPos).frames(pCore->getCurrentFps()), m_tracksHeight / 2);
QRectF r(info.startPos.frames(pCore->getCurrentFps()), startY, (info.endPos - info.startPos).frames(pCore->getCurrentFps()),
m_tracksHeight / 2);
QList<QGraphicsItem *> selection = m_scene->items(r);
bool transitionAccepted = true;
for (int i = 0; i < selection.count(); ++i) {
......@@ -3075,7 +3079,8 @@ void CustomTrackView::slotAddTransitionToSelectedClips(const QDomElement &transi
// Check there is no other transition at that place
double startY = getPositionFromTrack(info.track) + 1 + m_tracksHeight / 2;
QRectF r(info.startPos.frames(pCore->getCurrentFps()), startY, (info.endPos - info.startPos).frames(pCore->getCurrentFps()), m_tracksHeight / 2);
QRectF r(info.startPos.frames(pCore->getCurrentFps()), startY, (info.endPos - info.startPos).frames(pCore->getCurrentFps()),
m_tracksHeight / 2);
QList<QGraphicsItem *> selection = m_scene->items(r);
bool transitionAccepted = true;
for (int j = 0; j < selection.count(); ++j) {
......@@ -3302,7 +3307,8 @@ void CustomTrackView::dropEvent(QDropEvent *event)
new AddSpaceCommand(this, info, QList<ItemInfo>(), true, addCommand);
} else if (m_scene->editMode() == TimelineMode::OverwriteEdit) {
// Should we really overwrite all unlocked tracks ? If not we need to calculate the track for audio split first
extractZone(QPoint(startPos.frames(pCore->getCurrentFps()), (startPos + duration).frames(pCore->getCurrentFps())), false, QList<ItemInfo>(), addCommand);
extractZone(QPoint(startPos.frames(pCore->getCurrentFps()), (startPos + duration).frames(pCore->getCurrentFps())), false, QList<ItemInfo>(),
addCommand);
/*for (int i = 0; i < items.count(); ++i) {
if (items.at(i)->type() != AVWidget)
continue;
......@@ -4415,7 +4421,8 @@ void CustomTrackView::completeSpaceOperation(int track, GenTime &timeOffset, boo
transitionsToMove.append(info);
int realTrack = getTrackFromPos(item->scenePos().y());
item->updateItem(realTrack);
if (trackTransitionStartList.value(info.track) == -1 || info.startPos.frames(pCore->getCurrentFps()) < trackTransitionStartList.value(info.track)) {
if (trackTransitionStartList.value(info.track) == -1 ||
info.startPos.frames(pCore->getCurrentFps()) < trackTransitionStartList.value(info.track)) {
trackTransitionStartList[info.track] = info.startPos.frames(pCore->getCurrentFps());
}
}
......@@ -4489,7 +4496,8 @@ void CustomTrackView::deleteClip(const ItemInfo &info, bool refresh)
// m_document->renderer()->saveSceneList(QString("/tmp/error%1.mlt").arg(m_ct), QDomElement());
if (!m_timeline->track(info.track)->del(info.startPos.seconds())) {
qCDebug(KDENLIVE_LOG) << " / / /CANNOT DELETE CLIP AT: " << info.startPos.frames(25);
emit displayMessage(i18n("Error removing clip at %1 on track %2", m_document->timecode().getTimecodeFromFrames(info.startPos.frames(pCore->getCurrentFps())),
emit displayMessage(i18n("Error removing clip at %1 on track %2",
m_document->timecode().getTimecodeFromFrames(info.startPos.frames(pCore->getCurrentFps())),
m_timeline->getTrackInfo(info.track).trackName),
ErrorMessage);
return;
......@@ -6797,13 +6805,13 @@ void CustomTrackView::adjustKeyfames(GenTime oldstart, GenTime newstart, GenTime
if (e.attribute(QStringLiteral("type")) == QLatin1String("keyframe") || e.attribute(QStringLiteral("type")) == QLatin1String("simplekeyframe")) {
// Effect has a keyframe type parameter, we need to adjust the values
QString adjusted = EffectsController::adjustKeyframes(e.attribute(QStringLiteral("keyframes")), oldstart.frames(pCore->getCurrentFps()),
newstart.frames(pCore->getCurrentFps()), (newstart + duration).frames(pCore->getCurrentFps()) - 1,
m_document->getProfileInfo());
newstart.frames(pCore->getCurrentFps()),
(newstart + duration).frames(pCore->getCurrentFps()) - 1, m_document->getProfileInfo());
e.setAttribute(QStringLiteral("keyframes"), adjusted);
} else if (e.attribute(QStringLiteral("type")) == QLatin1String("animated")) {
if (xml.attribute(QStringLiteral("kdenlive:sync_in_out")) != QLatin1String("1")) {
QString resizedAnim =
KeyframeView::cutAnimation(e.attribute(QStringLiteral("value")), 0, duration.frames(pCore->getCurrentFps()), duration.frames(pCore->getCurrentFps()));
QString resizedAnim = KeyframeView::cutAnimation(e.attribute(QStringLiteral("value")), 0, duration.frames(pCore->getCurrentFps()),
duration.frames(pCore->getCurrentFps()));
e.setAttribute(QStringLiteral("value"), resizedAnim);
} else if (xml.hasAttribute(QStringLiteral("kdenlive:sync_in_out"))) {
// Effect attached to clip in, update
......@@ -7515,8 +7523,8 @@ void CustomTrackView::alignAudio()
return;
}
AudioEnvelope *envelope =
new AudioEnvelope(clip->binClip()->url(), prod, info.cropStart.frames(pCore->getCurrentFps()), info.cropDuration.frames(pCore->getCurrentFps()),
clip->track(), info.startPos.frames(pCore->getCurrentFps()));
new AudioEnvelope(clip->binClip()->url(), prod, info.cropStart.frames(pCore->getCurrentFps()),
info.cropDuration.frames(pCore->getCurrentFps()), clip->track(), info.startPos.frames(pCore->getCurrentFps()));
m_audioCorrelator->addChild(envelope);
}
}
......@@ -7661,7 +7669,8 @@ bool CustomTrackView::doSplitAudio(const GenTime &pos, int track, int destTrack,
ItemInfo info = clip->info();
deleteClip(clp->info());
if (!m_timeline->track(info.track)->replace(info.startPos.seconds(), m_document->renderer()->getBinProducer(clip->getBinId()))) {
emit displayMessage(i18n("Cannot update clip (time: %1, track: %2)", info.startPos.frames(pCore->getCurrentFps()), info.track), ErrorMessage);
emit displayMessage(i18n("Cannot update clip (time: %1, track: %2)", info.startPos.frames(pCore->getCurrentFps()), info.track),
ErrorMessage);
return false;
}
clip->setState(PlaylistState::Original);
......@@ -7810,9 +7819,9 @@ void CustomTrackView::doChangeClipType(const ItemInfo &info, PlaylistState::Clip
{
ClipItem *clip = getClipItemAtStart(info.startPos, info.track);
if (clip == nullptr) {
emit displayMessage(
i18n("Cannot find clip to edit (time: %1, track: %2)", info.startPos.frames(pCore->getCurrentFps()), m_timeline->getTrackInfo(info.track).trackName),
ErrorMessage);
emit displayMessage(i18n("Cannot find clip to edit (time: %1, track: %2)", info.startPos.frames(pCore->getCurrentFps()),
m_timeline->getTrackInfo(info.track).trackName),
ErrorMessage);
return;
}
Mlt::Producer *prod;
......@@ -8659,8 +8668,8 @@ void CustomTrackView::exportTimelineSelection(QString path)
int a_track = qBound(0, tr->transitionEndTrack() - firstTrack, lastTrack - firstTrack + 1);
int b_track = qBound(0, tr->track() - firstTrack, lastTrack - firstTrack + 1);
m_timeline->transitionHandler->duplicateTransitionOnPlaylist(tr->startPos().frames(pCore->getCurrentFps()) - startOffest,
tr->endPos().frames(pCore->getCurrentFps()) - startOffest, tr->transitionTag(), tr->toXML(),
a_track, b_track, field);
tr->endPos().frames(pCore->getCurrentFps()) - startOffest, tr->transitionTag(),
tr->toXML(), a_track, b_track, field);
}
}
Mlt::Consumer xmlConsumer(*newTractor->profile(), ("xml:" + path).toUtf8().constData());
......@@ -8737,7 +8746,8 @@ void CustomTrackView::importPlaylist(const ItemInfo &info, const QMap<QString, Q
// for multi-track playlists is "down", that is, we occupy additional tracks
// *below* the playlist clip in the timeline.
double startY = getPositionFromTrack(topTrack) + 1; // TODO: check +1
QRectF r(info.startPos.frames(pCore->getCurrentFps()), startY, (info.endPos - info.startPos).frames(pCore->getCurrentFps()), m_tracksHeight * playlistTracks);
QRectF r(info.startPos.frames(pCore->getCurrentFps()), startY, (info.endPos - info.startPos).frames(pCore->getCurrentFps()),
m_tracksHeight * playlistTracks);
QList<QGraphicsItem *> selection = m_scene->items(r);
ClipItem *playlistToExpand = getClipItemAtStart(info.startPos, info.track);
if (playlistToExpand) {
......
......@@ -22,6 +22,7 @@
#include "bin/projectclip.h"
#include "clip.h"
#include "clipitem.h"
#include "core.h"
#include "customruler.h"
#include "customtrackview.h"
#include "dialogs/profilesdialog.h"
......@@ -42,7 +43,6 @@
#include "transition.h"
#include "transitionhandler.h"
#include "utils/KoIconUtils.h"
#include "core.h"
#include <KDualAction>
#include <QLocale>
......
......@@ -29,9 +29,9 @@
#include <QDebug>
#include <mlt++/MltProducer.h>
//this can be deleted
#include "gentime.h"
// this can be deleted
#include "bin/model/markerlistmodel.hpp"
#include "gentime.h"
ClipModel::ClipModel(std::weak_ptr<TimelineModel> parent, std::shared_ptr<Mlt::Producer> prod, const QString &binClipId, int id)
: MoveableItem<Mlt::Producer>(parent, id)
......
......@@ -40,7 +40,8 @@ TimelineItemModel::TimelineItemModel(Mlt::Profile *profile, std::weak_ptr<DocUnd
{
}
std::shared_ptr<TimelineItemModel> TimelineItemModel::construct(Mlt::Profile *profile, std::shared_ptr<MarkerListModel> guideModel, std::weak_ptr<DocUndoStack> undo_stack)
std::shared_ptr<TimelineItemModel> TimelineItemModel::construct(Mlt::Profile *profile, std::shared_ptr<MarkerListModel> guideModel,
std::weak_ptr<DocUndoStack> undo_stack)
{
std::shared_ptr<TimelineItemModel> ptr(new TimelineItemModel(profile, std::move(undo_stack)));
ptr->m_groups = std::unique_ptr<GroupsModel>(new GroupsModel(ptr));
......
......@@ -54,7 +54,8 @@ public:
@param undo_stack is a weak pointer to the undo stack of the project
@param guideModel ptr to the guide model of the project
*/
static std::shared_ptr<TimelineItemModel> construct(Mlt::Profile *profile, std::shared_ptr<MarkerListModel> guideModel, std::weak_ptr<DocUndoStack> undo_stack );
static std::shared_ptr<TimelineItemModel> construct(Mlt::Profile *profile, std::shared_ptr<MarkerListModel> guideModel,
std::weak_ptr<DocUndoStack> undo_stack);
friend bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timeline, Mlt::Tractor mlt_timeline);
......
......@@ -22,8 +22,8 @@
#include "timelinemodel.hpp"
#include "assets/model/assetparametermodel.hpp"
#include "clipmodel.hpp"
#include "core.h"
#include "compositionmodel.hpp"
#include "core.h"
#include "groupsmodel.hpp"
#include "snapmodel.hpp"
#include "trackmodel.hpp"
......
......@@ -195,7 +195,7 @@ private:
int m_currentInsertionOrder;
std::map<int, std::shared_ptr<ClipModel>> m_allClips; /*this is important to keep an
ordered structure to store the clips, since we use their ids order as row order*/
ordered structure to store the clips, since we use their ids order as row order*/
std::map<int, std::shared_ptr<CompositionModel>>
m_allCompositions; /*this is important to keep an
ordered structure to store the clips, since we use their ids order as row order*/
......
......@@ -458,8 +458,8 @@ void TimelineWidget::addAsset(const QVariantMap data)
QString effect = data.value(QStringLiteral("kdenlive/effect")).toString();
if (!m_selection.selectedClips.isEmpty()) {
for (int id : m_selection.selectedClips) {
//TODO: manage effects in model
//m_model->addEffect(id, effect);
// TODO: manage effects in model
// m_model->addEffect(id, effect);
}
}
}
......@@ -471,9 +471,9 @@ void TimelineWidget::requestRefresh()
void TimelineWidget::showAsset(int id)
{
qDebug() << "show asset" <<id;
qDebug() << "show asset" << id;
if (m_model->isComposition(id)) {
qDebug() << "show asset compo" <<id;
qDebug() << "show asset compo" << id;
emit showTransitionModel(m_model->getCompositionParameterModel(id));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment