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
ec97c564
Commit
ec97c564
authored
Oct 11, 2020
by
Vivek Yadav
Committed by
Jean-Baptiste Mardelle
Oct 18, 2020
Browse files
Update effectlistwidget.cpp
parent
33758be4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/effects/effectlist/view/effectlistwidget.cpp
View file @
ec97c564
...
...
@@ -111,24 +111,24 @@ void EffectListWidget::reloadEffectMenu(QMenu *effectsMenu, KActionCategory *eff
void
EffectListWidget
::
editCustomAsset
(
const
QModelIndex
&
index
)
{
QDialog
dialog
(
this
);
QFormLayout
form
(
&
dialog
);
QLineEdit
*
effectName
=
new
QLineEdit
(
&
dialog
);
QTextEdit
*
descriptionBox
=
new
QTextEdit
(
&
dialog
);
QString
label_Name
=
QString
(
"Name : "
);
form
.
addRow
(
label_Name
,
effectName
);
QString
label
=
QString
(
"Comments : "
);
form
.
addRow
(
label
,
descriptionBox
);
QDialogButtonBox
buttonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
Qt
::
Horizontal
,
&
dialog
);
form
.
addRow
(
&
buttonBox
);
QObject
::
connect
(
&
buttonBox
,
SIGNAL
(
accepted
()),
&
dialog
,
SLOT
(
accept
()));
QObject
::
connect
(
&
buttonBox
,
SIGNAL
(
rejected
()),
&
dialog
,
SLOT
(
reject
()));
if
(
dialog
.
exec
()
==
QDialog
::
Accepted
)
{
QString
name
=
effectName
->
text
();
QString
enteredDescription
=
descriptionBox
->
toPlainText
();
if
(
name
.
trimmed
().
isEmpty
()
&&
enteredDescription
.
trimmed
().
isEmpty
())
{
return
;
}
m_model
->
editCustomAsset
(
name
,
enteredDescription
,
m_proxyModel
->
mapToSource
(
index
));
}
QFormLayout
form
(
&
dialog
);
QLineEdit
*
effectName
=
new
QLineEdit
(
getName
(
index
),
&
dialog
);
QTextEdit
*
descriptionBox
=
new
QTextEdit
(
getDescription
(
index
),
&
dialog
);
QString
label_Name
=
QString
(
"Name : "
);
form
.
addRow
(
label_Name
,
effectName
);
QString
label
=
QString
(
"Comments : "
);
form
.
addRow
(
label
,
descriptionBox
);
QDialogButtonBox
buttonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
Qt
::
Horizontal
,
&
dialog
);
form
.
addRow
(
&
buttonBox
);
QObject
::
connect
(
&
buttonBox
,
SIGNAL
(
accepted
()),
&
dialog
,
SLOT
(
accept
()));
QObject
::
connect
(
&
buttonBox
,
SIGNAL
(
rejected
()),
&
dialog
,
SLOT
(
reject
()));
if
(
dialog
.
exec
()
==
QDialog
::
Accepted
)
{
QString
name
=
effectName
->
text
();
QString
enteredDescription
=
descriptionBox
->
toPlainText
();
if
(
name
.
trimmed
().
isEmpty
()
&&
enteredDescription
.
trimmed
().
isEmpty
())
{
return
;
}
m_model
->
editCustomAsset
(
name
,
enteredDescription
,
m_proxyModel
->
mapToSource
(
index
));
}
}
Write
Preview
Markdown
is supported
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