#include <qtcanvas.h>
Public Slots | |
virtual void | advance () |
virtual void | advance () |
virtual void | update () |
virtual void | update () |
Signals | |
void | resized () |
void | resized () |
Public Member Functions | |
virtual void | addAnimation (QtCanvasItem *) |
virtual void | addAnimation (QtCanvasItem *) |
virtual void | addItem (QtCanvasItem *) |
virtual void | addItem (QtCanvasItem *) |
void | addItemToChunk (QtCanvasItem *, int i, int j) |
void | addItemToChunk (QtCanvasItem *, int i, int j) |
void | addItemToChunkContaining (QtCanvasItem *, int x, int y) |
void | addItemToChunkContaining (QtCanvasItem *, int x, int y) |
virtual void | addView (QtCanvasView *) |
virtual void | addView (QtCanvasView *) |
QtCanvasItemList | allItems () |
QtCanvasItemList | allItems () |
QColor | backgroundColor () const |
QColor | backgroundColor () const |
QPixmap | backgroundPixmap () const |
QPixmap | backgroundPixmap () const |
int | chunkSize () const |
int | chunkSize () const |
QtCanvasItemList | collisions (const QPoint &) const |
QtCanvasItemList | collisions (const QPoint &) const |
QtCanvasItemList | collisions (const QPolygon &pa, const QtCanvasItem *item, bool exact) const |
QtCanvasItemList | collisions (const QPolygon &pa, const QtCanvasItem *item, bool exact) const |
QtCanvasItemList | collisions (const QRect &) const |
QtCanvasItemList | collisions (const QRect &) const |
void | drawArea (const QRect &, QPainter *p, bool double_buffer=false) |
void | drawArea (const QRect &, QPainter *p, bool double_buffer=false) |
void | drawCanvasArea (const QRect &, QPainter *p=0, bool double_buffer=true) |
void | drawCanvasArea (const QRect &, QPainter *p=0, bool double_buffer=true) |
void | drawViewArea (QtCanvasView *view, QPainter *p, const QRect &r, bool dbuf) |
void | drawViewArea (QtCanvasView *view, QPainter *p, const QRect &r, bool dbuf) |
int | height () const |
int | height () const |
bool | onCanvas (const QPoint &p) const |
bool | onCanvas (const QPoint &p) const |
bool | onCanvas (int x, int y) const |
bool | onCanvas (int x, int y) const |
QtCanvas (int w, int h) | |
QtCanvas (int w, int h) | |
QtCanvas (QObject *parent=0) | |
QtCanvas (QObject *parent=0) | |
QtCanvas (QPixmap p, int h, int v, int tilewidth, int tileheight) | |
QtCanvas (QPixmap p, int h, int v, int tilewidth, int tileheight) | |
QRect | rect () const |
QRect | rect () const |
virtual void | removeAnimation (QtCanvasItem *) |
virtual void | removeAnimation (QtCanvasItem *) |
virtual void | removeItem (QtCanvasItem *) |
virtual void | removeItem (QtCanvasItem *) |
void | removeItemFromChunk (QtCanvasItem *, int i, int j) |
void | removeItemFromChunk (QtCanvasItem *, int i, int j) |
void | removeItemFromChunkContaining (QtCanvasItem *, int x, int y) |
void | removeItemFromChunkContaining (QtCanvasItem *, int x, int y) |
virtual void | removeView (QtCanvasView *) |
virtual void | removeView (QtCanvasView *) |
virtual void | resize (int width, int height) |
virtual void | resize (int width, int height) |
virtual void | retune (int chunksize, int maxclusters=100) |
virtual void | retune (int chunksize, int maxclusters=100) |
bool | sameChunk (int x1, int y1, int x2, int y2) const |
bool | sameChunk (int x1, int y1, int x2, int y2) const |
virtual void | setAdvancePeriod (int ms) |
virtual void | setAdvancePeriod (int ms) |
virtual void | setAllChanged () |
virtual void | setAllChanged () |
virtual void | setBackgroundColor (const QColor &c) |
virtual void | setBackgroundColor (const QColor &c) |
virtual void | setBackgroundPixmap (const QPixmap &p) |
virtual void | setBackgroundPixmap (const QPixmap &p) |
virtual void | setChanged (const QRect &area) |
virtual void | setChanged (const QRect &area) |
virtual void | setChangedChunk (int i, int j) |
virtual void | setChangedChunk (int i, int j) |
virtual void | setChangedChunkContaining (int x, int y) |
virtual void | setChangedChunkContaining (int x, int y) |
virtual void | setTile (int x, int y, int tilenum) |
virtual void | setTile (int x, int y, int tilenum) |
virtual void | setTiles (QPixmap tiles, int h, int v, int tilewidth, int tileheight) |
virtual void | setTiles (QPixmap tiles, int h, int v, int tilewidth, int tileheight) |
virtual void | setUnchanged (const QRect &area) |
virtual void | setUnchanged (const QRect &area) |
virtual void | setUpdatePeriod (int ms) |
virtual void | setUpdatePeriod (int ms) |
QSize | size () const |
QSize | size () const |
int | tile (int x, int y) const |
int | tile (int x, int y) const |
int | tileHeight () const |
int | tileHeight () const |
int | tilesHorizontally () const |
int | tilesHorizontally () const |
int | tilesVertically () const |
int | tilesVertically () const |
int | tileWidth () const |
int | tileWidth () const |
bool | validChunk (const QPoint &p) const |
bool | validChunk (const QPoint &p) const |
bool | validChunk (int x, int y) const |
bool | validChunk (int x, int y) const |
int | width () const |
int | width () const |
virtual | ~QtCanvas () |
virtual | ~QtCanvas () |
Protected Member Functions | |
virtual void | drawBackground (QPainter &, const QRect &area) |
virtual void | drawBackground (QPainter &, const QRect &area) |
virtual void | drawForeground (QPainter &, const QRect &area) |
virtual void | drawForeground (QPainter &, const QRect &area) |
Private Member Functions | |
QRect | changeBounds () |
QRect | changeBounds () |
QtCanvasChunk & | chunk (int i, int j) const |
QtCanvasChunk & | chunk (int i, int j) const |
QtCanvasChunk & | chunkContaining (int x, int y) const |
QtCanvasChunk & | chunkContaining (int x, int y) const |
void | init (int w, int h, int chunksze=16, int maxclust=100) |
void | init (int w, int h, int chunksze=16, int maxclust=100) |
void | initTiles (QPixmap p, int h, int v, int tilewidth, int tileheight) |
void | initTiles (QPixmap p, int h, int v, int tilewidth, int tileheight) |
Private Attributes | |
int | aheight |
int | awidth |
QColor | bgcolor |
int | chheight |
QtCanvasChunk * | chunks |
int | chunksize |
int | chwidth |
QtCanvasData * | d |
bool | debug_redraw_areas |
ushort * | grid |
ushort | htiles |
int | maxclusters |
bool | oneone |
QPixmap | pm |
ushort | tileh |
ushort | tilew |
QTimer * | update_timer |
ushort | vtiles |
Friends | |
void | qt_unview (QtCanvas *c) |
void | qt_unview (QtCanvas *c) |
QtCanvas::QtCanvas | ( | QObject * | parent = 0 | ) |
QtCanvas::QtCanvas | ( | int | w, |
int | h | ||
) |
QtCanvas::QtCanvas | ( | QPixmap | p, |
int | h, | ||
int | v, | ||
int | tilewidth, | ||
int | tileheight | ||
) |
|
virtual |
References allItems(), chunks, d, grid, and QtCanvasData::viewList.
QtCanvas::QtCanvas | ( | QObject * | parent = 0 | ) |
QtCanvas::QtCanvas | ( | int | w, |
int | h | ||
) |
QtCanvas::QtCanvas | ( | QPixmap | p, |
int | h, | ||
int | v, | ||
int | tilewidth, | ||
int | tileheight | ||
) |
|
virtual |
|
virtual |
References QtCanvasData::animDict, and d.
Referenced by QtCanvasItem::setAnimated(), and QtCanvasItem::setCanvas().
|
virtual |
|
virtual |
References d, and QtCanvasData::itemDict.
Referenced by QtCanvasItem::QtCanvasItem(), and QtCanvasItem::setCanvas().
|
virtual |
void QtCanvas::addItemToChunk | ( | QtCanvasItem * | g, |
int | i, | ||
int | j | ||
) |
References QtCanvasChunk::add(), chunk(), and validChunk().
Referenced by QtCanvasItem::addToChunks(), QtCanvasSprite::addToChunks(), and QtCanvasText::addToChunks().
void QtCanvas::addItemToChunk | ( | QtCanvasItem * | , |
int | i, | ||
int | j | ||
) |
void QtCanvas::addItemToChunkContaining | ( | QtCanvasItem * | , |
int | x, | ||
int | y | ||
) |
void QtCanvas::addItemToChunkContaining | ( | QtCanvasItem * | g, |
int | x, | ||
int | y | ||
) |
References QtCanvasChunk::add(), chunkContaining(), height(), and width().
|
virtual |
References backgroundColor(), d, htiles, pm, QtCanvasData::viewList, and vtiles.
Referenced by QtCanvasView::setCanvas().
|
virtual |
|
virtualslot |
References QtCanvasItem::advance(), QtCanvasData::animDict, d, and update().
Referenced by setAdvancePeriod().
|
virtualslot |
QtCanvasItemList QtCanvas::allItems | ( | ) |
References d, and QtCanvasData::itemDict.
Referenced by MainWindow::clearAll(), and ~QtCanvas().
QtCanvasItemList QtCanvas::allItems | ( | ) |
QColor QtCanvas::backgroundColor | ( | ) | const |
QColor QtCanvas::backgroundColor | ( | ) | const |
QPixmap QtCanvas::backgroundPixmap | ( | ) | const |
References pm.
QPixmap QtCanvas::backgroundPixmap | ( | ) | const |
|
private |
|
private |
|
private |
References chunks, and chwidth.
Referenced by addItemToChunk(), changeBounds(), chunkContaining(), collisions(), drawCanvasArea(), removeItemFromChunk(), setChanged(), setChangedChunk(), setChangedChunkContaining(), and setUnchanged().
|
private |
|
private |
References chunk(), and chunksize.
Referenced by addItemToChunkContaining(), removeItemFromChunkContaining(), and setChangedChunkContaining().
|
private |
|
inline |
References chunksize.
|
inline |
References chunksize.
Referenced by QPolygonalProcessor::add(), QtCanvasSprite::addToChunks(), QtCanvasText::addToChunks(), QtCanvasSprite::changeChunks(), QtCanvasText::changeChunks(), QtCanvasItem::chunks(), QPolygonalProcessor::doSpans(), QPolygonalProcessor::QPolygonalProcessor(), QtCanvasSprite::removeFromChunks(), and QtCanvasText::removeFromChunks().
QtCanvasItemList QtCanvas::collisions | ( | const QPoint & | p | ) | const |
Referenced by QtCanvasItem::collisions(), and CanvasView::handleMouseClickEvent().
QtCanvasItemList QtCanvas::collisions | ( | const QPoint & | ) | const |
QtCanvasItemList QtCanvas::collisions | ( | const QPolygon & | pa, |
const QtCanvasItem * | item, | ||
bool | exact | ||
) | const |
References chunk(), QtCanvasItem::collidesWith(), QtCanvasChunk::list(), validChunk(), QtCanvasItem::x(), and QtCanvasItem::y().
QtCanvasItemList QtCanvas::collisions | ( | const QPolygon & | pa, |
const QtCanvasItem * | item, | ||
bool | exact | ||
) | const |
QtCanvasItemList QtCanvas::collisions | ( | const QRect & | r | ) | const |
References QtCanvasItem::collisions(), QtCanvasPolygonalItem::setPen(), and QtCanvasItem::show().
QtCanvasItemList QtCanvas::collisions | ( | const QRect & | ) | const |
void QtCanvas::drawArea | ( | const QRect & | clip, |
QPainter * | p, | ||
bool | double_buffer = false |
||
) |
void QtCanvas::drawArea | ( | const QRect & | , |
QPainter * | p, | ||
bool | double_buffer = false |
||
) |
|
protectedvirtual |
References bgcolor, grid, pm, tile(), tileh, tilesHorizontally(), tilesVertically(), and tilew.
Referenced by drawCanvasArea().
|
protectedvirtual |
void QtCanvas::drawCanvasArea | ( | const QRect & | inarea, |
QPainter * | p = 0 , |
||
bool | double_buffer = true |
||
) |
References chheight, chunk(), chunksize, chwidth, QtCanvasItem::draw(), drawBackground(), drawForeground(), height(), QtCanvasChunk::list(), and width().
Referenced by drawArea(), and drawViewArea().
void QtCanvas::drawCanvasArea | ( | const QRect & | , |
QPainter * | p = 0 , |
||
bool | double_buffer = true |
||
) |
|
protectedvirtual |
|
protectedvirtual |
References debug_redraw_areas.
Referenced by drawCanvasArea().
void QtCanvas::drawViewArea | ( | QtCanvasView * | view, |
QPainter * | p, | ||
const QRect & | r, | ||
bool | dbuf | ||
) |
References drawCanvasArea(), and QtCanvasView::worldMatrix().
Referenced by QtCanvasView::drawContents().
void QtCanvas::drawViewArea | ( | QtCanvasView * | view, |
QPainter * | p, | ||
const QRect & | r, | ||
bool | dbuf | ||
) |
|
inline |
References aheight.
|
inline |
References aheight.
Referenced by MainWindow::addEllipse(), addItemToChunkContaining(), MainWindow::addLine(), MainWindow::addRectangle(), MainWindow::addText(), changeBounds(), drawCanvasArea(), MainWindow::itemClicked(), removeItemFromChunkContaining(), setAllChanged(), setChanged(), setChangedChunkContaining(), setUnchanged(), and QtCanvasView::updateContentsSize().
|
private |
|
private |
References aheight, awidth, bgcolor, chheight, chunks, chunksize, chwidth, d, debug_redraw_areas, grid, htiles, maxclusters, update_timer, and vtiles.
Referenced by QtCanvas().
|
private |
|
private |
|
inline |
|
inline |
|
inline |
References aheight, and awidth.
Referenced by onCanvas().
|
inline |
References aheight, and awidth.
Referenced by QtCanvasView::drawContents(), and QPolygonalProcessor::QPolygonalProcessor().
|
virtual |
References QtCanvasData::animDict, and d.
Referenced by QtCanvasItem::setAnimated(), QtCanvasItem::setCanvas(), and QtCanvasItem::~QtCanvasItem().
|
virtual |
|
virtual |
References d, and QtCanvasData::itemDict.
Referenced by QtCanvasItem::setCanvas(), and QtCanvasItem::~QtCanvasItem().
|
virtual |
void QtCanvas::removeItemFromChunk | ( | QtCanvasItem * | , |
int | i, | ||
int | j | ||
) |
void QtCanvas::removeItemFromChunk | ( | QtCanvasItem * | g, |
int | i, | ||
int | j | ||
) |
References chunk(), QtCanvasChunk::remove(), and validChunk().
Referenced by QtCanvasItem::removeFromChunks(), QtCanvasSprite::removeFromChunks(), and QtCanvasText::removeFromChunks().
void QtCanvas::removeItemFromChunkContaining | ( | QtCanvasItem * | g, |
int | x, | ||
int | y | ||
) |
References chunkContaining(), height(), QtCanvasChunk::remove(), and width().
void QtCanvas::removeItemFromChunkContaining | ( | QtCanvasItem * | , |
int | x, | ||
int | y | ||
) |
|
virtual |
References d, and QtCanvasData::viewList.
Referenced by QtCanvasView::setCanvas().
|
virtual |
|
virtual |
|
virtual |
References aheight, awidth, chheight, chunks, chunksize, chwidth, d, QtCanvasData::itemDict, resized(), and setAllChanged().
|
signal |
|
signal |
|
virtual |
|
virtual |
References aheight, awidth, chheight, chunks, chunksize, chwidth, d, QtCanvasData::itemDict, and maxclusters.
Referenced by setTiles().
|
inline |
References chunksize.
|
inline |
References chunksize.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
References height(), setChanged(), and width().
Referenced by resize(), setBackgroundColor(), and setTiles().
|
virtual |
References bgcolor, d, setAllChanged(), and QtCanvasData::viewList.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
References QtCanvasChunk::change(), chheight, chunk(), chunksize, chwidth, height(), and width().
Referenced by setAllChanged(), and setTile().
|
virtual |
References QtCanvasChunk::change(), chunk(), and validChunk().
Referenced by QtCanvasItem::changeChunks(), QtCanvasSprite::changeChunks(), QtCanvasText::changeChunks(), and setTile().
|
virtual |
|
virtual |
References QtCanvasChunk::change(), chunk(), chunkContaining(), height(), and width().
|
virtual |
|
virtual |
References chunksize, grid, htiles, setChanged(), setChangedChunk(), tileh, and tilew.
|
virtual |
|
virtual |
References grid, htiles, pm, retune(), scm(), setAllChanged(), tileh, tilew, and vtiles.
Referenced by QtCanvas(), and setBackgroundPixmap().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
inline |
|
inline |
References tileh.
|
inline |
References tileh.
|
inline |
|
inline |
References htiles.
|
inline |
References vtiles.
|
inline |
|
inline |
References tilew.
|
inline |
References tilew.
|
virtualslot |
|
virtualslot |
References changeBounds(), d, setUnchanged(), QtCanvasData::viewList, and QtCanvasView::worldMatrix().
Referenced by advance(), MainWindow::clearAll(), CanvasView::contentsMouseMoveEvent(), MainWindow::deleteObject(), MainWindow::fillView(), MainWindow::newEllipse(), MainWindow::newLine(), MainWindow::newRectangle(), MainWindow::newText(), setUpdatePeriod(), and MainWindow::valueChanged().
|
inline |
|
inline |
|
inline |
References chheight, and chwidth.
Referenced by addItemToChunk(), collisions(), removeItemFromChunk(), setChangedChunk(), and validChunk().
|
inline |
References awidth.
|
inline |
References awidth.
Referenced by MainWindow::addEllipse(), addItemToChunkContaining(), MainWindow::addLine(), MainWindow::addRectangle(), MainWindow::addText(), changeBounds(), drawCanvasArea(), MainWindow::itemClicked(), removeItemFromChunkContaining(), setAllChanged(), setChanged(), setChangedChunkContaining(), setUnchanged(), and QtCanvasView::updateContentsSize().
|
friend |
|
friend |
|
private |
|
private |
|
private |
Referenced by backgroundColor(), drawBackground(), init(), and setBackgroundColor().
|
private |
Referenced by changeBounds(), drawCanvasArea(), init(), resize(), retune(), setChanged(), setUnchanged(), and validChunk().
|
private |
Referenced by chunk(), init(), resize(), retune(), and ~QtCanvas().
|
private |
Referenced by changeBounds(), chunkContaining(), chunkSize(), drawCanvasArea(), init(), resize(), retune(), sameChunk(), setChanged(), setTile(), and setUnchanged().
|
private |
Referenced by changeBounds(), chunk(), drawCanvasArea(), init(), resize(), retune(), setChanged(), setUnchanged(), and validChunk().
|
private |
Referenced by addAnimation(), addItem(), addView(), advance(), allItems(), init(), removeAnimation(), removeItem(), removeView(), resize(), retune(), setBackgroundColor(), setBackgroundPixmap(), update(), and ~QtCanvas().
|
private |
Referenced by drawForeground(), and init().
|
private |
Referenced by drawBackground(), init(), setTile(), setTiles(), tile(), and ~QtCanvas().
|
private |
Referenced by addView(), init(), setTile(), setTiles(), tile(), and tilesHorizontally().
|
private |
|
private |
Referenced by addView(), backgroundPixmap(), drawBackground(), and setTiles().
|
private |
Referenced by drawBackground(), setTile(), setTiles(), and tileHeight().
|
private |
Referenced by drawBackground(), setTile(), setTiles(), and tileWidth().
|
private |
Referenced by init(), setAdvancePeriod(), and setUpdatePeriod().
|
private |
Referenced by addView(), init(), setTiles(), and tilesVertically().