X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fprofilesdialog.h;h=1bac83d3a6cd3de178dbc005f65b5968824469cd;hb=c6032c1c3f29018ee84aa3078f8d2b7e858497ae;hp=a4f4d5744a33d444e295afdac0bffc95eba741f5;hpb=3451ee36fb5db94edf8732f1699dcc68e775b634;p=kdenlive diff --git a/src/profilesdialog.h b/src/profilesdialog.h index a4f4d574..1bac83d3 100644 --- a/src/profilesdialog.h +++ b/src/profilesdialog.h @@ -21,29 +21,47 @@ #ifndef PROFILESDIALOG_H #define PROFILESDIALOG_H -#include +#include "definitions.h" #include "ui_profiledialog_ui.h" -class ProfilesDialog : public QDialog { +class ProfilesDialog : public QDialog +{ Q_OBJECT public: ProfilesDialog(QWidget * parent = 0); - static QStringList getProfileNames(); - static QString getProfileDescription(QString name); + void fillList(const QString selectedProfile = QString()); static QMap< QString, QString > getSettingsForProfile(const QString profileName); static QMap< QString, QString > getSettingsFromFile(const QString path); + static QString getPathFromDescription(const QString profileDesc); + static MltVideoProfile getVideoProfile(QString name); + static QMap getProfilesInfo(); + static void saveProfile(MltVideoProfile &profile); + static QString existingProfile(MltVideoProfile profile); + static bool existingProfileDescription(const QString &desc); + static double getStringEval(const MltVideoProfile &profile, QString eval); + +protected: + virtual void closeEvent(QCloseEvent *event); private slots: void slotUpdateDisplay(); + void slotCreateProfile(); + bool slotSaveProfile(); + void slotDeleteProfile(); + void slotSetDefaultProfile(); + void slotProfileEdited(); + virtual void accept(); private: Ui::ProfilesDialog_UI m_view; - QStringList m_mltProfilesList; - QStringList m_customProfilesList; + int m_selectedProfileIndex; + bool m_profileIsModified; bool m_isCustomProfile; + void saveProfile(const QString path); + bool askForSave(); };