Changeset View
Changeset View
Standalone View
Standalone View
src/transitions/transitionlist/view/transitionlistwidget.cpp
Context not available. | |||||
23 | #include "transitions/transitionlist/model/transitionfilter.hpp" | 23 | #include "transitions/transitionlist/model/transitionfilter.hpp" | ||
---|---|---|---|---|---|
24 | #include "../model/transitiontreemodel.hpp" | 24 | #include "../model/transitiontreemodel.hpp" | ||
25 | #include "transitions/transitionsrepository.hpp" | 25 | #include "transitions/transitionsrepository.hpp" | ||
26 | #include "effectslist/initeffects.h" | ||||
27 | #include "dialogs/profilesdialog.h" | ||||
26 | 28 | | |||
27 | #include <QQmlContext> | 29 | #include <QQmlContext> | ||
30 | #include <kns3/downloaddialog.h> | ||||
28 | 31 | | |||
29 | TransitionListWidget::TransitionListWidget(QWidget *parent) | 32 | TransitionListWidget::TransitionListWidget(QWidget *parent) | ||
30 | : AssetListWidget(parent) | 33 | : AssetListWidget(parent) | ||
Context not available. | |||||
75 | static_cast<TransitionFilter *>(m_proxyModel.get())->setFilterType(false, TransitionType::Favorites); | 78 | static_cast<TransitionFilter *>(m_proxyModel.get())->setFilterType(false, TransitionType::Favorites); | ||
76 | } | 79 | } | ||
77 | } | 80 | } | ||
81 | | ||||
82 | int TransitionListWidget::getNewStuff(const QString &configFile) | ||||
83 | { | ||||
84 | KNS3::Entry::List entries; | ||||
85 | QPointer<KNS3::DownloadDialog> dialog = new KNS3::DownloadDialog(configFile); | ||||
86 | if (dialog->exec() != 0) { | ||||
87 | entries = dialog->changedEntries(); | ||||
88 | } | ||||
89 | for (const KNS3::Entry &entry : entries) { | ||||
90 | if (entry.status() == KNS3::Entry::Installed) { | ||||
91 | qCDebug(KDENLIVE_LOG) << "// Installed files: " << entry.installedFiles(); | ||||
92 | } | ||||
93 | } | ||||
94 | delete dialog; | ||||
95 | return entries.size(); | ||||
96 | } | ||||
97 | | ||||
98 | void TransitionListWidget::downloadNewLumas() | ||||
99 | { | ||||
100 | if (getNewStuff(QStringLiteral(":data/kdenlive_wipes.knsrc")) > 0) { | ||||
101 | initEffects::refreshLumas(); | ||||
102 | // TODO: refresh currently displayd trans ? | ||||
103 | } | ||||
104 | } | ||||
Context not available. |