okular
pageitem.cpp
Go to the documentation of this file.
114 Observer *observer = m_isThumbnail ? m_documentItem.data()->thumbnailObserver() : m_documentItem.data()->pageviewObserver();
205 foreach(const KBookmark &bookmark, m_documentItem.data()->document()->bookmarkManager()->bookmarks(m_viewPort.pageNumber)) {
218 //normalizedX is a proportion, so contentX will be the difference between document and viewport times normalizedX
219 m_flickable.data()->setProperty("contentX", qMax((qreal)0, width() - m_flickable.data()->width()) * viewPort.rePos.normalizedX);
221 m_flickable.data()->setProperty("contentY", qMax((qreal)0, height() - m_flickable.data()->height()) * viewPort.rePos.normalizedY);
233 return QPointF(qMax((qreal)0, width() - m_flickable.data()->width()) * viewPort.rePos.normalizedX,
262 if (m_bookmarked && m_documentItem.data()->document()->bookmarkManager()->bookmarks(m_viewPort.pageNumber).count() == 0) {
294 void PageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
307 Observer *observer = m_isThumbnail ? m_documentItem.data()->thumbnailObserver() : m_documentItem.data()->pageviewObserver();
312 requestedPixmaps.push_back(new Okular::PixmapRequest(observer, m_viewPort.pageNumber, width(), height(), priority, Okular::PixmapRequest::Asynchronous));
313 const Okular::Document::PixmapRequestFlag prf = m_isThumbnail ? Okular::Document::NoOption : Okular::Document::RemoveAllPrevious;
317 const int flags = PagePainter::Accessibility | PagePainter::Highlights | PagePainter::Annotations;
318 PagePainter::paintPageOnPainter(painter, m_page, observer, flags, width(), height(), option->exposedRect.toRect());
355 bool newBookmarked = m_documentItem.data()->document()->bookmarkManager()->isBookmarked(m_viewPort.pageNumber);
371 m_viewPort.rePos.normalizedX = m_flickable.data()->property("contentX").toReal() / (width() - m_flickable.data()->width());
380 m_viewPort.rePos.normalizedY = m_flickable.data()->property("contentY").toReal() / (height() - m_flickable.data()->height());
Q_INVOKABLE void goToBookmark(const QString &bookmark)
loads a page bookmark and tries to ensure the bookmarked position is visible
Definition: pageitem.cpp:211
void bookmarkedChanged()
void pageNumberChanged()
Q_INVOKABLE void removeBookmark(const QString &bookmark)
Remove a bookmark at a given position, if any.
Definition: pageitem.cpp:270
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
Definition: pageitem.cpp:277
int implicitHeight() const
Q_INVOKABLE void removeBookmarkAtPos(qreal x, qreal y)
Remove a bookmark ar a given position of the current page (if present)
Definition: pageitem.cpp:253
BookmarkManager * bookmarkManager() const
Returns the bookmark manager of the document.
Definition: document.cpp:3493
Definition: documentitem.h:37
void flickableChanged()
void documentChanged()
int pageNumber() const
QDeclarativeItem * flickable() const
int pageNumber
The number of the page nearest the center of the viewport.
Definition: document.h:1035
void implicitHeightChanged()
struct Okular::DocumentViewport::@0 rePos
If 'rePos.enabled == true' then this structure contains the viewport center or top left depending on ...
Q_INVOKABLE QPointF bookmarkPosition(const QString &bookmark) const
Returns the position in the page for a bookmark QPointF(-1,-1) if doesn't belong to this page...
Definition: pageitem.cpp:225
Definition: documentitem.h:167
int implicitWidth() const
DocumentItem * document() const
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Definition: pageitem.cpp:294
QStringList bookmarks() const
Q_INVOKABLE void setBookmarkAtPos(qreal x, qreal y)
Add a new bookmark ar a given position of the current page.
Definition: pageitem.cpp:237
void bookmarksChanged()
bool smooth() const
Remove all the previous requests, even for non requested page pixmaps.
Definition: document.h:350
void implicitWidthChanged()
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.