- void setScene(QGraphicsScene* scene);
- bool saveDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv);
- bool loadDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv);
+ void setScene(QGraphicsScene* scene, int width, int height);
+ bool saveDocument(const KUrl& url, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int duration, bool embed_images = false);
+ QDomDocument xml(QGraphicsRectItem* startv, QGraphicsRectItem* endv, bool embed_images = false);
+ int loadFromXml(const QDomDocument& doc, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int *duration, const QString& projectpath = QString());
+ /** \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() const;
+ int frameWidth() const;
+ int frameHeight() const;
+ /** \brief Extract embeded images in project titles folder. */
+ static const QString extractBase64Image(const QString &titlePath, const QString &data);
+
+ enum ItemOrigin {OriginXLeft = 0, OriginYTop = 1};
+ enum AxisPosition {AxisDefault = 0, AxisInverted = 1};
+