Changeset View
Changeset View
Standalone View
Standalone View
src/dialogs/renderwidget.cpp
Context not available. | |||||
36 | #include <KRun> | 36 | #include <KRun> | ||
---|---|---|---|---|---|
37 | #include <kio_version.h> | 37 | #include <kio_version.h> | ||
38 | #include <knotifications_version.h> | 38 | #include <knotifications_version.h> | ||
39 | #include <kns3/downloaddialog.h> | ||||
39 | 40 | | |||
40 | #include "kdenlive_debug.h" | 41 | #include "kdenlive_debug.h" | ||
41 | #include <QDBusConnectionInterface> | 42 | #include <QDBusConnectionInterface> | ||
Context not available. | |||||
187 | m_view.buttonEdit->setIconSize(iconSize); | 188 | m_view.buttonEdit->setIconSize(iconSize); | ||
188 | m_view.buttonSave->setIconSize(iconSize); | 189 | m_view.buttonSave->setIconSize(iconSize); | ||
189 | m_view.buttonFavorite->setIconSize(iconSize); | 190 | m_view.buttonFavorite->setIconSize(iconSize); | ||
191 | m_view.buttonDownload->setIconSize(iconSize); | ||||
190 | 192 | | |||
191 | m_view.buttonDelete->setIcon(QIcon::fromTheme(QStringLiteral("trash-empty"))); | 193 | m_view.buttonDelete->setIcon(QIcon::fromTheme(QStringLiteral("trash-empty"))); | ||
192 | m_view.buttonDelete->setToolTip(i18n("Delete profile")); | 194 | m_view.buttonDelete->setToolTip(i18n("Delete profile")); | ||
Context not available. | |||||
204 | m_view.buttonFavorite->setIcon(QIcon::fromTheme(QStringLiteral("favorite"))); | 206 | m_view.buttonFavorite->setIcon(QIcon::fromTheme(QStringLiteral("favorite"))); | ||
205 | m_view.buttonFavorite->setToolTip(i18n("Copy profile to favorites")); | 207 | m_view.buttonFavorite->setToolTip(i18n("Copy profile to favorites")); | ||
206 | 208 | | |||
209 | m_view.buttonDownload->setIcon(QIcon::fromTheme(QStringLiteral("edit-download"))); | ||||
210 | m_view.buttonDownload->setToolTip(i18n("Download New Render Profiles...")); | ||||
211 | | ||||
207 | m_view.out_file->button()->setToolTip(i18n("Select output destination")); | 212 | m_view.out_file->button()->setToolTip(i18n("Select output destination")); | ||
208 | m_view.advanced_params->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5); | 213 | m_view.advanced_params->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5); | ||
209 | 214 | | |||
Context not available. | |||||
289 | connect(m_view.buttonEdit, &QAbstractButton::clicked, this, &RenderWidget::slotEditProfile); | 294 | connect(m_view.buttonEdit, &QAbstractButton::clicked, this, &RenderWidget::slotEditProfile); | ||
290 | connect(m_view.buttonDelete, &QAbstractButton::clicked, this, &RenderWidget::slotDeleteProfile); | 295 | connect(m_view.buttonDelete, &QAbstractButton::clicked, this, &RenderWidget::slotDeleteProfile); | ||
291 | connect(m_view.buttonFavorite, &QAbstractButton::clicked, this, &RenderWidget::slotCopyToFavorites); | 296 | connect(m_view.buttonFavorite, &QAbstractButton::clicked, this, &RenderWidget::slotCopyToFavorites); | ||
297 | connect(m_view.buttonDownload, &QAbstractButton::clicked, this, &RenderWidget::slotDownloadNewRenderProfiles); | ||||
292 | 298 | | |||
293 | connect(m_view.abort_job, &QAbstractButton::clicked, this, &RenderWidget::slotAbortCurrentJob); | 299 | connect(m_view.abort_job, &QAbstractButton::clicked, this, &RenderWidget::slotAbortCurrentJob); | ||
294 | connect(m_view.start_job, &QAbstractButton::clicked, this, &RenderWidget::slotStartCurrentJob); | 300 | connect(m_view.start_job, &QAbstractButton::clicked, this, &RenderWidget::slotStartCurrentJob); | ||
Context not available. | |||||
762 | } | 768 | } | ||
763 | } | 769 | } | ||
764 | 770 | | |||
771 | void RenderWidget::slotDownloadNewRenderProfiles() | ||||
772 | { | ||||
773 | if (getNewStuff(QStringLiteral(":data/kdenlive_renderprofiles.knsrc")) > 0) { | ||||
774 | reloadProfiles(); | ||||
775 | } | ||||
776 | } | ||||
777 | | ||||
778 | int RenderWidget::getNewStuff(const QString &configFile) | ||||
779 | { | ||||
780 | KNS3::Entry::List entries; | ||||
781 | QPointer<KNS3::DownloadDialog> dialog = new KNS3::DownloadDialog(configFile); | ||||
782 | if (dialog->exec() != 0) { | ||||
783 | entries = dialog->changedEntries(); | ||||
784 | } | ||||
785 | for (const KNS3::Entry &entry : entries) { | ||||
786 | if (entry.status() == KNS3::Entry::Installed) { | ||||
787 | qCDebug(KDENLIVE_LOG) << "// Installed files: " << entry.installedFiles(); | ||||
788 | } | ||||
789 | } | ||||
790 | delete dialog; | ||||
791 | return entries.size(); | ||||
792 | } | ||||
793 | | ||||
765 | void RenderWidget::slotEditProfile() | 794 | void RenderWidget::slotEditProfile() | ||
766 | { | 795 | { | ||
767 | QTreeWidgetItem *item = m_view.formats->currentItem(); | 796 | QTreeWidgetItem *item = m_view.formats->currentItem(); | ||
Context not available. |