QwScrollingSpriteFieldView Class Reference


A QWidget which views a QwSpriteField, and has scrollbars. More...

#include <QwSpriteField.h>

Inherits QWidget and QwAbsSpriteFieldView.

List of all member functions.

Public Members

Protected Members

Protected Slots


Detailed Description

A QWidget which views a QwSpriteField, and has scrollbars.

While QwSpriteFieldView inside a QwViewport can be used for viewing a QwSpriteField, this may cause poor redraw effects if a lot of activity is occurring in the QwSpriteField, because scrolling by this method is a two part process: copy some area, then redraw the new area.

QwScrollingSpriteFieldView avoids this problem by doing these in a single operation. The downside is that it uses an off-screen pixmap for the whole visible area of the view and so is not practical if very large areas, or large numbers of areas, are required.


Member Function Documentation

QwScrollingSpriteFieldView::QwScrollingSpriteFieldView ( QwSpriteField * v=0, QWidget * parent=0, const char * name=0, WFlags f=0 )

Construct a QwSpriteFieldView which views the given QwSpriteField. The usual QWidget parameters may also be passed.

QwScrollingSpriteFieldView::~QwScrollingSpriteFieldView ()

Deconstruct the QwScrollingSpriteFieldView.

void QwScrollingSpriteFieldView::beginPainter ( QPainter & painter ) [virtual]

Configure the QPainter - makes it draw on this widget's offscreen pixmap, translated according to the scrollbars.

void QwScrollingSpriteFieldView::flush ( const QRect & area ) [virtual]

Flush the off-screen changes.

void QwScrollingSpriteFieldView::hScroll ( int v ) [protected slot]

Scrolls the view horizontally by the given amount.

int QwScrollingSpriteFieldView::hSteps () const [virtual protected]

The stepping rate for the horizontal scrollbar. Returns 16.

void QwScrollingSpriteFieldView::paintEvent ( QPaintEvent * ev ) [virtual protected]

(override)

Repaint the appropriate area of the QwScrollingSpriteFieldView which this QwScrollingSpriteFieldView is viewing.

bool QwScrollingSpriteFieldView::preferDoubleBuffering () const [virtual]

Returns FALSE: double-buffering is not needed, since this class has its own offscreen pixmap.

void QwScrollingSpriteFieldView::resizeEvent ( QResizeEvent * ) [virtual protected]

(override)

Deal with scrollbars.

void QwScrollingSpriteFieldView::vScroll ( int v ) [protected slot]

Scrolls the view vertically by the given amount.

int QwScrollingSpriteFieldView::vSteps () const [virtual protected]

The stepping rate for the vertical scrollbar. Returns 16.

QRect QwScrollingSpriteFieldView::viewArea () const [virtual]

Returns the area of the viewport.


This file is copyright © 1995-97 Warwick Allison.

It was generated from the following files:


Generated at 18:55, 1998/01/23 for Qt version 1.4 by the warwick at Troll Tech