]> git.sesse.net Git - kdenlive/blobdiff - src/profilesdialog.h
Ask to change profile if first clip does not match project profile:
[kdenlive] / src / profilesdialog.h
index 2466cd51d78549e049d338dc9ee2bf921abbc2e3..92a7fc4e8965db7f0a90ec4f3e9179d519b1814e 100644 (file)
 #ifndef PROFILESDIALOG_H
 #define PROFILESDIALOG_H
 
-#include <QDialog>
 
+#include "definitions.h"
 #include "ui_profiledialog_ui.h"
 
 class ProfilesDialog : public QDialog
 {
-  Q_OBJECT
-  
-  public:
+    Q_OBJECT
+
+public:
     ProfilesDialog(QWidget * parent = 0);
 
-  static QStringList getProfileNames();
-  static QMap< QString, QString > getSettingsForProfile(const QString path);
+    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 <QString, QString> getProfilesInfo();
+    static void saveProfile(MltVideoProfile &profile);
+    static QString existingProfile(MltVideoProfile profile);
+    static bool existingProfileDescription(const QString &desc);
+    static QString getPathFromProperties(int width, int height, double fps, double par = 0, double dar = 0);
+    static double getStringEval(const MltVideoProfile &profile, QString eval);
+
+protected:
+    virtual void closeEvent(QCloseEvent *event);
 
-  private slots:
+private slots:
     void slotUpdateDisplay();
+    void slotCreateProfile();
+    bool slotSaveProfile();
+    void slotDeleteProfile();
+    void slotSetDefaultProfile();
+    void slotProfileEdited();
+    virtual void accept();
 
-  private:
+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();
 };