Computer Assited Medical Intervention Tool Kit  version 5.0
QtCanvas Class Reference

#include <qtcanvas.h>

+ Inheritance diagram for QtCanvas:
+ Collaboration diagram for QtCanvas:

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 ()
 
QtCanvasChunkchunk (int i, int j) const
 
QtCanvasChunkchunk (int i, int j) const
 
QtCanvasChunkchunkContaining (int x, int y) const
 
QtCanvasChunkchunkContaining (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
 
QtCanvasChunkchunks
 
int chunksize
 
int chwidth
 
QtCanvasDatad
 
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)
 

Constructor & Destructor Documentation

◆ QtCanvas() [1/6]

QtCanvas::QtCanvas ( QObject *  parent = 0)

References init().

+ Here is the call graph for this function:

◆ QtCanvas() [2/6]

QtCanvas::QtCanvas ( int  w,
int  h 
)

References init().

+ Here is the call graph for this function:

◆ QtCanvas() [3/6]

QtCanvas::QtCanvas ( QPixmap  p,
int  h,
int  v,
int  tilewidth,
int  tileheight 
)

References init(), scm(), and setTiles().

+ Here is the call graph for this function:

◆ ~QtCanvas() [1/2]

QtCanvas::~QtCanvas ( )
virtual

References allItems(), chunks, d, grid, and QtCanvasData::viewList.

+ Here is the call graph for this function:

◆ QtCanvas() [4/6]

QtCanvas::QtCanvas ( QObject *  parent = 0)

◆ QtCanvas() [5/6]

QtCanvas::QtCanvas ( int  w,
int  h 
)

◆ QtCanvas() [6/6]

QtCanvas::QtCanvas ( QPixmap  p,
int  h,
int  v,
int  tilewidth,
int  tileheight 
)

◆ ~QtCanvas() [2/2]

virtual QtCanvas::~QtCanvas ( )
virtual

Member Function Documentation

◆ addAnimation() [1/2]

void QtCanvas::addAnimation ( QtCanvasItem item)
virtual

References QtCanvasData::animDict, and d.

Referenced by QtCanvasItem::setAnimated(), and QtCanvasItem::setCanvas().

+ Here is the caller graph for this function:

◆ addAnimation() [2/2]

virtual void QtCanvas::addAnimation ( QtCanvasItem )
virtual

◆ addItem() [1/2]

void QtCanvas::addItem ( QtCanvasItem item)
virtual

References d, and QtCanvasData::itemDict.

Referenced by QtCanvasItem::QtCanvasItem(), and QtCanvasItem::setCanvas().

+ Here is the caller graph for this function:

◆ addItem() [2/2]

virtual void QtCanvas::addItem ( QtCanvasItem )
virtual

◆ addItemToChunk() [1/2]

void QtCanvas::addItemToChunk ( QtCanvasItem g,
int  i,
int  j 
)

References QtCanvasChunk::add(), chunk(), and validChunk().

Referenced by QtCanvasItem::addToChunks(), QtCanvasSprite::addToChunks(), and QtCanvasText::addToChunks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addItemToChunk() [2/2]

void QtCanvas::addItemToChunk ( QtCanvasItem ,
int  i,
int  j 
)

◆ addItemToChunkContaining() [1/2]

void QtCanvas::addItemToChunkContaining ( QtCanvasItem ,
int  x,
int  y 
)

◆ addItemToChunkContaining() [2/2]

void QtCanvas::addItemToChunkContaining ( QtCanvasItem g,
int  x,
int  y 
)

References QtCanvasChunk::add(), chunkContaining(), height(), and width().

+ Here is the call graph for this function:

◆ addView() [1/2]

void QtCanvas::addView ( QtCanvasView view)
virtual

References backgroundColor(), d, htiles, pm, QtCanvasData::viewList, and vtiles.

Referenced by QtCanvasView::setCanvas().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addView() [2/2]

virtual void QtCanvas::addView ( QtCanvasView )
virtual

