Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
217ef52e
Commit
217ef52e
authored
May 17, 2020
by
Simon Eugster
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: Parameter types
parent
b1b56445
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
src/assets/model/assetparametermodel.cpp
src/assets/model/assetparametermodel.cpp
+17
-0
src/doc/kdenlivedoc.cpp
src/doc/kdenlivedoc.cpp
+6
-0
No files found.
src/assets/model/assetparametermodel.cpp
View file @
217ef52e
...
...
@@ -31,6 +31,7 @@
#include <QJsonObject>
#include <QLocale>
#include <QString>
#include <effects/effectsrepository.hpp>
AssetParameterModel
::
AssetParameterModel
(
std
::
unique_ptr
<
Mlt
::
Properties
>
asset
,
const
QDomElement
&
assetXml
,
const
QString
&
assetId
,
ObjectId
ownerId
,
QObject
*
parent
)
...
...
@@ -60,6 +61,22 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
}
}
qDebug
()
<<
"Listing all effects in the repository:"
;
auto
allEffects
=
EffectsRepository
::
get
()
->
getNames
();
for
(
const
auto
&
effect
:
allEffects
)
{
qDebug
()
<<
"Asset ID "
<<
effect
.
first
<<
" with name "
<<
effect
.
second
;
}
if
(
EffectsRepository
::
get
()
->
exists
(
assetId
))
{
qDebug
()
<<
"Asset "
<<
assetId
<<
" found in the repository. Description: "
<<
EffectsRepository
::
get
()
->
getDescription
(
assetId
);
QString
str
;
QTextStream
stream
(
&
str
);
EffectsRepository
::
get
()
->
getXml
(
assetId
).
save
(
stream
,
4
);
qDebug
()
<<
"Asset XML: "
<<
str
;
}
else
{
qDebug
()
<<
"Asset not found in repo: "
<<
assetId
;
}
qDebug
()
<<
"XML parsing of "
<<
assetId
<<
". found : "
<<
nodeList
.
count
();
for
(
int
i
=
0
;
i
<
nodeList
.
count
();
++
i
)
{
QDomElement
currentParameter
=
nodeList
.
item
(
i
).
toElement
();
...
...
src/doc/kdenlivedoc.cpp
View file @
217ef52e
...
...
@@ -619,7 +619,13 @@ bool KdenliveDoc::saveSceneList(const QString &path, const QString &scene)
KMessageBox
::
error
(
QApplication
::
activeWindow
(),
i18n
(
"Cannot write to file %1"
,
path
));
return
false
;
}
QLocale
currentLocale
;
qDebug
()
<<
"Current locale is "
<<
currentLocale
;
QLocale
::
setDefault
(
QLocale
(
QLocale
::
Russian
,
QLocale
::
Russia
));
const
QByteArray
sceneData
=
sceneList
.
toString
().
toUtf8
();
QLocale
::
setDefault
(
currentLocale
);
file
.
write
(
sceneData
);
if
(
!
file
.
commit
())
{
KMessageBox
::
error
(
QApplication
::
activeWindow
(),
i18n
(
"Cannot write to file %1"
,
path
));
...
...
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