1 /**********************************************************************
7 **********************************************************************/
10 #include "control_message.h"
11 #include "ksircprocess.h"
15 #include <QTimerEvent>
18 #include <QAbstractEventDispatcher>
20 KSircIOLAG::KSircIOLAG(KSircProcess
*_proc
)
22 KSircMessageReceiver(_proc
)
28 //(proc->getWindowList())["!all"]->control_message(SET_LAG, "99");
32 KSircIOLAG::~KSircIOLAG()
34 QAbstractEventDispatcher::instance()->unregisterTimers(this);
37 void KSircIOLAG::sirc_receive(QByteArray str
, bool)
40 if(str
.contains("*L*")){
42 s1
= str
.find("*L* ") + 4;
45 kDebug(5008) << "Lag mesage broken: " << str
<< endl
;
48 QString lag
= str
.mid(s1
, s2
- s1
);
49 // cerr << "Lag: " << str << endl;
50 // cerr << "Setting lag to: " << lag << endl;
51 (proc
->getWindowList())["!all"]->control_message(SET_LAG
, lag
);
56 void KSircIOLAG::control_message(int, QString
)
60 void KSircIOLAG::timerEvent ( QTimerEvent
* )
62 QByteArray cmd
= "/lag\n";