◆ advance [1/2]

void QtCanvas::advance ( )
virtualslot

References QtCanvasItem::advance(), QtCanvasData::animDict, d, and update().

Referenced by setAdvancePeriod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ advance [2/2]

virtual void QtCanvas::advance ( )
virtualslot

◆ allItems() [1/2]

QtCanvasItemList QtCanvas::allItems ( )

References d, and QtCanvasData::itemDict.

Referenced by MainWindow::clearAll(), and ~QtCanvas().

+ Here is the caller graph for this function:

◆ allItems() [2/2]

QtCanvasItemList QtCanvas::allItems ( )

◆ backgroundColor() [1/2]

QColor QtCanvas::backgroundColor ( ) const

References bgcolor.

Referenced by addView().

+ Here is the caller graph for this function:

◆ backgroundColor() [2/2]

QColor QtCanvas::backgroundColor ( ) const

◆ backgroundPixmap() [1/2]

QPixmap QtCanvas::backgroundPixmap ( ) const

References pm.

◆ backgroundPixmap() [2/2]

QPixmap QtCanvas::backgroundPixmap ( ) const

◆ changeBounds() [1/2]

QRect QtCanvas::changeBounds ( )
private

References chheight, chunk(), chunksize, chwidth, QtCanvasChunk::hasChanged(), height(), and width().

Referenced by update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ changeBounds() [2/2]

QRect QtCanvas::changeBounds ( )
private

◆ chunk() [1/2]

QtCanvasChunk & QtCanvas::chunk ( int  i,
int  j 
) const
private

References chunks, and chwidth.

Referenced by addItemToChunk(), changeBounds(), chunkContaining(), collisions(), drawCanvasArea(), removeItemFromChunk(), setChanged(), setChangedChunk(), setChangedChunkContaining(), and setUnchanged().

+ Here is the caller graph for this function:

◆ chunk() [2/2]

QtCanvasChunk& QtCanvas::chunk ( int  i,
int  j 
) const
private

◆ chunkContaining() [1/2]

QtCanvasChunk & QtCanvas::chunkContaining ( int  x,
int  y 
) const
private

References chunk(), and chunksize.

Referenced by addItemToChunkContaining(), removeItemFromChunkContaining(), and setChangedChunkContaining().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ chunkContaining() [2/2]

QtCanvasChunk& QtCanvas::chunkContaining ( int  x,
int  y 
) const
private

◆ chunkSize() [1/2]

int QtCanvas::chunkSize ( ) const
inline

References chunksize.

◆ chunkSize() [2/2]

int QtCanvas::chunkSize ( ) const
inline

◆ collisions() [1/6]

QtCanvasItemList QtCanvas::collisions ( const QPoint &  p) const

Referenced by QtCanvasItem::collisions(), and CanvasView::handleMouseClickEvent().

+ Here is the caller graph for this function:

◆ collisions() [2/6]

QtCanvasItemList QtCanvas::collisions ( const QPoint &  ) const

◆ collisions() [3/6]

QtCanvasItemList QtCanvas::collisions ( const QPolygon &  pa,
const QtCanvasItem item,
bool  exact 
) const

References chunk(), QtCanvasItem::collidesWith(), QtCanvasChunk::list(), validChunk(), QtCanvasItem::x(), and QtCanvasItem::y().

+ Here is the call graph for this function:

◆ collisions() [4/6]

QtCanvasItemList QtCanvas::collisions ( const QPolygon &  pa,
const QtCanvasItem item,
bool  exact 
) const

◆ collisions() [5/6]

QtCanvasItemList QtCanvas::collisions ( const QRect &  r) const

References QtCanvasItem::collisions(), QtCanvasPolygonalItem::setPen(), and QtCanvasItem::show().

+ Here is the call graph for this function:

◆ collisions() [6/6]

QtCanvasItemList QtCanvas::collisions ( const QRect &  ) const

◆ drawArea() [1/2]

