Commit ba067e10 authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

[Code Gardening] Remove unused code

parent c2ed2f90
......@@ -4,7 +4,6 @@ set(kdenlive_SRCS
transitions/transitionlist/view/transitionlistwidget.cpp
transitions/transitionlist/model/transitiontreemodel.cpp
transitions/transitionlist/model/transitionfilter.cpp
transitions/view/transitionparameterview.cpp
transitions/view/transitionstackview.cpp
transitions/view/mixstackview.cpp
PARENT_SCOPE)
......
/*
SPDX-FileCopyrightText: 2017 Nicolas Carion
SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Window 2.15
import QtQuick.Layouts 1.15
import QtQml.Models 2.15
Rectangle {
id: transitionRoot
SystemPalette { id: activePalette }
color: "red"//activePalette.window
ColumnLayout {
anchors.fill: parent
Label {
Layout.fillWidth:true
text: i18n("Properties of transition %1", transitionName)
}
AssetView {
Layout.fillWidth:true
Layout.fillHeight:true
id: assetView
assetModel: paramModel
}
}
}
/*
SPDX-FileCopyrightText: 2017 Nicolas Carion
SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include <KLocalizedContext>
#include "transitionparameterview.hpp"
#include "transitions/transitionsrepository.hpp"
#include <KDeclarative/KDeclarative>
#include <QQmlContext>
#include <kdeclarative_version.h>
#include <QStringListModel>
TransitionParameterView::TransitionParameterView(QWidget *parent)
: QQuickWidget(parent)
{
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(engine());
kdeclarative.setupEngine(engine());
engine()->rootContext()->setContextObject(new KLocalizedContext(this));
// Set void model for the moment
auto *model = new QStringListModel();
QStringList list;
list << "a"
<< "b"
<< "c"
<< "s"
<< "w";
model->setStringList(list);
rootContext()->setContextProperty("paramModel", model);
rootContext()->setContextProperty("transitionName", "");
setResizeMode(QQuickWidget::SizeRootObjectToView);
setSource(QUrl(QStringLiteral("qrc:/qml/transitionView.qml")));
setFocusPolicy(Qt::StrongFocus);
}
void TransitionParameterView::setModel(const std::shared_ptr<AssetParameterModel> &model)
{
m_model = model;
rootContext()->setContextProperty("paramModel", model.get());
QString transitionId = model->getAssetId();
QString name = TransitionsRepository::get()->getName(transitionId);
rootContext()->setContextProperty("transitionName", name);
}
/*
SPDX-FileCopyrightText: 2017 Nicolas Carion
SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include "assets/model/assetparametermodel.hpp"
#include <QQuickWidget>
/** @class TransitionParameterView
@brief This class is the view of the properties of a transition
*/
class TransitionParameterView : public QQuickWidget
{
Q_OBJECT
public:
TransitionParameterView(QWidget *parent = nullptr);
/** @brief Set the current model to be displayed */
void setModel(const std::shared_ptr<AssetParameterModel> &model);
protected:
std::shared_ptr<AssetParameterModel> m_model;
};
......@@ -39,7 +39,6 @@
<file alias="Timeline.js">timeline2/view/qml/Timeline.js</file>
<file alias="assetList.qml">assets/assetlist/view/qml/assetList.qml</file>
<file alias="AssetView.qml">assets/view/qml/AssetView.qml</file>
<file alias="transitionView.qml">transitions/view/qml/transitionView.qml</file>
<file alias="AssetMenu.qml">timeline2/view/qml/AssetMenu.qml</file>
<file alias="GuidesMenu.qml">timeline2/view/qml/GuidesMenu.qml</file>
<file alias="BuiltStack.qml">effects/effectstack/view/qml/BuiltStack.qml</file>
......
Supports Markdown
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