LeechCraft Monocle  0.6.70-6645-gcd10d7e
Modular document viewer for LeechCraft
LeechCraft::Monocle::ISearchableDocument Class Referenceabstract

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...
 

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 47 of file isearchabledocument.h.

Constructor & Destructor Documentation

virtual LeechCraft::Monocle::ISearchableDocument::~ISearchableDocument ( )
inlinevirtual

Virtual destructor.

Definition at line 52 of file isearchabledocument.h.

References GetTextPositions(), and Q_DECLARE_INTERFACE().

+ Here is the call graph for this function:

Member Function Documentation

virtual QMap<int, QList<QRectF> > LeechCraft::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.

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.

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.

Referenced by ~ISearchableDocument().

+ Here is the caller graph for this function:


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