X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fprofilesdialog.h;h=d9f1c0d77898b3bca8ac34999ae791a84c5a6a83;hb=e0a70e0428309070f6ed2716beaeaaba05edd3b5;hp=a9927babaa901bfda785a0054e3cc248a7cc3885;hpb=4b24e46624307c866463521b97490c4d211065d0;p=kdenlive diff --git a/src/profilesdialog.h b/src/profilesdialog.h index a9927bab..d9f1c0d7 100644 --- a/src/profilesdialog.h +++ b/src/profilesdialog.h @@ -31,6 +31,8 @@ class ProfilesDialog : public QDialog public: ProfilesDialog(QWidget * parent = 0); + /** @brief Using this constructor, the dialog only allows editing one profile. */ + ProfilesDialog(QString profilePath, QWidget * parent = 0); void fillList(const QString selectedProfile = QString()); static QMap< QString, QString > getSettingsForProfile(const QString profileName); @@ -38,7 +40,7 @@ public: static QString getPathFromDescription(const QString profileDesc); static MltVideoProfile getVideoProfile(QString name); static QMap getProfilesInfo(); - static void saveProfile(MltVideoProfile &profile); + static void saveProfile(MltVideoProfile &profile, QString profilePath = QString()); static QString existingProfile(MltVideoProfile profile); static bool existingProfileDescription(const QString &desc); @@ -65,18 +67,23 @@ public: * @param profile The profile that gives width & height * @param eval The string to be evaluated, for example: "%width / 2" * @return the evaluated value */ - static double getStringEval(const MltVideoProfile &profile, QString eval); + static double getStringEval(const MltVideoProfile &profile, QString eval, QPoint frameSize = QPoint()); /** @brief Get the descriptive text for given colorspace code (defined by MLT) * @param colorspace An int as defined in mlt_profile.h * @return The string description */ static QString getColorspaceDescription(int colorspace); + /** @brief Get the colorspace code (defined by MLT) from a descriptive text + * @param desctiption A string description as defined in getColorspaceDescription(int colorspace) + * @return The int code */ + static int getColorspaceFromDescription(const QString &description); + protected: virtual void closeEvent(QCloseEvent *event); private slots: - void slotUpdateDisplay(); + void slotUpdateDisplay(QString currentProfile = QString()); void slotCreateProfile(); bool slotSaveProfile(); void slotDeleteProfile(); @@ -89,6 +96,8 @@ private: int m_selectedProfileIndex; bool m_profileIsModified; bool m_isCustomProfile; + /** @brief If we are in single profile editing, should contain the path for this profile. */ + QString m_customProfilePath; void saveProfile(const QString path); bool askForSave(); };