[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: Krita UI and tool interaction
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2003-10-13 21:11:07
[Download RAW message or body]


On Monday 13 October 2003 20:37, Patrick Julien wrote:

> Not even a painter gets passed in?  It would be much nicer if this stuff
> are attributes of the painter, not the actual tools themselves.

No... It's really bare:

class KisToolInterface : public QObject, public KShared {
	Q_OBJECT

public:
	KisToolInterface();
	virtual ~KisToolInterface();

public:
	virtual void paint(QPainter& gc) = 0;
	virtual void paint(QPainter& gc, const QRect& rc) = 0;
	virtual void clear() = 0;
	virtual void clear(const QRect& rc) = 0;

	virtual void setup() = 0;
	virtual void activate() = 0;
	virtual void enter(QEvent *e) = 0;
	virtual void leave(QEvent *e) = 0;
	virtual void mousePress(QMouseEvent *e) = 0;
	virtual void mouseMove(QMouseEvent *e) = 0;
	virtual void mouseRelease(QMouseEvent *e) = 0;
        virtual void tabletEvent(QTabletEvent *e) = 0;
	virtual void keyPress(QKeyEvent *e) = 0;
	virtual void keyRelease(QKeyEvent *e) = 0;

	virtual void setCursor(const QCursor& cursor) = 0;
	virtual void cursor(QWidget *w) const = 0;
	virtual KDialog *options() = 0;
	
	virtual void save(KisToolMementoSP memento) = 0;
	virtual void restore(KisToolMementoSP memento) = 0;

public slots:
	virtual void activateSelf() = 0;

private:
	KisToolInterface(const KisToolInterface&);
	KisToolInterface& operator=(const KisToolInterface&);
};


_______________________________________________
kimageshop mailing list
kimageshop@mail.kde.org
http://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic