Commit afa50d0c authored by Julius Künzel's avatar Julius Künzel
Browse files

Add option to download effect templates from store.kde.org

parent 9aaf43a1
if(KF5NewStuff_VERSION VERSION_GREATER "5.56.0")
install(FILES kdenlive_renderprofiles.knsrc kdenlive_wipes.knsrc kdenlive_keyboardschemes.knsrc kdenlive_titles.knsrc kdenlive_luts.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR})
install(FILES kdenlive_renderprofiles.knsrc kdenlive_wipes.knsrc kdenlive_keyboardschemes.knsrc kdenlive_titles.knsrc kdenlive_luts.knsrc kdenlive_effects.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR})
else()
install(FILES kdenlive_renderprofiles.knsrc kdenlive_wipes.knsrc kdenlive_keyboardschemes.knsrc kdenlive_titles.knsrc kdenlive_luts.knsrc DESTINATION ${CONFIG_INSTALL_DIR})
install(FILES kdenlive_renderprofiles.knsrc kdenlive_wipes.knsrc kdenlive_keyboardschemes.knsrc kdenlive_titles.knsrc kdenlive_luts.knsrc kdenlive_effects.knsrc DESTINATION ${CONFIG_INSTALL_DIR})
endif()
[KNewStuff3]
Name=Kdenlive Effect Templates
Name[de]=Kdenlive Effekt Vorlagen
ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml
Categories=Kdenlive Effect Templates
TargetDir=kdenlive/effects
Uncompress=archive
......@@ -120,6 +120,15 @@ Rectangle {
assetlist.downloadNewLumas()
}
}
ToolButton {
id: downloadEffecs
visible: isEffectList
iconName: "edit-download"
tooltip: i18n("Download New Effects...")
onClicked: {
assetlist.downloadNewEffects()
}
}
Rectangle {
//This is a spacer
Layout.fillHeight: false
......
......@@ -95,6 +95,13 @@ void EffectListWidget::reloadCustomEffect(const QString &path)
m_proxyModel->sort(0, Qt::AscendingOrder);
}
void EffectListWidget::downloadNewEffects()
{
if (pCore->getNewStuff(QStringLiteral(":data/kdenlive_effects.knsrc")) > 0) {
// reloadCustomEffect();
}
}
void EffectListWidget::reloadEffectMenu(QMenu *effectsMenu, KActionCategory *effectActions)
{
m_model->reloadAssetMenu(effectsMenu, effectActions);
......
......@@ -31,6 +31,7 @@ public:
QString getMimeType(const QString &assetId) const override;
void updateFavorite(const QModelIndex &index);
void reloadEffectMenu(QMenu *effectsMenu, KActionCategory *effectActions);
void downloadNewEffects();
void reloadCustomEffectIx(const QModelIndex &index) override;
void editCustomAsset(const QModelIndex &index) override;
void exportCustomEffect(const QModelIndex &index);
......@@ -74,6 +75,7 @@ public:
Q_INVOKABLE void setFilterType(const QString &type) { q->setFilterType(type); }
Q_INVOKABLE void setFilterName(const QString &pattern) { q->setFilterName(pattern); }
Q_INVOKABLE QString getMimeType(const QString &assetId) const { return q->getMimeType(assetId); }
Q_INVOKABLE void downloadNewEffects() { q->downloadNewEffects(); }
bool showDescription() const { return KdenliveSettings::showeffectinfo(); }
void setShowDescription(bool show)
......
......@@ -53,6 +53,7 @@
<file alias="preferred_effects.txt">../data/preferred_effects.txt</file>
<file alias="kdenlive_renderprofiles.knsrc">../data/knewstuff/kdenlive_renderprofiles.knsrc</file>
<file alias="kdenlive_titles.knsrc">../data/knewstuff/kdenlive_titles.knsrc</file>
<file alias="kdenlive_effects.knsrc">../data/knewstuff/kdenlive_effects.knsrc</file>
<file alias="kdenlive_wipes.knsrc">../data/knewstuff/kdenlive_wipes.knsrc</file>
<file alias="kdenlive_keyboardschemes.knsrc">../data/knewstuff/kdenlive_keyboardschemes.knsrc</file>
<file alias="kdenlive_luts.knsrc">../data/knewstuff/kdenlive_luts.knsrc</file>
......
Supports Markdown
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