[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-users] Signals and Slots
From: |
Dimitris Mexis |
Subject: |
[paragui-users] Signals and Slots |
Date: |
Sun, 17 Jul 2005 12:02:56 +0300 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041103) |
clsStartUp::clsStartUp( struct GfxOptions & gfxOptions, PG_Widget *
parent, PG_Rect r, char * windowtext ):
pgWindow( parent, r, windowtext) <---------Just the constructor, just to
show you where it lies
this is my line that emits a signal...
{
rdoNation->sigClick.connect( slot( *this, &clsStartUp::handle_selectitem
) );
PG_RadioButton & rdm = rdoNation[0];
}
This is the slot...
bool clsStartUp::handle_selectitem( PG_Pointer clientdata )
{
PG_RadioButton* b = (PG_RadioButton*)clientdata;
int id = b->GetID();
player->setNation( id );
}
Why doesn't it work? It gives me :
clstown.cpp:212: Fehler: keine passende Funktion f\uffffr Aufruf von
\uffffPG_RadioButton::SignalButtonClick<bool>::connect(SigC::Slot1<bool,
void*>, void*)\uffff
/usr/include/paragui/pgsignals.h:94: Anmerkung: Kandidaten sind:
SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const
SigC::Slot3<bool, P1, P2, datatype>&, datatype) [with P1 =
PG_RadioButton*, P2 = bool, datatype = void*]
/usr/include/paragui/pgsignals.h:98: Anmerkung:
SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const
SigC::Slot2<bool, P1, datatype>&, datatype) [with P1 = PG_RadioButton*,
P2 = bool, datatype = void*]
/usr/include/paragui/pgsignals.h:102: Anmerkung:
SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const
SigC::Slot2<bool, P1, datatype>&) [with P1 = PG_RadioButton*, P2 = bool,
datatype = void*]
/usr/include/paragui/pgsignals.h:106: Anmerkung:
SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const
SigC::Slot1<bool, datatype>&) [with P1 = PG_RadioButton*, P2 = bool,
datatype = void*]
/usr/include/paragui/pgsignals.h:110: Anmerkung:
SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const
SigC::Slot1<bool, datatype>&) [with P1 = PG_RadioButton*, P2 = bool,
datatype = void*]
/usr/include/paragui/pgsignals.h:114: Anmerkung:
SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const
SigC::Slot0<bool>&) [with P1 = PG_RadioButton*, P2 = bool, datatype = void*]
In the end....HOW can anyone connect a RADIOBUTTON or something that has
clientdata to a slot!? Please do not send me back to the examples,
because the signals and slot mechanisms are for....buttons(!) The only
thing that I saw worth to investigate is building a MyClass, but is this
the right way ? How could I? In the end is there anyone who used the
radiobutton and clientdata? Someone?
- [paragui-users] Signals and Slots,
Dimitris Mexis <=