#include <canvas.h>
Inheritance diagram for Canvas::Item:


Public Member Functions | |
| Item (Abstract *canvas=NULL) | |
| void | changed () |
| bool | visible () const |
| void | setVisible (bool v) |
| bool | animated () const |
| void | setAnimated (bool a) |
| int | opacity () const |
| void | setOpacity (int o) |
| void | hide () |
| void | show () |
| void | raise () |
| void | lower () |
| void | stackOver (Item *ref) |
| void | stackUnder (Item *ref) |
| Abstract * | canvas () const |
| Widget * | topLevelCanvas () const |
| void | putInCanvas (Abstract *canvas) |
| QPoint | pos () const |
| void | moveTo (QPoint newpos) |
| void | moveTo (int x, int y) |
| virtual void | paint (QPainter *p)=0 |
| virtual QRect | rect () const =0 |
| virtual bool | layered () const |
| virtual void | advance (int msecs) |
Friends | |
| class | Abstract |
| class | Widget |
| class | Group |
A Item is an abstract class to represent a generic item that can be put in a canvas.
|
|
Constructor, it allows you to specify the reference canvas or to create an orphan item that will be put into a canvas in a second moment. The item is always hidden after beeing created. Note that the restacking functions are quite intelligent and will only repaint if there is an actual need of doing it. So if you call raise on an item that is already (locally) on the top, no redraw will take place |
|
|
Override this function to handle animations, the default function does nothing. The argument is the number of milliseconds from the creation of the canvas, so that you use it to handle the animation. Reimplemented in Canvas::Group. |
|
|
Returns true if the item is animated |
|
|
Returns the canvas that is actually "owning" the item |
|
|
schedule an update if the item |
|
|
Hides the item |
|
|
Override this function to specify if the painting operations will paint over each other. If not, the item will be drawn more quickly when opacity is != 255, because it does not have to be painted onto a pixmap first. If you don't care about the item's opacity, don't care about this function as well. |
|
|
Restacks the item on the bottom of the canvas |
|
||||||||||||
|
Overload, same as above |
|
|
Sets a new position. Note that an update will be posted to the parent canvas, and if you move an item twice in very little time, a region bigger than needed will be updated, causing a possible inefficiency |
|
|
Returns the opacity of the item |
|
|
Override this function to draw the item with the painter Implemented in Canvas::Group, Canvas::Dummy, Canvas::Picture, Canvas::Pixmap, Canvas::TiledPixmap, Canvas::Rectangle, and Canvas::Text. |
|
|
Returns the position of the item |
|
|
Lets you specify the owning canvas. Call this function with canvas set to NULL to remove the item from the current canvas. |
|
|
Restacks the item on the top of the canvas |
|
|
Override this function to return the rect the item will be drawn into Implemented in Canvas::Group, Canvas::Dummy, Canvas::Picture, Canvas::Pixmap, Canvas::TiledPixmap, Canvas::Rectangle, and Canvas::Text. |
|
|
Set the item as animated or not |
|
|
Set the item's opacity value (int the 0-255 range) |
|
|
Set the item as visible or hidden |
|
|
Shows the item |
|
|
Restacks the item immediately over ref |
|
|
Restacks the item immediately under ref |
|
|
Returns the toplevel canvas widget, or NULL |
|
|
Returns true if the item is visible |
1.4.3-20050530