192 "org.LeechCraft.Monocle.IAnnotation/1.0")
193Q_DECLARE_INTERFACE (
LC::Monocle::ITextAnnotation,
194 "org.LeechCraft.Monocle.ITextAnnotation/1.0")
195Q_DECLARE_INTERFACE (
LC::Monocle::IHighlightAnnotation,
196 "org.LeechCraft.Monocle.IHighlightAnnotation/1.0")
197Q_DECLARE_INTERFACE (
LC::Monocle::ILinkAnnotation,
198 "org.LeechCraft.Monocle.ILinkAnnotation/1.0")
199Q_DECLARE_INTERFACE (
LC::Monocle::ICaretAnnotation,
200 "org.LeechCraft.Monocle.ICaretAnnotation/1.0")
202Q_DECLARE_METATYPE (
LC::Monocle::IAnnotation_ptr)
Base interface for annotations.
virtual QRectF GetBoundary() const =0
Returns the bounding rectangle of the annotation.
virtual QDateTime GetDate() const =0
Returns the date the annotation was created.
virtual AnnotationType GetAnnotationType() const =0
Returns the type of the annotation.
virtual QString GetText() const =0
Returns the text contained in the annotation.
virtual QString GetAuthor() const =0
Returns the author of the annotation.
The interface for AnnotationType::Caret annotations.
virtual ~ICaretAnnotation()
The interface for AnnotationType::Highlight annotations.
virtual ~IHighlightAnnotation()
virtual QList< QPolygonF > GetPolygons() const =0
Returns the shape of the highlight.
The interface for AnnotationType::Link annotations.
virtual ~ILinkAnnotation()
virtual ILink_ptr GetLink() const =0
Returns the link corresponding to this annotation.
The interface for AnnotationType::Text annotations.
virtual ~ITextAnnotation()
virtual bool IsInline() const =0
Returns whether this is an inline annotation.
std::shared_ptr< ILinkAnnotation > ILinkAnnotation_ptr
std::shared_ptr< IAnnotation > IAnnotation_ptr
std::shared_ptr< IHighlightAnnotation > IHighlightAnnotation_ptr
std::shared_ptr< ILink > ILink_ptr
std::shared_ptr< ITextAnnotation > ITextAnnotation_ptr
std::shared_ptr< ICaretAnnotation > ICaretAnnotation_ptr
AnnotationType
Defines an annotation type.
@ Highlight
A highlighted block in the text.
@ Other
Another type of annotation.
@ Link
An annotation with a link.
@ Text
A simple text annotation.
@ Caret
A caret pointing to some text inserted.