void QtCanvas::drawArea ( const QRect &  clip,
QPainter *  p,
bool  double_buffer = false 
)

References drawCanvasArea().

+ Here is the call graph for this function:

◆ drawArea() [2/2]

void QtCanvas::drawArea ( const QRect &  ,
QPainter *  p,
bool  double_buffer = false 
)

◆ drawBackground() [1/2]

void QtCanvas::drawBackground ( QPainter &  painter,
const QRect &  area 
)
protectedvirtual

References bgcolor, grid, pm, tile(), tileh, tilesHorizontally(), tilesVertically(), and tilew.

Referenced by drawCanvasArea().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawBackground() [2/2]

virtual void QtCanvas::drawBackground ( QPainter &  ,
const QRect &  area 
)
protectedvirtual

◆ drawCanvasArea() [1/2]

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawCanvasArea() [2/2]

void QtCanvas::drawCanvasArea ( const QRect &  ,
QPainter *  p = 0,
bool  double_buffer = true 
)

◆ drawForeground() [1/2]

virtual void QtCanvas::drawForeground ( QPainter &  ,
const QRect &  area 
)
protectedvirtual

◆ drawForeground() [2/2]

void QtCanvas::drawForeground ( QPainter &  painter,
const QRect &  area 
)
protectedvirtual

References debug_redraw_areas.

Referenced by drawCanvasArea().

+ Here is the caller graph for this function:

◆ drawViewArea() [1/2]

void QtCanvas::drawViewArea ( QtCanvasView view,
QPainter *  p,
const QRect &  r,
bool  dbuf 
)

References drawCanvasArea(), and QtCanvasView::worldMatrix().

Referenced by QtCanvasView::drawContents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawViewArea() [2/2]

void QtCanvas::drawViewArea ( QtCanvasView view,
QPainter *  p,
const QRect &  r,
bool  dbuf 
)

◆ height() [1/2]

int QtCanvas::height ( ) const
inline

References aheight.

◆ height() [2/2]

int QtCanvas::height ( ) const
inline

◆ init() [1/2]

void QtCanvas::init ( int  w,
int  h,
int  chunksze = 16,
int  maxclust = 100 
)
private

◆ init() [2/2]

void QtCanvas::init ( int  w,
int  h,
int  chunksze = 16,
int  maxclust = 100 
)
private

References aheight, awidth, bgcolor, chheight, chunks, chunksize, chwidth, d, debug_redraw_areas, grid, htiles, maxclusters, update_timer, and vtiles.

Referenced by QtCanvas().

+ Here is the caller graph for this function:

◆ initTiles() [1/2]

void QtCanvas::initTiles ( QPixmap  p,
int  h,
int  v,
int  tilewidth,
int  tileheight 
)
private

◆ initTiles() [2/2]

void QtCanvas::initTiles ( QPixmap  p,
int  h,
int  v,
int  tilewidth,
int  tileheight 
)
private

◆ onCanvas() [1/4]

bool QtCanvas::onCanvas ( const QPoint &  p) const
inline

References onCanvas().

+ Here is the call graph for this function:

◆ onCanvas() [2/4]

bool QtCanvas::onCanvas ( const QPoint &  p) const
inline

References onCanvas().

+ Here is the call graph for this function:

◆ onCanvas() [3/4]

bool QtCanvas::onCanvas ( int  x,
int  y 
) const
inline

References aheight, and awidth.

◆ onCanvas() [4/4]

bool QtCanvas::onCanvas ( int  x,
int  y 
) const
inline

References aheight, and awidth.

Referenced by onCanvas().

+ Here is the caller graph for this function:

◆ rect() [1/2]

QRect QtCanvas::rect ( ) const
inline

References aheight, and awidth.

Referenced by QtCanvasView::drawContents(), and QPolygonalProcessor::QPolygonalProcessor().

+ Here is the caller graph for this function:

◆ rect() [2/2]

QRect QtCanvas::rect ( ) const
inline

