LeechCraft Monocle 0.6.70-17335-ge406ffdcaf
Modular document viewer for LeechCraft
Loading...
Searching...
No Matches
LC::Monocle::ISearchableDocument Class Referenceabstract

Interface for documents supporting searching for text. More...

#include "isearchabledocument.h"

Public Member Functions

virtual QMap< int, QList< PageRelativeRectBase > > GetTextPositions (const QString &text, Qt::CaseSensitivity cs)=0
 Returns the search results for the text.
 

Protected Member Functions

virtual ~ISearchableDocument ()=default
 

Detailed Description

Interface for documents supporting searching for text.

If document represents a format that supports searching for text, the document should implement this interface.

See also
IDocument

Definition at line 26 of file isearchabledocument.h.

Constructor & Destructor Documentation

◆ ~ISearchableDocument()

virtual LC::Monocle::ISearchableDocument::~ISearchableDocument ( )
protectedvirtualdefault

Member Function Documentation

◆ GetTextPositions()

virtual QMap< int, QList< PageRelativeRectBase > > LC::Monocle::ISearchableDocument::GetTextPositions ( const QString & text,
Qt::CaseSensitivity cs )
pure virtual

Returns the search results for the text.

This function should return the map where keys are indexes of pages containing the given text and with each value corresponding to a key being a list of rectangles containing the text on the page.

If a page doesn't contain any occurrences of text it should better be omitted from the map for performance reasons.

Parameters
[in]textThe text to search for.
[in]csThe case sensitivity of the search.
Returns
The map from page indexes to list of rectangles containing text for those indexes.

The documentation for this class was generated from the following file: