diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-15 18:34:54 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-15 18:34:54 +0000 |
commit | 8805e6b17b1460f3316ccb28629e8ad78e4b9c2c (patch) | |
tree | dc9b702962ecf0060cc473397b9f80268c2456c9 /kbarcode/tcanvasitem.h | |
download | kbarcode-8805e6b17b1460f3316ccb28629e8ad78e4b9c2c.tar.gz kbarcode-8805e6b17b1460f3316ccb28629e8ad78e4b9c2c.zip |
Added abandoned KDE3 version of kbarcode
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1090667 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbarcode/tcanvasitem.h')
-rw-r--r-- | kbarcode/tcanvasitem.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/kbarcode/tcanvasitem.h b/kbarcode/tcanvasitem.h new file mode 100644 index 0000000..7493fa8 --- /dev/null +++ b/kbarcode/tcanvasitem.h @@ -0,0 +1,57 @@ + +#ifndef TCANVASITEM_H +#define TCANVASITEM_H +#include <qstring.h> +#include <qcanvas.h> + +#include "documentitem.h" +#include "referencecounted.h" + +class MyCanvasView; +/** + * Class TCanvasItem + * Represents a DocumentItem on a QCanvas. + * This class is also responsible for drawing + * the drag marks provided by SpotProvider. + * + * The class is also ReferenceCounted!!! + */ +class TCanvasItem : public QCanvasRectangle, public ReferenceCounted { +public: + + TCanvasItem ( MyCanvasView* cv ); + ~TCanvasItem ( ); + + void update(); + + int rtti() const; + + void setZ( double z ); + void moveBy( double x, double y ); + void setSize( int width, int height ); + + void moveMM( int x, int y ); + void moveByMM( int x, int y ); + void setSizeMM( int w, int h ); + + void show(); + void hide(); + + void setItem (DocumentItem* item); + DocumentItem* item () const; + + MyCanvasView* canvasView() const; + +protected: + /** + * + * @param painter + */ + void drawShape ( QPainter & p ); + +private: + DocumentItem* m_item; + MyCanvasView* m_view; +}; +#endif //TCANVASITEM_H + |