References aheight, and awidth.

◆ removeAnimation() [1/2]

void QtCanvas::removeAnimation ( QtCanvasItem item)
virtual

References QtCanvasData::animDict, and d.

Referenced by QtCanvasItem::setAnimated(), QtCanvasItem::setCanvas(), and QtCanvasItem::~QtCanvasItem().

+ Here is the caller graph for this function:

◆ removeAnimation() [2/2]

virtual void QtCanvas::removeAnimation ( QtCanvasItem )
virtual

◆ removeItem() [1/2]

void QtCanvas::removeItem ( QtCanvasItem item)
virtual

References d, and QtCanvasData::itemDict.

Referenced by QtCanvasItem::setCanvas(), and QtCanvasItem::~QtCanvasItem().

+ Here is the caller graph for this function:

◆ removeItem() [2/2]

virtual void QtCanvas::removeItem ( QtCanvasItem )
virtual

◆ removeItemFromChunk() [1/2]

void QtCanvas::removeItemFromChunk ( QtCanvasItem ,
int  i,
int  j 
)

◆ removeItemFromChunk() [2/2]

void QtCanvas::removeItemFromChunk ( QtCanvasItem g,
int  i,
int  j 
)

References chunk(), QtCanvasChunk::remove(), and validChunk().

Referenced by QtCanvasItem::removeFromChunks(), QtCanvasSprite::removeFromChunks(), and QtCanvasText::removeFromChunks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeItemFromChunkContaining() [1/2]

void QtCanvas::removeItemFromChunkContaining ( QtCanvasItem g,
int  x,
int  y 
)

References chunkContaining(), height(), QtCanvasChunk::remove(), and width().

+ Here is the call graph for this function:

◆ removeItemFromChunkContaining() [2/2]

void QtCanvas::removeItemFromChunkContaining ( QtCanvasItem ,
int  x,
int  y 
)

◆ removeView() [1/2]

void QtCanvas::removeView ( QtCanvasView view)
virtual

References d, and QtCanvasData::viewList.

Referenced by QtCanvasView::setCanvas().

+ Here is the caller graph for this function:

◆ removeView() [2/2]

virtual void QtCanvas::removeView ( QtCanvasView )
virtual

◆ resize() [1/2]

virtual void QtCanvas::resize ( int  width,
int  height 
)
virtual

◆ resize() [2/2]

void QtCanvas::resize ( int  width,
int  height 
)
virtual

References aheight, awidth, chheight, chunks, chunksize, chwidth, d, QtCanvasData::itemDict, resized(), and setAllChanged().

+ Here is the call graph for this function:

◆ resized [1/2]

void QtCanvas::resized ( )
signal

◆ resized [2/2]

void QtCanvas::resized ( )
signal

Referenced by resize().

+ Here is the caller graph for this function:

◆ retune() [1/2]

virtual void QtCanvas::retune ( int  chunksize,
int  maxclusters = 100 
)
virtual

◆ retune() [2/2]

void QtCanvas::retune ( int  chunksize,
int  maxclusters = 100 
)
virtual

References aheight, awidth, chheight, chunks, chunksize, chwidth, d, QtCanvasData::itemDict, and maxclusters.

Referenced by setTiles().

+ Here is the caller graph for this function:

◆ sameChunk() [1/2]

bool QtCanvas::sameChunk ( int  x1,
int  y1,
int  x2,
int  y2 
) const
inline

References chunksize.

◆ sameChunk() [2/2]

bool QtCanvas::sameChunk ( int  x1,
int  y1,
int  x2,
int  y2 
) const
inline

References chunksize.

◆ setAdvancePeriod() [1/2]

virtual void QtCanvas::setAdvancePeriod ( int  ms)
virtual

◆ setAdvancePeriod() [2/2]

void QtCanvas::setAdvancePeriod ( int  ms)
virtual

References advance(), and update_timer.

+ Here is the call graph for this function:

