kviewshell
DocumentPageCache Class Reference
#include <documentPageCache.h>
Detailed Description
Definition at line 27 of file documentPageCache.h.
Constructor & Destructor Documentation
DocumentPageCache::DocumentPageCache | ( | ) |
Definition at line 23 of file documentPageCache.cpp.
DocumentPageCache::~DocumentPageCache | ( | ) | [virtual] |
Definition at line 37 of file documentPageCache.cpp.
Member Function Documentation
void DocumentPageCache::clear | ( | ) | [slot] |
RenderedDocumentPagePixmap * DocumentPageCache::createDocumentPagePixmap | ( | ) | const [protected, virtual] |
This function creates new RenderedDocumentPagePixmap objects.
If a multipage implementation needs additional functionality overwrite this function to create objects of a suitable subclass of RenderedDocumentPagePixmap.
Definition at line 255 of file documentPageCache.cpp.
QString DocumentPageCache::createKey | ( | const PageNumber & | pageNumber | ) | [protected] |
Creates the hashing function.
The size of the page is calculated based on the current resolution.
Definition at line 140 of file documentPageCache.cpp.
QString DocumentPageCache::createKey | ( | const PageNumber & | pageNumber, | |
const QSize & | size | |||
) | [protected] |
QPixmap DocumentPageCache::createThumbnail | ( | const PageNumber & | pageNr, | |
int | width | |||
) |
Returns a "width" pixels width thumbnail of the given page.
This method returns an empty QPixmap if one of the arguments is invalid, or if the page cannot be rendered for any reason.
Definition at line 287 of file documentPageCache.cpp.
void DocumentPageCache::deselectText | ( | ) |
Definition at line 325 of file documentPageCache.cpp.
RenderedDocumentPagePixmap * DocumentPageCache::getPage | ( | const PageNumber & | pageNr | ) |
Returns a pointer to a documentPage structure, or 0, if the documentPage could not be generated for some reason (e.g., because no renderer has been set).
Definition at line 172 of file documentPageCache.cpp.
double DocumentPageCache::getResolution | ( | ) | const [inline] |
Definition at line 43 of file documentPageCache.h.
bool DocumentPageCache::isPageCached | ( | const PageNumber & | pageNumber | ) |
Checks if the given page is already in the cache.
Here we don't care about the size of the page.
Definition at line 152 of file documentPageCache.cpp.
bool DocumentPageCache::isPageCached | ( | const PageNumber & | pageNumber, | |
const QSize & | size | |||
) |
Checks if the given page is already in the cache.
Definition at line 101 of file documentPageCache.cpp.
void DocumentPageCache::paperSizeChanged | ( | ) | [signal] |
This signal is emitted when setUserPreferredSize() or setUseUserPreferredSize() is called, and the page size changes accordingly.
const TextSelection& DocumentPageCache::selectedText | ( | ) | const [inline] |
Definition at line 45 of file documentPageCache.h.
void DocumentPageCache::selectText | ( | const TextSelection & | selection | ) |
Definition at line 331 of file documentPageCache.cpp.
void DocumentPageCache::setRenderer | ( | DocumentRenderer * | _renderer | ) |
This method is used to name the DocumentRenderer, that the documentPageCache uses to render the page.
The renderer can be used any time (e.g., triggered by an internal timer event), and must not be deleted before either the DocumentRenderer is deleted, or another renderer has been set.
Definition at line 42 of file documentPageCache.cpp.
void DocumentPageCache::setResolution | ( | double | res | ) |
Definition at line 77 of file documentPageCache.cpp.
void DocumentPageCache::setUseDocumentSpecifiedSize | ( | bool | b | ) | [slot] |
Definition at line 277 of file documentPageCache.cpp.
void DocumentPageCache::setUserPreferredSize | ( | const SimplePageSize & | t | ) | [slot] |
Sets the userPreferredSize, which is explained below.
Definition at line 267 of file documentPageCache.cpp.
SimplePageSize DocumentPageCache::sizeOfPage | ( | const PageNumber & | page = 1 |
) | const |
Returns the size of page 'page'.
If the document does not specify a size (which happens, e.g., for some DVI-files), then the userPreferredSize is returned.
Definition at line 49 of file documentPageCache.cpp.
QSize DocumentPageCache::sizeOfPageInPixel | ( | const PageNumber & | page | ) | const |
Returns the size of page 'page', in pixels, using the resolution set with setResolution().
If the document does not specify a size (which happens, e.g., for some DVI-files), the userPreferredSize is used.
Definition at line 82 of file documentPageCache.cpp.
void DocumentPageCache::textSelected | ( | bool | ) | [signal] |
This signal is emitted when the text selection of the current document changes.
The argument is false if no text is selected, true otherwise.
Member Data Documentation
QGuardedPtr<DocumentRenderer> DocumentPageCache::renderer [protected] |
Definition at line 111 of file documentPageCache.h.
The documentation for this class was generated from the following files: