QtCanvas Class Reference

#include <ArmarXGui/libraries/qtpropertybrowser/examples/canvas_typed/qtcanvas.h>

+ Inheritance 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)
 

Friends

void qt_unview (QtCanvas *c)
 
void qt_unview (QtCanvas *c)
 

Detailed Description

Definition at line 270 of file qtcanvas.h.

Constructor & Destructor Documentation

◆ QtCanvas() [1/6]

QtCanvas ( QObject *  parent = 0)

Definition at line 618 of file qtcanvas.cpp.

◆ QtCanvas() [2/6]

QtCanvas ( int  w,
int  h 
)

Definition at line 626 of file qtcanvas.cpp.

◆ QtCanvas() [3/6]

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

Definition at line 654 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ ~QtCanvas() [1/2]

~QtCanvas ( )
virtual

Definition at line 663 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ QtCanvas() [4/6]

QtCanvas ( QObject *  parent = 0)

◆ QtCanvas() [5/6]

QtCanvas ( int  w,
int  h 
)

◆ QtCanvas() [6/6]

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

◆ ~QtCanvas() [2/2]

virtual ~QtCanvas ( )
virtual

Member Function Documentation

◆ addAnimation() [1/2]

void addAnimation ( QtCanvasItem item)
virtual

Definition at line 933 of file qtcanvas.cpp.

+ Here is the caller graph for this function:

◆ addAnimation() [2/2]

virtual void addAnimation ( QtCanvasItem )
virtual

◆ addItem() [1/2]

void addItem ( QtCanvasItem item)
virtual

Definition at line 922 of file qtcanvas.cpp.

+ Here is the caller graph for this function:

◆ addItem() [2/2]

virtual void addItem ( QtCanvasItem )
virtual

◆ addItemToChunk() [1/2]

void addItemToChunk ( QtCanvasItem ,
int  i,
int  j 
)

◆ addItemToChunk() [2/2]

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

Definition at line 1435 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ addItemToChunkContaining() [1/2]

void addItemToChunkContaining ( QtCanvasItem ,
int  x,
int  y 
)

◆ addItemToChunkContaining() [2/2]

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

Definition at line 1467 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ addView() [1/2]

void addView ( QtCanvasView view)
virtual

Definition at line 966 of file qtcanvas.cpp.

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

◆ addView() [2/2]

virtual void addView ( QtCanvasView )
virtual

◆ advance [1/2]

void advance ( )
virtualslot

Definition at line 1073 of file qtcanvas.cpp.

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

◆ advance [2/2]

virtual void advance ( )
virtualslot

◆ allItems() [1/2]

QtCanvasItemList allItems ( )

Definition at line 706 of file qtcanvas.cpp.

+ Here is the caller graph for this function:

◆ allItems() [2/2]

QtCanvasItemList allItems ( )

◆ backgroundColor() [1/2]

QColor backgroundColor ( ) const

Definition at line 1503 of file qtcanvas.cpp.

+ Here is the caller graph for this function:

◆ backgroundColor() [2/2]

QColor backgroundColor ( ) const

◆ backgroundPixmap() [1/2]

QPixmap backgroundPixmap ( ) const

Definition at line 1540 of file qtcanvas.cpp.

◆ backgroundPixmap() [2/2]

QPixmap backgroundPixmap ( ) const

◆ chunkSize() [1/2]

int chunkSize ( ) const
inline

Definition at line 370 of file qtcanvas.h.

◆ chunkSize() [2/2]

int chunkSize ( ) const
inline

Definition at line 370 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ collisions() [1/6]

QtCanvasItemList collisions ( const QPoint &  p) const

Definition at line 2703 of file qtcanvas.cpp.

+ Here is the caller graph for this function:

◆ collisions() [2/6]

QtCanvasItemList collisions ( const QPoint &  ) const

◆ collisions() [3/6]

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

Definition at line 2739 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ collisions() [4/6]

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

◆ collisions() [5/6]

QtCanvasItemList collisions ( const QRect &  r) const

Definition at line 2716 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ collisions() [6/6]

QtCanvasItemList collisions ( const QRect &  ) const

◆ drawArea() [1/2]

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

Definition at line 1294 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ drawArea() [2/2]

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

◆ drawBackground() [1/2]

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

