diff --git a/data/effects/automask.xml b/data/effects/automask.xml
index d7d6a953a..94a32d29c 100644
--- a/data/effects/automask.xml
+++ b/data/effects/automask.xml
@@ -1,38 +1,42 @@
Auto Mask
Hide a selected zone and follow its movements
Zachary Drew
Geometry
Macroblock width
Macroblock height
Maximum x distance
Maximum y distance
Denoise
Debug
Obscure
+
+ Tracking data
+ Click to copy to clipboard
+
Analyse
motion_vector_list
autotrack_rectangle
Motion vectors
diff --git a/src/assets/view/widgets/clickablelabelwidget.cpp b/src/assets/view/widgets/clickablelabelwidget.cpp
index b85e674cd..cc22b4c6c 100644
--- a/src/assets/view/widgets/clickablelabelwidget.cpp
+++ b/src/assets/view/widgets/clickablelabelwidget.cpp
@@ -1,72 +1,83 @@
/***************************************************************************
* Copyright (C) 2019 by Jean-Baptiste Mardelle *
* This file is part of Kdenlive. See www.kdenlive.org. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) version 3 or any later version accepted by the *
* membership of KDE e.V. (or its successor approved by the membership *
* of KDE e.V.), which shall act as a proxy defined in Section 14 of *
* version 3 of the license. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see . *
***************************************************************************/
#include "clickablelabelwidget.hpp"
#include "assets/model/assetparametermodel.hpp"
#include "jobs/filterclipjob.h"
#include "jobs/jobmanager.h"
#include "core.h"
#include
#include
#include
#include
+#include
+#include
#include
ClickableLabelParamWidget::ClickableLabelParamWidget(std::shared_ptr model, QModelIndex index, QWidget *parent)
: AbstractParamWidget(std::move(model), index, parent)
{
// setup the comment
m_displayName = m_model->data(m_index, Qt::DisplayRole).toString();
QString name = m_model->data(m_index, AssetParameterModel::NameRole).toString();
QString comment = m_model->data(m_index, AssetParameterModel::CommentRole).toString();
setToolTip(comment);
- auto *layout = new QVBoxLayout(this);
+ auto *layout = new QHBoxLayout(this);
+ QToolButton *tb = new QToolButton(this);
+ tb->setAutoRaise(true);
+ tb->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy")));
m_label = new QLabel(this);
m_label->setWordWrap(true);
+ layout->addWidget(tb);
layout->addWidget(m_label);
- setMinimumHeight(m_label->sizeHint().height());
+ setMinimumHeight(tb->sizeHint().height());
+ connect(tb, &QToolButton::clicked, [&]() {
+ QClipboard *clipboard = QApplication::clipboard();
+ QString value = m_model->data(m_index, AssetParameterModel::ValueRole).toString();
+ clipboard->setText(value);
+ });
connect(m_label, &QLabel::linkActivated, [&](const QString &result) {
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(result);
});
slotRefresh();
}
void ClickableLabelParamWidget::slotShowComment(bool show)
{
Q_UNUSED(show);
/*if (!m_labelComment->text().isEmpty()) {
m_widgetComment->setVisible(show);
}*/
}
void ClickableLabelParamWidget::slotRefresh()
{
QString value = m_model->data(m_index, AssetParameterModel::ValueRole).toString();
m_label->setText(QStringLiteral("").arg(value) + m_displayName + QStringLiteral(""));
- m_label->setVisible(!value.isEmpty());
+ setVisible(!value.isEmpty());
}
bool ClickableLabelParamWidget::getValue()
{
return true;
}