#ifndef __CANVAS_ITEM_FACTORY_H__
#define __CANVAS_ITEM_FACTORY_H__


#include <canvasitem.h>


// Add PythonQt bindings
class CanvasItemFactory : public QObject
{
    Q_OBJECT

public slots:
    // Constructor and Destructor
    CanvasItem *new_CanvasItem(Canvas *parent, int type, int x, int y, int w, int h, QString file, QString text) {
        CanvasItem *o = new CanvasItem(parent, x, y, w, h);
        o->type = type;
        o->file = file;
        //o->text = text;
        o->text_set(text);
        o->color = QColor(0,0,0,0);
        return o;
    }
    void delete_CanvasItem(CanvasItem *o) { delete o->widget; delete o; }
    void resize(CanvasItem *o, int w, int h) { o->resize(w, h); }
    void fill_set(CanvasItem *o, int x, int y, int w, int h) { o->fill_set(x, y, w, h); }

public:
    static int id;
};


#endif


