]> git.sesse.net Git - kdenlive/blobdiff - src/titledocument.h
Allow to loop selected timeline item
[kdenlive] / src / titledocument.h
index cc5d838e6fcb6213c405f750a18d1fcccc3b0b78..ca5e92bc7fc14885d3e4fa93ed5d6d00106ca09f 100644 (file)
 #include <KUrl>
 
 class QGraphicsScene;
-class QGraphicsPolygonItem;
+class QGraphicsRectItem;
+class QGraphicsItem;
+
+const int ROTATEFACTOR = 103;
+const int ZOOMFACTOR = 104;
 
 class TitleDocument
 {
@@ -30,10 +34,9 @@ class TitleDocument
 public:
     TitleDocument();
     void setScene(QGraphicsScene* scene, int width, int height);
-    bool saveDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv, double out);
-    int loadDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv, double *out);
-    QDomDocument xml(QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv);
-    int loadFromXml(QDomDocument doc, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv, double *out);
+    bool saveDocument(const KUrl& url, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int out, bool embed_images = false );
+    QDomDocument xml(QGraphicsRectItem* startv, QGraphicsRectItem* endv, bool embed_images = false );
+    int loadFromXml(QDomDocument doc, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int *out,const QString& projectpath="");
     /** \brief Get the background color (incl. alpha) from the document, if possibly
      * \returns The background color of the document, inclusive alpha. If none found, returns (0,0,0,0) */
     QColor getBackgroundColor();
@@ -45,6 +48,7 @@ public:
 
 private:
     QGraphicsScene* m_scene;
+    QString m_projectPath;
     int m_width;
     int m_height;
     QString colorToString(const QColor&);
@@ -52,6 +56,8 @@ private:
     QRectF stringToRect(const QString &);
     QColor stringToColor(const QString &);
     QTransform stringToTransform(const QString &);
+    QList<QVariant> stringToList(const QString &);
+    int base64ToUrl(QGraphicsItem* item, QDomElement& content, bool embed);
 };
 
 #endif