◆ setAllChanged() [1/2]

virtual void QtCanvas::setAllChanged ( )
virtual

◆ setAllChanged() [2/2]

void QtCanvas::setAllChanged ( )
virtual

References height(), setChanged(), and width().

Referenced by resize(), setBackgroundColor(), and setTiles().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBackgroundColor() [1/2]

void QtCanvas::setBackgroundColor ( const QColor &  c)
virtual

References bgcolor, d, setAllChanged(), and QtCanvasData::viewList.

+ Here is the call graph for this function:

◆ setBackgroundColor() [2/2]

virtual void QtCanvas::setBackgroundColor ( const QColor &  c)
virtual

◆ setBackgroundPixmap() [1/2]

void QtCanvas::setBackgroundPixmap ( const QPixmap &  p)
virtual

References d, setTiles(), and QtCanvasData::viewList.

+ Here is the call graph for this function:

◆ setBackgroundPixmap() [2/2]

virtual void QtCanvas::setBackgroundPixmap ( const QPixmap &  p)
virtual

◆ setChanged() [1/2]

virtual void QtCanvas::setChanged ( const QRect &  area)
virtual

◆ setChanged() [2/2]

void QtCanvas::setChanged ( const QRect &  area)
virtual

References QtCanvasChunk::change(), chheight, chunk(), chunksize, chwidth, height(), and width().

Referenced by setAllChanged(), and setTile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setChangedChunk() [1/2]

void QtCanvas::setChangedChunk ( int  i,
int  j 
)
virtual

References QtCanvasChunk::change(), chunk(), and validChunk().

Referenced by QtCanvasItem::changeChunks(), QtCanvasSprite::changeChunks(), QtCanvasText::changeChunks(), and setTile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setChangedChunk() [2/2]

virtual void QtCanvas::setChangedChunk ( int  i,
int  j 
)
virtual

◆ setChangedChunkContaining() [1/2]

void QtCanvas::setChangedChunkContaining ( int  x,
int  y 
)
virtual

References QtCanvasChunk::change(), chunk(), chunkContaining(), height(), and width().

+ Here is the call graph for this function:

◆ setChangedChunkContaining() [2/2]

virtual void QtCanvas::setChangedChunkContaining ( int  x,
int  y 
)
virtual

◆ setTile() [1/2]

void QtCanvas::setTile ( int  x,
int  y,
int  tilenum 
)
virtual

References chunksize, grid, htiles, setChanged(), setChangedChunk(), tileh, and tilew.

+ Here is the call graph for this function:

◆ setTile() [2/2]

virtual void QtCanvas::setTile ( int  x,
int  y,
int  tilenum 
)
virtual

◆ setTiles() [1/2]

void QtCanvas::setTiles ( QPixmap  tiles,
int  h,
int  v,
int  tilewidth,
int  tileheight 
)
virtual

References grid, htiles, pm, retune(), scm(), setAllChanged(), tileh, tilew, and vtiles.

Referenced by QtCanvas(), and setBackgroundPixmap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTiles() [2/2]

virtual void QtCanvas::setTiles ( QPixmap  tiles,
int  h,
int  v,
int  tilewidth,
int  tileheight 
)
virtual

◆ setUnchanged() [1/2]

virtual void QtCanvas::setUnchanged ( const QRect &  area)
virtual

◆ setUnchanged() [2/2]

void QtCanvas::setUnchanged ( const QRect &  area)
virtual

References chheight, chunk(), chunksize, chwidth, height(), QtCanvasChunk::takeChange(), and width().

Referenced by update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUpdatePeriod() [1/2]

virtual void QtCanvas::setUpdatePeriod ( int  ms)
virtual

◆ setUpdatePeriod() [2/2]

void QtCanvas::setUpdatePeriod ( int  ms)
virtual

References update(), and update_timer.

+ Here is the call graph for this function:

◆ size() [1/2]

QSize QtCanvas::size ( ) const
inline

References aheight, and awidth.

