Logo Search packages:      
Sourcecode: qt4-x11 version File versions

bool QPainter::end (  )  [inherited]

Ends painting. Any resources used while painting are released. You don't normally need to call this since it is called by the destructor.

Returns true if the painter is no longer active; otherwise returns false.

See also:
begin(), isActive()

Definition at line 1368 of file qpainter.cpp.

References QPainter::isActive().

Referenced by QPainter::begin(), QWindowsStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QCommonStyle::drawControl(), QPlastiqueStyle::drawPrimitive(), Q3IconView::eventFilter(), QCommonStyle::generatedIconPixmap(), QGraphicsSvgItem::paint(), QGraphicsView::paintEvent(), Q3IconViewItem::paintItem(), QItemDelegate::selected(), QCleanlooksStyle::standardIconImplementation(), and QPainter::~QPainter().

{
#ifdef QT_DEBUG_DRAW
    if (qt_show_painter_debug_output)
        printf("QPainter::end()\n");
#endif

    if (!isActive()) {
        qWarning("QPainter::end: Painter not active, aborted");
        return false;
    }

    Q_D(QPainter);
    if (d->states.size()>1) {
        qWarning("QPainter::end: Painter ended with %d saved states",
                 d->states.size());
    }

    bool ended = true;

    if (d->engine->isActive()) {
        ended = d->engine->end();
        d->updateState(0);

        --d->device->painters;
        if (d->device->painters == 0) {
            d->engine->setPaintDevice(0);
            d->engine->setActive(false);
        }
    }

    if (d->engine->autoDestruct()) {
        delete d->engine;
    }

    d->engine = 0;

    d->device = 0;
    return ended;
}


Generated by  Doxygen 1.6.0   Back to index