Warning, file /multimedia/kdenlive/src/dialogs/encodingprofilesdialog.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: 2008 Jean-Baptiste Mardelle <jb@kdenlive.org>
0003 
0004 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include <KConfigGroup>
0010 
0011 #include "definitions.h"
0012 #include "ui_manageencodingprofile_ui.h"
0013 
0014 class KMessageWidget;
0015 
0016 class EncodingProfilesManager
0017 {
0018 
0019 public:
0020     enum ProfileType {
0021         ProxyClips = 0,
0022         TimelinePreview = 1,
0023         V4LCapture = 2,
0024         ScreenCapture = 3,
0025         DecklinkCapture = 4
0026     };
0027 
0028     static QString configGroupName(ProfileType type);
0029 };
0030 
0031 class EncodingProfilesDialog : public QDialog, Ui::ManageEncodingProfile_UI
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036     explicit EncodingProfilesDialog(EncodingProfilesManager::ProfileType profileType, QWidget *parent = nullptr);
0037     ~EncodingProfilesDialog() override;
0038 
0039 private slots:
0040     void slotLoadProfiles();
0041     void slotShowParams();
0042     void slotDeleteProfile();
0043     void slotAddProfile();
0044     void slotEditProfile();
0045 
0046 private:
0047     KConfig *m_configFile;
0048     KConfigGroup *m_configGroup;
0049 };
0050 
0051 class EncodingProfilesChooser : public QWidget
0052 {
0053     Q_OBJECT
0054 
0055 public:
0056     EncodingProfilesChooser(QWidget *parent, EncodingProfilesManager::ProfileType, bool showAutoItem = false, const QString &configname = {},
0057                             bool native = true);
0058     QString currentExtension();
0059     QString currentParams();
0060     void hideMessage();
0061     /** @brief Only enable preview profiles with matching framerate */
0062     virtual void filterPreviewProfiles(const QString & /*profile*/);
0063 
0064 public slots:
0065     void slotUpdateProfile(int ix);
0066 
0067 protected:
0068     QComboBox *m_profilesCombo;
0069     EncodingProfilesManager::ProfileType m_type;
0070     bool m_showAutoItem;
0071     KMessageWidget *m_messageWidget;
0072 
0073 private:
0074     QPlainTextEdit *m_info;
0075 
0076 private slots:
0077     void slotManageEncodingProfile();
0078     virtual void loadEncodingProfiles();
0079 };
0080 
0081 class EncodingTimelinePreviewProfilesChooser : public EncodingProfilesChooser
0082 {
0083     Q_OBJECT
0084 
0085 public:
0086     EncodingTimelinePreviewProfilesChooser(QWidget *parent, bool showAutoItem = false, const QString &defaultValue = {}, bool selectFromConfig = false);
0087     /** @brief Only enable preview profiles with matching framerate */
0088     void filterPreviewProfiles(const QString &profile) override;
0089 
0090 private slots:
0091     void loadEncodingProfiles() override;
0092 
0093 signals:
0094     void currentIndexChanged();
0095 };