Computer Assited Medical Intervention Tool Kit
version 4.1
|
#include <qtcanvas.h>
Inherits QObject, and QObject.
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 QRect &) const |
QtCanvasItemList | collisions (const QRect &) const |
QtCanvasItemList | collisions (const QPolygon &pa, const QtCanvasItem *item, bool exact) const |
QtCanvasItemList | collisions (const QPolygon &pa, const QtCanvasItem *item, bool exact) 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 (int x, int y) const |
bool | onCanvas (int x, int y) const |
bool | onCanvas (const QPoint &p) const |
bool | onCanvas (const QPoint &p) const |
QtCanvas (QObject *parent=0) | |
QtCanvas (QObject *parent=0) | |
QtCanvas (int w, int h) | |
QtCanvas (int w, int h) | |
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 (int x, int y) const |
bool | validChunk (int x, int y) const |
bool | validChunk (const QPoint &p) const |
bool | validChunk (const QPoint &p) 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 | ( | int | w, |
int | h | ||
) |
References init().
QtCanvas::QtCanvas | ( | QPixmap | p, |
int | h, | ||
int | v, | ||
int | tilewidth, | ||
int | tileheight | ||
) |
References init(), scm(), and setTiles().
|
virtual |
References allItems(), chunks, d, grid, and QtCanvasData::viewList.
Referenced by scm().
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 QtCanvasItemExtra::QtCanvasItemExtra(), scm(), QtCanvasItem::setAnimated(), and QtCanvasItem::setCanvas().
|
virtual |
|
virtual |
References d, and QtCanvasData::itemDict.
Referenced by QtCanvasItem::QtCanvasItem(), QtCanvasItemExtra::QtCanvasItemExtra(), scm(), 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(), QtCanvasText::addToChunks(), collision_double_dispatch(), QPolygonalProcessor::doSpans(), and scm().
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().
Referenced by scm().
|
virtual |
References backgroundColor(), d, htiles, pm, QtCanvasData::viewList, and vtiles.
Referenced by scm(), and QtCanvasView::setCanvas().
|
virtual |
|
virtualslot |
References QtCanvasItem::advance(), QtCanvasData::animDict, d, and update().
Referenced by scm(), and setAdvancePeriod().
|
virtualslot |
QtCanvasItemList QtCanvas::allItems | ( | ) |
References d, and QtCanvasData::itemDict.
Referenced by MainWindow::clearAll(), scm(), and ~QtCanvas().
QtCanvasItemList QtCanvas::allItems | ( | ) |
QColor QtCanvas::backgroundColor | ( | ) | const |
QPixmap QtCanvas::backgroundPixmap | ( | ) | const |
|
private |
|
private |
|
private |
References chunks, and chwidth.
Referenced by addItemToChunk(), changeBounds(), chunkContaining(), drawCanvasArea(), removeItemFromChunk(), scm(), setChanged(), setChangedChunk(), setChangedChunkContaining(), and setUnchanged().
|
private |
|
private |
References chunk(), and chunksize.
Referenced by addItemToChunkContaining(), removeItemFromChunkContaining(), scm(), and setChangedChunkContaining().
|
private |
|
inline |
|
inline |
Referenced by QPolygonalProcessor::add(), QtCanvasSprite::addToChunks(), QtCanvasText::addToChunks(), QtCanvasSprite::changeChunks(), QtCanvasText::changeChunks(), QtCanvasItem::chunks(), collision_double_dispatch(), QPolygonalProcessor::doSpans(), QPolygonalProcessor::QPolygonalProcessor(), QtCanvasSprite::removeFromChunks(), and QtCanvasText::removeFromChunks().
QtCanvasItemList QtCanvas::collisions | ( | const QPoint & | p | ) | const |
References QtCanvasItem::collisions().
Referenced by collision_double_dispatch(), QtCanvasItem::collisions(), and CanvasView::handleMouseClickEvent().
QtCanvasItemList QtCanvas::collisions | ( | const QPoint & | ) | const |
QtCanvasItemList QtCanvas::collisions | ( | const QRect & | r | ) | const |
References QtCanvasItem::collisions(), QtCanvasPolygonalItem::setPen(), and QtCanvasItem::show().
QtCanvasItemList QtCanvas::collisions | ( | const QRect & | ) | const |
QtCanvasItemList QtCanvas::collisions | ( | const QPolygon & | pa, |
const QtCanvasItem * | item, | ||
bool | exact | ||
) | const |
References QtCanvasItem::collidesWith(), QtCanvasItem::x(), and QtCanvasItem::y().
QtCanvasItemList QtCanvas::collisions | ( | const QPolygon & | pa, |
const QtCanvasItem * | item, | ||
bool | exact | ||
) | const |
void QtCanvas::drawArea | ( | const QRect & | clip, |
QPainter * | p, | ||
bool | double_buffer = false |
||
) |
References drawCanvasArea().
Referenced by scm().
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(), and scm().
|
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(), drawViewArea(), and scm().
void QtCanvas::drawCanvasArea | ( | const QRect & | , |
QPainter * | p = 0 , |
||
bool | double_buffer = true |
||
) |
|
protectedvirtual |
|
protectedvirtual |
References debug_redraw_areas.
Referenced by drawCanvasArea(), and scm().
void QtCanvas::drawViewArea | ( | QtCanvasView * | view, |
QPainter * | p, | ||
const QRect & | r, | ||
bool | dbuf | ||
) |
References drawCanvasArea(), and QtCanvasView::worldMatrix().
Referenced by QtCanvasView::drawContents(), and scm().
void QtCanvas::drawViewArea | ( | QtCanvasView * | view, |
QPainter * | p, | ||
const QRect & | r, | ||
bool | dbuf | ||
) |
|
inline |
|
inline |
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 |
Referenced by QtCanvas(), and scm().
|
private |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by QtCanvasView::drawContents(), and QPolygonalProcessor::QPolygonalProcessor().
|
inline |
|
virtual |
References QtCanvasData::animDict, and d.
Referenced by QtCanvasItemExtra::QtCanvasItemExtra(), scm(), QtCanvasItem::setAnimated(), QtCanvasItem::setCanvas(), and QtCanvasItem::~QtCanvasItem().
|
virtual |
|
virtual |
References d, and QtCanvasData::itemDict.
Referenced by QtCanvasItemExtra::QtCanvasItemExtra(), scm(), QtCanvasItem::setCanvas(), and QtCanvasItem::~QtCanvasItem().
|
virtual |
void QtCanvas::removeItemFromChunk | ( | QtCanvasItem * | , |
int | i, | ||
int | j | ||
) |
void QtCanvas::removeItemFromChunk | ( | QtCanvasItem * | g, |
int | i, | ||
int | j | ||
) |
void QtCanvas::removeItemFromChunkContaining | ( | QtCanvasItem * | g, |
int | x, | ||
int | y | ||
) |
References chunkContaining(), height(), QtCanvasChunk::remove(), and width().
Referenced by scm().
void QtCanvas::removeItemFromChunkContaining | ( | QtCanvasItem * | , |
int | x, | ||
int | y | ||
) |
|
virtual |
References d, and QtCanvasData::viewList.
Referenced by scm(), and QtCanvasView::setCanvas().
|
virtual |
|
virtual |
|
virtual |
|
signal |
|
signal |
Referenced by resize().
|
virtual |
References aheight, awidth, chheight, chunks, chunksize, chwidth, d, QtCanvasData::itemDict, and maxclusters.
Referenced by scm(), and setTiles().
|
virtual |
|
inline |
|
inline |
References QtCanvasItem::advance(), QtCanvasItem::collisions(), and QtCanvasItem::update().
|
virtual |
|
virtual |
References advance(), and update_timer.
Referenced by scm().
|
virtual |
|
virtual |
References height(), setChanged(), and width().
Referenced by resize(), scm(), setBackgroundColor(), and setTiles().
|
virtual |
References bgcolor, d, setAllChanged(), and QtCanvasData::viewList.
Referenced by scm().
|
virtual |
|
virtual |
References d, setTiles(), and QtCanvasData::viewList.
Referenced by scm().
|
virtual |
|
virtual |
|
virtual |
References QtCanvasChunk::change(), chheight, chunk(), chunksize, chwidth, height(), and width().
Referenced by scm(), setAllChanged(), and setTile().
|
virtual |
|
virtual |
References QtCanvasChunk::change(), chunk(), and validChunk().
Referenced by QtCanvasItem::changeChunks(), QtCanvasSprite::changeChunks(), QtCanvasText::changeChunks(), collision_double_dispatch(), QPolygonalProcessor::doSpans(), scm(), and setTile().
|
virtual |
References QtCanvasChunk::change(), chunk(), chunkContaining(), height(), and width().
Referenced by scm().
|
virtual |
|
virtual |
References chunksize, grid, htiles, setChanged(), setChangedChunk(), tileh, and tilew.
Referenced by scm().
|
virtual |
|
virtual |
References grid, htiles, pm, retune(), scm(), setAllChanged(), tileh, tilew, and vtiles.
Referenced by QtCanvas(), scm(), and setBackgroundPixmap().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
References update(), and update_timer.
Referenced by scm().
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by drawBackground().
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by drawBackground().
|
inline |
Referenced by drawBackground().
|
inline |
|
inline |
|
inline |
|
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(), scm(), setUpdatePeriod(), and MainWindow::valueChanged().
|
inline |
|
inline |
Referenced by addItemToChunk(), removeItemFromChunk(), and setChangedChunk().
|
inline |
|
inline |
|
inline |
Referenced by MainWindow::addEllipse(), addItemToChunkContaining(), MainWindow::addLine(), MainWindow::addRectangle(), MainWindow::addText(), changeBounds(), drawCanvasArea(), MainWindow::itemClicked(), removeItemFromChunkContaining(), setAllChanged(), setChanged(), setChangedChunkContaining(), setUnchanged(), and QtCanvasView::updateContentsSize().
|
inline |
|
friend |
|
friend |
|
private |
Referenced by backgroundColor(), drawBackground(), and setBackgroundColor().
|
private |
Referenced by changeBounds(), drawCanvasArea(), resize(), retune(), setChanged(), and setUnchanged().
|
private |
Referenced by chunk(), resize(), retune(), and ~QtCanvas().
|
private |
Referenced by changeBounds(), chunkContaining(), drawCanvasArea(), resize(), retune(), setChanged(), setTile(), and setUnchanged().
|
private |
Referenced by changeBounds(), chunk(), drawCanvasArea(), resize(), retune(), setChanged(), and setUnchanged().
|
private |
|
private |
Referenced by drawForeground().
|
private |
Referenced by drawBackground(), setTile(), setTiles(), and ~QtCanvas().
|
private |
Referenced by addView(), setTile(), and setTiles().
|
private |
Referenced by retune().
|
private |
|
private |
Referenced by addView(), backgroundPixmap(), drawBackground(), and setTiles().
|
private |
Referenced by drawBackground(), setTile(), and setTiles().
|
private |
Referenced by drawBackground(), setTile(), and setTiles().
|
private |
Referenced by setAdvancePeriod(), and setUpdatePeriod().
|
private |
Referenced by addView(), and setTiles().