◆ size() [2/2]

QSize QtCanvas::size ( ) const
inline

References aheight, and awidth.

◆ tile() [1/2]

int QtCanvas::tile ( int  x,
int  y 
) const
inline

References grid, and htiles.

◆ tile() [2/2]

int QtCanvas::tile ( int  x,
int  y 
) const
inline

References grid, and htiles.

Referenced by drawBackground().

+ Here is the caller graph for this function:

◆ tileHeight() [1/2]

int QtCanvas::tileHeight ( ) const
inline

References tileh.

◆ tileHeight() [2/2]

int QtCanvas::tileHeight ( ) const
inline

References tileh.

◆ tilesHorizontally() [1/2]

int QtCanvas::tilesHorizontally ( ) const
inline

References htiles.

Referenced by drawBackground().

+ Here is the caller graph for this function:

◆ tilesHorizontally() [2/2]

int QtCanvas::tilesHorizontally ( ) const
inline

References htiles.

◆ tilesVertically() [1/2]

int QtCanvas::tilesVertically ( ) const
inline

References vtiles.

◆ tilesVertically() [2/2]

int QtCanvas::tilesVertically ( ) const
inline

References vtiles.

Referenced by drawBackground().

+ Here is the caller graph for this function:

◆ tileWidth() [1/2]

int QtCanvas::tileWidth ( ) const
inline

References tilew.

◆ tileWidth() [2/2]

int QtCanvas::tileWidth ( ) const
inline

References tilew.

◆ update [1/2]

virtual void QtCanvas::update ( )
virtualslot

◆ update [2/2]

void QtCanvas::update ( )
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validChunk() [1/4]

bool QtCanvas::validChunk ( const QPoint &  p) const
inline

References validChunk().

+ Here is the call graph for this function:

◆ validChunk() [2/4]

bool QtCanvas::validChunk ( const QPoint &  p) const
inline

References validChunk().

+ Here is the call graph for this function:

◆ validChunk() [3/4]

bool QtCanvas::validChunk ( int  x,
int  y 
) const
inline

References chheight, and chwidth.

◆ validChunk() [4/4]

bool QtCanvas::validChunk ( int  x,
int  y 
) const
inline

References chheight, and chwidth.

Referenced by addItemToChunk(), collisions(), removeItemFromChunk(), setChangedChunk(), and validChunk().

+ Here is the caller graph for this function:

◆ width() [1/2]

int QtCanvas::width ( ) const
inline

References awidth.

◆ width() [2/2]

int QtCanvas::width ( ) const
inline

Friends And Related Function Documentation

◆ qt_unview [1/2]

void qt_unview ( QtCanvas c)
friend

◆ qt_unview [2/2]

void qt_unview ( QtCanvas c)
friend

Member Data Documentation

◆ aheight

int QtCanvas::aheight
private

◆ awidth

int QtCanvas::awidth
private

◆ bgcolor

QColor QtCanvas::bgcolor
private

◆ chheight

int QtCanvas::chheight
private

◆ chunks

QtCanvasChunk * QtCanvas::chunks
private

Referenced by chunk(), init(), resize(), retune(), and ~QtCanvas().

◆ chunksize

◆ chwidth

int QtCanvas::chwidth
private

◆ d

◆ debug_redraw_areas

bool QtCanvas::debug_redraw_areas
private

Referenced by drawForeground(), and init().

◆ grid

ushort * QtCanvas::grid
private

◆ htiles

ushort QtCanvas::htiles
private

◆ maxclusters

int QtCanvas::maxclusters
private

Referenced by init(), and retune().

◆ oneone

bool QtCanvas::oneone
private

◆ pm

QPixmap QtCanvas::pm
private

◆ tileh

ushort QtCanvas::tileh
private

◆ tilew

ushort QtCanvas::tilew
private

◆ update_timer

QTimer * QtCanvas::update_timer
private

◆ vtiles

ushort QtCanvas::vtiles
private

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