[Kde-games-devel] [RFC] TagaroInput API

Stefan Majewsky kdemailinglists at bethselamin.de
Mon Jan 17 23:52:04 CET 2011


Hi,

I've committed to a work branch the headers of the basic two classes of
TagaroInput [1]. The design is mostly based on what I need for KDiamond and
Kolf, though it should fit 99% of the needs of our games. Please have a look
at it and comment on it.

Because this point might be unclear, here's a comment on what this data()
stuff is all about: Imagine the click interaction in KDiamond. All information
I need is which position in the grid has been clicked, so I call
setDataProperty("pos") for the ClickHandler and get a clicked() event with a
parameter data == QPointF(5, 2) if the diamond at grid position (5, 2) has
been clicked.

Greetings
Stefan

[1] http://gitweb.kde.org/clones/libtagaro/majewsky/work.git/blob/14ecca1eebc1164bfd0dec8a780aebd5b8d40e89:/tagaro/input/inputhandler.h
Or if this link does not work: Clone the "clones/libtagaro/majewsky/work" repo
from git.kde.org, checkout the "work/input" branch and look at the file
"tagaro/input/inputhandler.h".


More information about the kde-games-devel mailing list