Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5e7248e8 authored by Nicolas Carion's avatar Nicolas Carion

adding title to assetpanel

parent ee028586
......@@ -23,18 +23,24 @@
#include "effects/effectstack/model/effectstackmodel.cpp"
#include "kdenlivesettings.h"
#include "model/assetparametermodel.hpp"
#include "transitions/transitionsrepository.hpp"
#include "view/assetparameterview.hpp"
#include <KColorScheme>
#include <KColorUtils>
#include <QApplication>
#include <QDebug>
#include <QLabel>
#include <QVBoxLayout>
#include <klocalizedstring.h>
AssetPanel::AssetPanel(QWidget *parent)
: QScrollArea(parent)
, m_lay(new QVBoxLayout(this))
, m_assetTitle(new QLabel(this))
, m_transitionWidget(new AssetParameterView(this))
{
m_lay->addWidget(m_assetTitle);
m_lay->addWidget(m_transitionWidget);
m_transitionWidget->setVisible(false);
}
......@@ -43,6 +49,9 @@ void AssetPanel::showTransition(std::shared_ptr<AssetParameterModel> transitionM
{
qDebug() << "Show transition signal";
clear();
QString transitionId = transitionModel->getAssetId();
QString transitionName = TransitionsRepository::get()->getName(transitionId);
m_assetTitle->setText(i18n("Properties of transition %1", transitionName));
m_transitionWidget->setVisible(true);
m_transitionWidget->setModel(transitionModel);
}
......@@ -57,6 +66,7 @@ void AssetPanel::clear()
{
m_transitionWidget->setVisible(false);
m_transitionWidget->unsetModel();
m_assetTitle->setText(QString());
}
void AssetPanel::updatePalette()
......
......@@ -33,6 +33,7 @@
class AssetParameterModel;
class AssetParameterView;
class EffectStackModel;
class QLabel;
class AssetPanel : public QScrollArea
{
......@@ -58,6 +59,7 @@ protected:
static const QString getStyleSheet();
QVBoxLayout *m_lay;
QLabel *m_assetTitle;
AssetParameterView *m_transitionWidget;
};
......
......@@ -48,6 +48,7 @@ AssetParameterModel::AssetParameterModel(Mlt::Properties *asset, const QDomEleme
}
}
qDebug() << "XML parsing of "<<assetId<<". found : "<<nodeList.count();
for (int i = 0; i < nodeList.count(); ++i) {
QDomElement currentParameter = nodeList.item(i).toElement();
......
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