Logo Search packages:      
Sourcecode: kcm-qt-graphicssystem version File versions  Download package

void EngineProbe::paintEvent ( QPaintEvent *  event ) [protected, virtual]

Overload function for QWidget::paintEvent(). This does not do any special painting but is the actual heart of the probe. It creates a QPainter and then tries to get the underlying QPaintEngine's type.

If a type was obtainable this function emits the engineType() signal.

Please also note that the widget will be actually painted (e.g. shown) until you delete it or call hide().

Parameters:
eventQPaintEvent as posted by show() or hide() for example.

Definition at line 34 of file EngineProbe.cpp.

References engineType(), and probed.

{
    Q_UNUSED(event);

    if (probed) {
        deleteLater();
        return;
    }

    QPainter p;
    p.begin(this);
    QPaintEngine *e = p.paintEngine();
    if (e) {
        emit engineType(e->type());
        deleteLater();
        probed = true;
    }
    p.end();
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index