kword
KWViewModeText Class Reference
#include <KWViewMode.h>

Detailed Description
The 'edit only one text frameset' view mode.Definition at line 252 of file KWViewMode.h.
Public Member Functions | |
KWViewModeText (KWDocument *doc, KWCanvas *canvas, KWTextFrameSet *fs) | |
KWTextFrameSet * | textFrameSet () const |
virtual QPoint | normalToView (const QPoint &nPoint) |
virtual QPoint | viewToNormal (const QPoint &vPoint) |
virtual QSize | contentsSize () |
virtual QRect | viewPageRect (int) |
virtual QSize | availableSizeForText (KWTextFrameSet *textfs) |
virtual QPoint | pageCorner () |
virtual QRect | rulerFrameRect () |
virtual void | setPageLayout (KoRuler *hRuler, KoRuler *vRuler, const KoPageLayout &layout) |
virtual void | drawPageBorders (QPainter *painter, const QRect &crect, const QRegion &emptySpaceRegion) |
virtual const QString | type () const |
virtual bool | shouldFormatVertically () |
virtual bool | shouldAdjustMargins () |
virtual bool | hasFrames () |
virtual bool | hasPages () |
virtual bool | isFrameSetVisible (const KWFrameSet *fs) |
virtual bool | isTextModeFrameset (KWFrameSet *fs) const |
Static Public Member Functions | |
static KWTextFrameSet * | determineTextFrameSet (KWDocument *doc) |
Static Public Attributes | |
static const int | OFFSET = 10 |
Member Function Documentation
KWTextFrameSet * KWViewModeText::determineTextFrameSet | ( | KWDocument * | doc | ) | [static] |
Return a text frameset that the user has either selected or is currently editing, returning the main text frameset otherwise.
If the selected frame is not a text FS, and the user is not editing one in the first view plus the document has no main text frameset then this method will return 0
Definition at line 462 of file KWViewMode.cpp.
QPoint KWViewModeText::normalToView | ( | const QPoint & | nPoint | ) | [virtual] |
QPoint KWViewModeText::viewToNormal | ( | const QPoint & | vPoint | ) | [virtual] |
QSize KWViewModeText::contentsSize | ( | ) | [virtual] |
Size of the contents area, in pixels.
Implements KWViewMode.
Definition at line 502 of file KWViewMode.cpp.
virtual QRect KWViewModeText::viewPageRect | ( | int | pgNum | ) | [inline, virtual] |
Return view coord for page rect.
Avoids rounding problems when doing normalToView(zoomedRect)
Implements KWViewMode.
Definition at line 271 of file KWViewMode.h.
QSize KWViewModeText::availableSizeForText | ( | KWTextFrameSet * | textfs | ) | [virtual] |
Size (in pixels) of the total area available for text in a given textframeset This is used by KWTextFrameSet::drawFrame to erase between the bottom of the last paragraph and the bottom of the available area.
Reimplemented from KWViewMode.
Definition at line 519 of file KWViewMode.cpp.
virtual QPoint KWViewModeText::pageCorner | ( | ) | [inline, virtual] |
"Topleft of current page" - concept used by the rulers.
The default implementation is good enough for any page-based viewmode, since it calls normalToView. But the textmode has no page concept.
Reimplemented from KWViewMode.
Definition at line 274 of file KWViewMode.h.
QRect KWViewModeText::rulerFrameRect | ( | ) | [virtual] |
The result of this is passed to setFrameStartEnd for both rulers (after adjustement with pageCorner()).
Reimplemented from KWViewMode.
Definition at line 569 of file KWViewMode.cpp.
void KWViewModeText::setPageLayout | ( | KoRuler * | hRuler, | |
KoRuler * | vRuler, | |||
const KoPageLayout & | layout | |||
) | [virtual] |
Called when the page layout is set, or changes.
Usually this is directly passed to KoRuler (for page-based viewmodes)
Reimplemented from KWViewMode.
Definition at line 574 of file KWViewMode.cpp.
virtual const QString KWViewModeText::type | ( | ) | const [inline, virtual] |
Return the name of the viewmode, used for loading/saving.
Implements KWViewMode.
Definition at line 279 of file KWViewMode.h.
virtual bool KWViewModeText::shouldFormatVertically | ( | ) | [inline, virtual] |
Should formatVertically() happen (to skip frame bottom, frames on top, etc.
)
Reimplemented from KWViewMode.
Definition at line 280 of file KWViewMode.h.
virtual bool KWViewModeText::shouldAdjustMargins | ( | ) | [inline, virtual] |
Should adjust[LR]Margin() happen (to run the text around frames on top etc.
)
Reimplemented from KWViewMode.
Definition at line 281 of file KWViewMode.h.
virtual bool KWViewModeText::hasFrames | ( | ) | [inline, virtual] |
Does this viewmode know anything about frames?
Reimplemented from KWViewMode.
Definition at line 282 of file KWViewMode.h.
virtual bool KWViewModeText::hasPages | ( | ) | [inline, virtual] |
Does this viewmode know anything about pages?
Reimplemented from KWViewMode.
Definition at line 283 of file KWViewMode.h.
bool KWViewModeText::isFrameSetVisible | ( | const KWFrameSet * | ) | [virtual] |
Should this frameset be visible in this viewmode? True by default, all are shown.
Reimplemented from KWViewMode.
Definition at line 524 of file KWViewMode.cpp.
bool KWViewModeText::isTextModeFrameset | ( | KWFrameSet * | ) | const [virtual] |
Answers the question if argument frameset has to be drawn as a text-mode text area if true, or if false as a frame with its own contents.
Reimplemented from KWViewMode.
Definition at line 594 of file KWViewMode.cpp.
Member Data Documentation
const int KWViewModeText::OFFSET = 10 [static] |
hardcoded distance from the left side this viewmode starts its rendering
Definition at line 290 of file KWViewMode.h.
The documentation for this class was generated from the following files: