#include <KDChartSignalCompressor.h>
Usage: create a object of SignalCompressor, and give it the name and object of the signal it is supposed to manage instead of emitting the signal, call emitSignal() on the compressor the signal will only be emitted once, and that is after the current call stack ends and returns to the event loop
With the current implementation, the class changes the sematics of signals to be a queued connection. If that is not wanted, another compression algorithm needs to be implemented. Also, at the moment, only nullary signals are supported, as parameters could not be compressed. A typical use of the class is to compress update notifications. This class is not part of the published KDChart API.
Definition at line 58 of file KDChartSignalCompressor.h.
Public Slots | |
void | emitSignal () |
Signals | |
void | finallyEmit () |
Public Member Functions | |
SignalCompressor (QObject *receiver, const char *signal, QObject *parent=0) |
SignalCompressor::SignalCompressor | ( | QObject * | receiver, | |
const char * | signal, | |||
QObject * | parent = 0 | |||
) |
Definition at line 34 of file KDChartSignalCompressor.cpp.
References finallyEmit().
00036 : QObject( parent ) 00037 { 00038 connect( this, SIGNAL( finallyEmit() ), receiver, signal ); 00039 connect( &m_timer, SIGNAL( timeout() ), SLOT( nowGoAlready() ) ); 00040 m_timer.setSingleShot( true ); 00041 // m_timer.setIntervall( 0 ); // default, just to know... 00042 }
void SignalCompressor::emitSignal | ( | ) | [slot] |
void KDChart::SignalCompressor::finallyEmit | ( | ) | [signal] |
Referenced by SignalCompressor().