Okular::DocumentViewport
#include <document.h>
Public Types | |
enum | Position { Center = 1 , TopLeft = 2 } |
Public Member Functions | |
DocumentViewport (const QString &xmlDesc) | |
DocumentViewport (int number=-1) | |
bool | isValid () const |
bool | operator< (const DocumentViewport &other) const |
bool | operator== (const DocumentViewport &other) const |
QString | toString () const |
Public Attributes | ||
struct { | ||
bool enabled | ||
bool height | ||
bool width | ||
} | autoFit | |
int | pageNumber | |
struct { | ||
bool enabled | ||
double normalizedX | ||
double normalizedY | ||
Position pos | ||
} | rePos | |
Detailed Description
A view on the document.
The Viewport structure is the 'current view' over the document. Contained data is broadcasted between observers to synchronize their viewports to get the 'I scroll one view and others scroll too' views.
Definition at line 1449 of file document.h.
Member Enumeration Documentation
◆ Position
Describes the relative position of the viewport.
Enumerator | |
---|---|
Center | Relative to the center of the page. |
TopLeft | Relative to the top left corner of the page. |
Definition at line 1486 of file document.h.
Constructor & Destructor Documentation
◆ DocumentViewport() [1/2]
|
explicit |
Creates a new viewport for the given page number
.
Definition at line 5799 of file document.cpp.
◆ DocumentViewport() [2/2]
|
explicit |
Creates a new viewport from the given xmlDesc
.
Definition at line 5812 of file document.cpp.
Member Function Documentation
◆ isValid()
bool DocumentViewport::isValid | ( | ) | const |
Returns whether the viewport is valid.
Definition at line 5880 of file document.cpp.
◆ operator<()
bool DocumentViewport::operator< | ( | const DocumentViewport & | other | ) | const |
Definition at line 5900 of file document.cpp.
◆ operator==()
bool DocumentViewport::operator== | ( | const DocumentViewport & | other | ) | const |
Definition at line 5885 of file document.cpp.
◆ toString()
QString DocumentViewport::toString | ( | ) | const |
Returns the viewport as xml description.
Definition at line 5865 of file document.cpp.
Member Data Documentation
◆ [struct]
struct { ... } Okular::DocumentViewport::autoFit |
If 'autoFit.enabled == true' then the page must be autofit in the viewport.
◆ enabled
bool Okular::DocumentViewport::enabled |
Definition at line 1496 of file document.h.
◆ height
bool Okular::DocumentViewport::height |
Definition at line 1508 of file document.h.
◆ normalizedX
double Okular::DocumentViewport::normalizedX |
Definition at line 1497 of file document.h.
◆ normalizedY
double Okular::DocumentViewport::normalizedY |
Definition at line 1498 of file document.h.
◆ pageNumber
int Okular::DocumentViewport::pageNumber |
The number of the page nearest the center of the viewport.
Definition at line 1481 of file document.h.
◆ pos
Position Okular::DocumentViewport::pos |
Definition at line 1499 of file document.h.
◆ [struct]
struct { ... } Okular::DocumentViewport::rePos |
If 'rePos.enabled == true' then this structure contains the viewport center or top left depending on the value of pos.
◆ width
bool Okular::DocumentViewport::width |
Definition at line 1507 of file document.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:49:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.