kword/part

KWView Class Reference

KWords view class. More...

#include <KWView.h>

Inheritance diagram for KWView:

List of all members.

Public Slots

void offsetInDocumentMoved (int yOffset)

Public Member Functions

 KWView (const QString &viewMode, KWDocument *document, QWidget *parent)
virtual ~KWView ()
virtual QWidgetcanvas () const
const KWPage currentPage () const
KWCanvaskwcanvas () const
KWDocumentkwdocument () const
void popupContextMenu (const QPoint &globalPosition, const QList< QAction * > &actions)
void setCurrentPage (const KWPage &page)
bool snapToGrid () const
virtual void updateReadWrite (bool readWrite)
KoViewConverter * viewConverter ()
virtual KoZoomController * zoomController () const

Protected Member Functions

virtual void showEvent (QShowEvent *event)

Detailed Description

KWords view class.

Following the broad model-view-controller idea this class shows you one view on the document. There can be multiple views of the same document each in with independent settings for viewMode and zoom etc.

Definition at line 46 of file KWView.h.


Constructor & Destructor Documentation

KWView::KWView ( const QString viewMode,
KWDocument document,
QWidget parent 
)

Construct a new view on the kword document.

The view will have a canvas as a member which does all the actual painting, the view will be responsible for handling the actions. The View is technically speaking the controller class in the MVC design.

Parameters:
viewMode the KWViewMode we should show initially.
document the document we show.
parent a parent widget we show ourselves in.

Definition at line 96 of file KWView.cpp.

KWView::~KWView (  )  [virtual]

Definition at line 142 of file KWView.cpp.


Member Function Documentation

QWidget * KWView::canvas (  )  const [virtual]

reimplemented method from superclass

Definition at line 156 of file KWView.cpp.

const KWPage KWView::currentPage (  )  const

Definition at line 151 of file KWView.cpp.

KWCanvas * KWView::kwcanvas (  )  const

Return the current canvas; much like canvas(), but this one does not downcast.

Definition at line 146 of file KWView.cpp.

KWDocument* KWView::kwdocument (  )  const [inline]

return the KWDocument that owns this view.

See also:
KoView::document()

Definition at line 67 of file KWView.h.

void KWView::offsetInDocumentMoved ( int  yOffset  )  [slot]

Definition at line 1303 of file KWView.cpp.

void KWView::popupContextMenu ( const QPoint globalPosition,
const QList< QAction * > &  actions 
)

show a popup on the view, adding to it a list of actions

Definition at line 1232 of file KWView.cpp.

void KWView::setCurrentPage ( const KWPage page  ) 

Definition at line 1278 of file KWView.cpp.

void KWView::showEvent ( QShowEvent event  )  [protected, virtual]

reimplemented method from superclass

Definition at line 1290 of file KWView.cpp.

bool KWView::snapToGrid (  )  const [inline]

returns true if this view has the snap-to-grid enabled.

Definition at line 78 of file KWView.h.

void KWView::updateReadWrite ( bool  readWrite  )  [virtual]

reimplemented method from superclass

Definition at line 161 of file KWView.cpp.

KoViewConverter* KWView::viewConverter (  )  [inline]

Return the view converter for this view.

Definition at line 88 of file KWView.h.

virtual KoZoomController* KWView::zoomController (  )  const [inline, virtual]

Definition at line 98 of file KWView.h.


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