80 act.TargetArea_.value_or (QRectF {}).getRect (&x, &y, &w, &h);
81 return std::tie (act.PageNumber_, x, y, w, h);
84 return toTuple (*
this) < toTuple (other);
110 using LinkAction = std::variant<NoAction, NavigationAction, ExternalNavigationAction, UrlAction, CustomAction>;
Base interface for links.
virtual LinkType GetLinkType() const =0
Returns the link type.
virtual QRectF GetArea() const =0
Returns the area on the page of this link.
virtual QString GetToolTip() const
Returns the tooltip for the link.
virtual LinkAction GetLinkAction() const =0
Returns the link action.
virtual ~ILink()=default
Virtual destructor.
std::variant< NoAction, NavigationAction, ExternalNavigationAction, UrlAction, CustomAction > LinkAction
std::shared_ptr< ILink > ILink_ptr
LinkType
Describes various link types known to Monocle.
@ OtherLink
Other link type.
@ Command
Some standard command like printing.
@ PageLink
A link to a page.
std::function< void()> CustomAction
A link action that represents navigating to a different document.
NavigationAction DocumentNavigation_
A link action that represents navigating inside the document.
std::optional< QRectF > TargetArea_
bool operator<(const NavigationAction &other) const
bool operator==(const NavigationAction &) const =default
std::optional< double > Zoom_