Definition at line 1577 of file qtcanvas.cpp.

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

◆ drawBackground() [2/2]

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

◆ drawCanvasArea() [1/2]

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

Definition at line 1308 of file qtcanvas.cpp.

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

◆ drawCanvasArea() [2/2]

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

◆ drawForeground() [1/2]

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

◆ drawForeground() [2/2]

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

Definition at line 1633 of file qtcanvas.cpp.

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

◆ drawViewArea() [1/2]

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

Definition at line 1110 of file qtcanvas.cpp.

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

◆ drawViewArea() [2/2]

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

◆ height() [1/2]

int height ( ) const
inline

Definition at line 328 of file qtcanvas.h.

◆ height() [2/2]

int height ( ) const
inline

Definition at line 328 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ onCanvas() [1/4]

bool onCanvas ( const QPoint &  p) const
inline

Definition at line 352 of file qtcanvas.h.

+ Here is the call graph for this function:

◆ onCanvas() [2/4]

bool onCanvas ( const QPoint &  p) const
inline

Definition at line 352 of file qtcanvas.h.

+ Here is the call graph for this function:

◆ onCanvas() [3/4]

bool onCanvas ( int  x,
int  y 
) const
inline

Definition at line 346 of file qtcanvas.h.

◆ onCanvas() [4/4]

bool onCanvas ( int  x,
int  y 
) const
inline

Definition at line 346 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ rect() [1/2]

QRect rect ( ) const
inline

Definition at line 340 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ rect() [2/2]

QRect rect ( ) const
inline

Definition at line 340 of file qtcanvas.h.

◆ removeAnimation() [1/2]

void removeAnimation ( QtCanvasItem item)
virtual

Definition at line 944 of file qtcanvas.cpp.

+ Here is the caller graph for this function:

◆ removeAnimation() [2/2]

virtual void removeAnimation ( QtCanvasItem )
virtual

◆ removeItem() [1/2]

void removeItem ( QtCanvasItem item)
virtual

Definition at line 955 of file qtcanvas.cpp.

+ Here is the caller graph for this function:

◆ removeItem() [2/2]

virtual void removeItem ( QtCanvasItem )
virtual

◆ removeItemFromChunk() [1/2]

void removeItemFromChunk ( QtCanvasItem ,
int  i,
int  j 
)

◆ removeItemFromChunk() [2/2]

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

Definition at line 1451 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ removeItemFromChunkContaining() [1/2]

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

Definition at line 1483 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ removeItemFromChunkContaining() [2/2]

void removeItemFromChunkContaining ( QtCanvasItem ,
int  x,
int  y 
)

◆ removeView() [1/2]

void removeView ( QtCanvasView view)
virtual

Definition at line 985 of file qtcanvas.cpp.

+ Here is the caller graph for this function:

◆ removeView() [2/2]

virtual void removeView ( QtCanvasView )
virtual

◆ resize() [1/2]

virtual void resize ( int  width,
int  height 
)
virtual

◆ resize() [2/2]

void resize ( int  width,
int  height 
)
virtual

Definition at line 716 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ resized [1/2]

void resized ( )
signal

◆ resized [2/2]

void resized ( )
signal
+ Here is the caller graph for this function:

◆ retune() [1/2]

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

◆ retune() [2/2]

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

Definition at line 800 of file qtcanvas.cpp.

◆ sameChunk() [1/2]

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

Definition at line 378 of file qtcanvas.h.

◆ sameChunk() [2/2]

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

Definition at line 378 of file qtcanvas.h.

◆ setAdvancePeriod() [1/2]

void setAdvancePeriod ( int  ms)
virtual

Definition at line 998 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ setAdvancePeriod() [2/2]

virtual void setAdvancePeriod ( int  ms)
virtual

◆ setAllChanged() [1/2]

void setAllChanged ( )
virtual

Definition at line 1151 of file qtcanvas.cpp.

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

◆ setAllChanged() [2/2]

virtual void setAllChanged ( )
virtual

◆ setBackgroundColor() [1/2]

void setBackgroundColor ( const QColor &  c)
virtual

Definition at line 1514 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ setBackgroundColor() [2/2]

virtual void setBackgroundColor ( const QColor &  c)
virtual

◆ setBackgroundPixmap() [1/2]

void setBackgroundPixmap ( const QPixmap &  p)
virtual

