Redirecting tablet/mouse event form KoCanvasControler to KoCanvasBase
Cyrille Berger
cberger at cberger.net
Mon Jul 28 14:13:43 CEST 2008
On Monday 28 July 2008, Thomas Zander wrote:
> On Saturday 26. July 2008 10:03:03 Cyrille Berger wrote:
> > Hi,
> >
> > I am considering redirecting mouse/tablet events from KoCanvasControler
> > to KoCanvasBase,
>
> KoCanvasBase is a child-widget of the controller. This means that the
> canvasBase always gets the events first, and if it chooses not to accept
> the event they will be offered again to the canvasController (since its the
> parent in the hierarchy).
>
> The application-specific canvas is the only one that has all the
> information to convert mouse/tablet events into KoPointerEvent objects.
>
> So, I'm assuming you meant that you want to catch all the events in the
> canvasController instead of the krita-specific canvas as is done now.
Hum not really. The problem is that Krita's canvas is of limited size (unlike
karbon), so when the cursor goes out, it doesn't receive anything anymore
(which is a Qt bug when the strokes started inside the canvas). But if the
user start its stroke out of the canvas, well obviously it doesn't receive
events, and clearly, Qt isn't to blame in that case ;) Hence the idea of
redirecting events that goes to the KoCanvasControler, when cursor is out of
KoCanvasBase.
> If that is indeed what you want to do, then I suggest a
> KisCanvasController. But it won't be easy to do correctly :(
>
> I have done quite some work on Qt4.5 for tablets, I intend to do more, but
> there is only so much time I can put in to it.
Yes that's a good thing. On the other hand we do hope to release 2.0 before
4.5, and the first point (bug 162874) is released critical for krita, so
finding a solution for 2.0 that would reduce the sevrity of the bug is
important. Not to mention point 2 which needs to be taken care of.
> It is important to note that Linux tablet support (in Qt) is the worst of
> all, going to another platform will make Krita behave better. So keep that
> in mind when you put time in this. Unfortunately there still is a high bias
> towards Windows / Mac for tablet users.
And Krita still has a high bias toward Linux right now ;p
--
Cyrille Berger
More information about the kimageshop
mailing list