[Kde-games-devel] Connect a button with KGameIO

cantabile cantabile.03 at wanadoo.fr
Sun Sep 14 03:57:52 CEST 2003


Hi, 
I'm trying to connect a button (in a toolbar) with a KGameIO method, and
I don't succeed at the moment.
Since the KGameIO is linked to the player, not  to a view or a document
object, how can I do it ?
My button is created via :
KAction * action = new KAction(play,...)
My KGameIO method is in an inherited class. We can call it moveDone, as
Andreas and Martin suggested before.

I tried while constructing the interface

connect(play, SIGNAL(clicked()), ***, SLOT(slotPlay()));

But the problem is with the ***: KGAmeIO* io doesn't work, of course,
since it isn't instanciated.

I tried also to connect the method in the KGamIO constructor, but the
button (play) isn't recognize (build) yet.
I also tried to get the io from the player (in slotPlay() )but didn't
find a method with a KGameIO return type.

This is certainly a stupid question but I'm stuck there :)
Thanks for your help.



More information about the kde-games-devel mailing list