Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
21382f01
Commit
21382f01
authored
Sep 22, 2019
by
Jean-Baptiste Mardelle
Browse files
Add clickable field to copy automask keyframes. Fixes #23
parent
1bfca966
Pipeline
#8115
passed with stage
in 22 minutes and 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
data/effects/automask.xml
View file @
21382f01
...
...
@@ -27,6 +27,10 @@
<parameter
type=
"bool"
name=
"obscure"
default=
"1"
>
<name>
Obscure
</name>
</parameter>
<parameter
type=
"readonly"
name=
"motion_vector_list"
value=
""
>
<name>
Tracking data
</name>
<comment>
Click to copy to clipboard
</comment>
</parameter>
<parameter
type=
"filterjob"
filtertag=
"autotrack_rectangle"
filterparams=
"_serialize=1 motion_vector_list=0"
consumer=
"null"
consumerparams=
"all=1 terminate_on_pause=1"
>
<name>
Analyse
</name>
<jobparam
name=
"storedata"
/>
...
...
src/assets/view/widgets/clickablelabelwidget.cpp
View file @
21382f01
...
...
@@ -29,6 +29,8 @@
#include <QHBoxLayout>
#include <QClipboard>
#include <QLabel>
#include <QIcon>
#include <QToolButton>
#include <QApplication>
ClickableLabelParamWidget
::
ClickableLabelParamWidget
(
std
::
shared_ptr
<
AssetParameterModel
>
model
,
QModelIndex
index
,
QWidget
*
parent
)
...
...
@@ -39,11 +41,20 @@ ClickableLabelParamWidget::ClickableLabelParamWidget(std::shared_ptr<AssetParame
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
);
...
...
@@ -63,7 +74,7 @@ void ClickableLabelParamWidget::slotRefresh()
{
QString
value
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
ValueRole
).
toString
();
m_label
->
setText
(
QStringLiteral
(
"<a href=
\"
%1
\"
>"
).
arg
(
value
)
+
m_displayName
+
QStringLiteral
(
"</a>"
));
m_label
->
setVisible
(
!
value
.
isEmpty
());
setVisible
(
!
value
.
isEmpty
());
}
bool
ClickableLabelParamWidget
::
getValue
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment