mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
Add Page::annotation
Will use it later
This commit is contained in:
parent
5c9edea430
commit
8690497be7
|
@ -488,6 +488,16 @@ QLinkedList< Annotation* > Page::annotations() const
|
|||
return m_annotations;
|
||||
}
|
||||
|
||||
Annotation * Page::annotation( const QString & uniqueName ) const
|
||||
{
|
||||
foreach(Annotation *a, m_annotations)
|
||||
{
|
||||
if ( a->uniqueName() == uniqueName )
|
||||
return a;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const Action * Page::pageAction( PageAction action ) const
|
||||
{
|
||||
switch ( action )
|
||||
|
|
|
@ -249,6 +249,12 @@ class OKULARCORE_EXPORT Page
|
|||
*/
|
||||
QLinkedList< Annotation* > annotations() const;
|
||||
|
||||
/**
|
||||
* Returns the annotation with the given unique name.
|
||||
* @since TODO
|
||||
*/
|
||||
Annotation * annotation( const QString & uniqueName ) const;
|
||||
|
||||
/**
|
||||
* Returns the @ref Action object which is associated with the given page @p action
|
||||
* or 0 if no page action is set.
|
||||
|
|
Loading…
Reference in a new issue