![]() |
LeechCraft Monocle
0.6.70-6645-gcd10d7e
Modular document viewer for LeechCraft
|
Interface for documents supporting searching for text. More...
#include "isearchabledocument.h"
Public Member Functions | |
virtual | ~ISearchableDocument () |
Virtual destructor. More... | |
virtual QMap< int, QList< QRectF > > | GetTextPositions (const QString &text, Qt::CaseSensitivity cs)=0 |
Returns the search results for the text. More... | |
Interface for documents supporting searching for text.
If document represents a format that supports searching for text, the document should implement this interface.
Definition at line 47 of file isearchabledocument.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 52 of file isearchabledocument.h.
References GetTextPositions(), and Q_DECLARE_INTERFACE().
|
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.
Rectangles should be in page coordinates, that is, with width from 0 to page's width and height from 0 to page's height.
If a page doesn't contain any occurrences of text it should better be omitted from the map for performance reasons.
[in] | text | The text to search for. |
[in] | cs | The case sensitivity of the search. |
Referenced by ~ISearchableDocument().