]> git.sesse.net Git - kdenlive/blobdiff - src/titledocument.h
Add new dialog for template clips, fix thumbs & monitors not updating when clip is...
[kdenlive] / src / titledocument.h
index fab51a5e63a642ee78446571a4983f216d7b4e84..263d79e67e1bb497fd25ea66f1023d04296e3356 100644 (file)
  ***************************************************************************/
 #ifndef TITLEDOCUMENT_H
 #define TITLEDOCUMENT_H
+
+#include <QDomDocument>
+
 #include <KUrl>
 
 class QGraphicsScene;
 class QGraphicsPolygonItem;
 
-class TitleDocument {
-    QGraphicsScene* scene;
+class TitleDocument
+{
+
 public:
     TitleDocument();
     void setScene(QGraphicsScene* scene);
     bool saveDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv);
-    bool loadDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv);
+    int loadDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv);
+    QDomDocument xml(QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv);
+    int loadFromXml(QDomDocument doc, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv);
+    /** \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();
+
+    enum ItemOrigin {OriginXLeft = 0, OriginYTop = 1};
+    enum AxisPosition {AxisDefault = 0, AxisInverted = 1};
+
 private:
+    QGraphicsScene* m_scene;
     QString colorToString(const QColor&);
     QString rectFToString(const QRectF&);
     QRectF stringToRect(const QString &);