]> git.sesse.net Git - kdenlive/blobdiff - src/dvdwizardmenu.h
Updated DVD wizard (added load/save dvd projects)
[kdenlive] / src / dvdwizardmenu.h
index 01a0c73ba25a9846e6ce101bdbb8c499f38bfd9c..d1ac8371707eb38cf2b3d85709d0c19ddb584545 100644 (file)
@@ -26,6 +26,7 @@
 #include <QGraphicsTextItem>
 #include <QGraphicsPixmapItem>
 #include <QGraphicsRectItem>
+#include <QDomElement>
 
 #include <KDebug>
 
@@ -56,22 +57,33 @@ class DvdButton : public QGraphicsTextItem
 {
 
 public:
-    DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0) {}
+    DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0), m_command(QString("jump title 1")), m_backToMenu(false) {}
     enum { Type = UserType + 1 };
-    void setTarget(int t) {
+    void setTarget(int t, QString c) {
         m_target = t;
+        m_command = c;
     }
     int target() const {
         return m_target;
     }
+    QString command() const {
+        return m_command;
+    }
+    bool backMenu() const {
+        return m_backToMenu;
+    }
     int type() const {
         // Enable the use of qgraphicsitem_cast with this item.
         return Type;
     }
+    void setBackMenu(bool back) {
+        m_backToMenu = back;
+    }
 
 private:
     int m_target;
-
+    QString m_command;
+    bool m_backToMenu;
 
 protected:
 
@@ -112,11 +124,14 @@ public:
     bool createMenu() const;
     void createBackgroundImage(const QString &img1);
     void createButtonImages(const QString &img1, const QString &img2, const QString &img3);
-    void setTargets(QStringList list);
-    QMap <int, QRect> buttonsInfo();
+    void setTargets(QStringList list, QStringList targetlist);
+    QMap <QString, QRect> buttonsInfo();
     bool menuMovie() const;
     QString menuMoviePath() const;
     bool isPalMenu() const;
+    void changeProfile(bool isPal);
+    QDomElement toXml() const;
+    void loadXml(QDomElement xml);
 
 private:
     Ui::DvdWizardMenu_UI m_view;
@@ -127,7 +142,6 @@ private:
     QGraphicsRectItem *m_safeRect;
     int m_width;
     int m_height;
-    QStringList m_targets;
 
 private slots:
     void buildButton();
@@ -135,7 +149,6 @@ private slots:
     void buildImage();
     void checkBackground();
     void checkBackgroundType(int ix);
-    void changeProfile(int ix);
     void updatePreview();
     void buttonChanged();
     void addButton();
@@ -143,6 +156,7 @@ private slots:
     void deleteButton();
     void updateColor();
     void updateColor(QColor c);
+    void setBackToMenu(bool backToMenu);
 };
 
 #endif