Definition at line 1552 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ setBackgroundPixmap() [2/2]

virtual void setBackgroundPixmap ( const QPixmap &  p)
virtual

◆ setChanged() [1/2]

void setChanged ( const QRect &  area)
virtual

Definition at line 1161 of file qtcanvas.cpp.

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

◆ setChanged() [2/2]

virtual void setChanged ( const QRect &  area)
virtual

◆ setChangedChunk() [1/2]

virtual void setChangedChunk ( int  i,
int  j 
)
virtual

◆ setChangedChunk() [2/2]

void setChangedChunk ( int  i,
int  j 
)
virtual

Definition at line 1398 of file qtcanvas.cpp.

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

◆ setChangedChunkContaining() [1/2]

void setChangedChunkContaining ( int  x,
int  y 
)
virtual

Definition at line 1418 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ setChangedChunkContaining() [2/2]

virtual void setChangedChunkContaining ( int  x,
int  y 
)
virtual

◆ setTile() [1/2]

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

Definition at line 1760 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ setTile() [2/2]

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

◆ setTiles() [1/2]

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

Definition at line 1670 of file qtcanvas.cpp.

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

◆ setTiles() [2/2]

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

◆ setUnchanged() [1/2]

virtual void setUnchanged ( const QRect &  area)
virtual

◆ setUnchanged() [2/2]

void setUnchanged ( const QRect &  area)
virtual

Definition at line 1200 of file qtcanvas.cpp.

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

◆ setUpdatePeriod() [1/2]

void setUpdatePeriod ( int  ms)
virtual

Definition at line 1028 of file qtcanvas.cpp.

+ Here is the call graph for this function:

◆ setUpdatePeriod() [2/2]

virtual void setUpdatePeriod ( int  ms)
virtual

◆ size() [1/2]

QSize size ( ) const
inline

Definition at line 334 of file qtcanvas.h.

◆ size() [2/2]

QSize size ( ) const
inline

Definition at line 334 of file qtcanvas.h.

◆ tile() [1/2]

int tile ( int  x,
int  y 
) const
inline

Definition at line 290 of file qtcanvas.h.

◆ tile() [2/2]

int tile ( int  x,
int  y 
) const
inline

Definition at line 290 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ tileHeight() [1/2]

int tileHeight ( ) const
inline

Definition at line 314 of file qtcanvas.h.

◆ tileHeight() [2/2]

int tileHeight ( ) const
inline

Definition at line 314 of file qtcanvas.h.

◆ tilesHorizontally() [1/2]

int tilesHorizontally ( ) const
inline

Definition at line 296 of file qtcanvas.h.

◆ tilesHorizontally() [2/2]

int tilesHorizontally ( ) const
inline

Definition at line 296 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ tilesVertically() [1/2]

int tilesVertically ( ) const
inline

Definition at line 302 of file qtcanvas.h.

◆ tilesVertically() [2/2]

int tilesVertically ( ) const
inline

Definition at line 302 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ tileWidth() [1/2]

int tileWidth ( ) const
inline

Definition at line 308 of file qtcanvas.h.

◆ tileWidth() [2/2]

int tileWidth ( ) const
inline

Definition at line 308 of file qtcanvas.h.

◆ update [1/2]

void update ( )
virtualslot

Definition at line 1127 of file qtcanvas.cpp.

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

◆ update [2/2]

virtual void update ( )
virtualslot

◆ validChunk() [1/4]

bool validChunk ( const QPoint &  p) const
inline

Definition at line 364 of file qtcanvas.h.

+ Here is the call graph for this function:

◆ validChunk() [2/4]

bool validChunk ( const QPoint &  p) const
inline

Definition at line 364 of file qtcanvas.h.

+ Here is the call graph for this function:

◆ validChunk() [3/4]

bool validChunk ( int  x,
int  y 
) const
inline

Definition at line 358 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ validChunk() [4/4]

bool validChunk ( int  x,
int  y 
) const
inline

Definition at line 358 of file qtcanvas.h.

◆ width() [1/2]

int width ( ) const
inline

Definition at line 322 of file qtcanvas.h.

+ Here is the caller graph for this function:

◆ width() [2/2]

int width ( ) const
inline

Definition at line 322 of file qtcanvas.h.

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

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