Quoted
/// mouseDoubleClickEvent()
void dlgMain::mouseDoubleClickEvent(QMouseEvent *event)
{
QString line;
if( actionList.last() == "1,4,n,2,1,5,0,0" )
{
line = drawing->selectItem( event->pos() );
supports->returnUserInput( line );
}
}
This post has been edited 1 times, last edit by "impeteperry" (Jan 9th 2006, 3:37am)
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
/* at first define a
sigaction that will catch the external signal
*/
struct sigaction SA;
// qt signal for emitting when the external signal has arrived
signal:
void SIgnalVoyAlrt();
// setting the signal handler. VoyAlrt is the external signal handler
SA.sa_handler = VoyAlrt;
// connecting the signal with the handler VOYSIG is the signal
// check KDE doc for your signal
sigaction(VOYSIG, &SA,0);
// the external signal handler. It just emits QT signal
int VoyAlrt ()
{
emit SignalVoyAlrt();
}
// connection of QT signal with its Slot
connect(this, SIGNAL(SignalVoyAlrt()), this, SLOT(GetSlot()) );
// the slot connected to the signal
int GetSlot ()
{
// processing...
}
|

This post has been edited 1 times, last edit by "marcidm" (Jan 9th 2006, 10:45pm)