aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/Annotation.h
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2018-04-27 17:26:02 -0400
committerZackaryWelch <welch.zackary@gmail.com>2018-04-27 17:26:02 -0400
commit253bacc6ee0d825564bef6aa507296e79b2611ff (patch)
tree0d87304383654f25f83259cdb0ae776706250c23 /src-qt5/desktop-utils/lumina-pdf/Annotation.h
parentMerge branch 'master' of http://github.com/trueos/lumina (diff)
downloadlumina-253bacc6ee0d825564bef6aa507296e79b2611ff.tar.gz
lumina-253bacc6ee0d825564bef6aa507296e79b2611ff.tar.bz2
lumina-253bacc6ee0d825564bef6aa507296e79b2611ff.zip
Added more annotation and widget support. Currently incomplete. Updated to MuPDF 1.13.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/Annotation.h')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/Annotation.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/Annotation.h b/src-qt5/desktop-utils/lumina-pdf/Annotation.h
new file mode 100644
index 00000000..60df6a2d
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-pdf/Annotation.h
@@ -0,0 +1,46 @@
+#include <QList>
+#include <QVector>
+#include <QPointF>
+#include <QPolygonF>
+
+class Annotation{
+ public:
+ Annotation(int _annotType, double _opacity, QRectF _loc = QRectF()) : annotType(_annotType), opacity(_opacity), loc(_loc) { }
+
+ virtual ~Annotation() { }
+
+ virtual int getType() { return annotType; }
+ virtual QRectF getLoc() { return loc; }
+
+ virtual QString getAuthor() { return author; }
+ virtual QString getText() { return text; }
+ virtual QList<QPolygonF> getQuadList() { return quadList; }
+ virtual QVector<QVector<QPointF>> getInkList() { return inkList; }
+ virtual QColor getColor() { return color; }
+ virtual QColor getInternalColor() { return iColor; }
+ virtual double getOpacity() { return opacity; }
+ virtual bool print() { return canPrint; }
+
+ virtual void setAuthor(QString _author) { author = _author; }
+ virtual void setContents(QString _text) { text = _text; }
+ virtual void setColor(QColor _color) { color = _color; };
+ virtual void setInternalColor(QColor _iColor) { iColor = _iColor; };
+ virtual void setQuadList(QList<QPolygonF> _quadList) { quadList = _quadList; };
+ virtual void setInkList(QVector<QVector<QPointF>> _inkList) { inkList = _inkList; };
+ virtual void setPrint(bool _print) { canPrint = _print; }
+
+ virtual QImage renderImage() = 0;
+
+ private:
+ int annotType;
+ double opacity;
+ QRectF loc;
+
+ QString author;
+ QString text;
+ QColor color;
+ QColor iColor;
+ QList<QPolygonF> quadList;
+ QVector<QVector<QPointF>> inkList;
+ bool canPrint;
+};
bgstack15