Ignore:
Timestamp:
Aug 14, 2009, 5:13:16 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Paint event translation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qwidget_pm.cpp

    r110 r112  
    14671467    fs.setCoords(cswp.x, cswp.y, swp.cx - cswp.x - cswp.cx,
    14681468                                 swp.cy - cswp.y - cswp.cy);
    1469     // @todo need this??
     1469    // @todo do we really need to update crect here??
    14701470    //data.crect.setRect(swp.x + cswp.x, swp.y + cswp.y, cswp.cx, cswp.cy);
    14711471
     
    14801480QPaintEngine *QWidget::paintEngine() const
    14811481{
    1482     // @todo implement
     1482    // @todo this is a place to return some direct on-screen PaintEngine once
     1483    // we decide to support it
     1484
     1485    // We set this bit which is checked in setAttribute for
     1486    // Qt::WA_PaintOnScreen. We do this to allow these two scenarios:
     1487    //
     1488    // 1. Users accidentally set Qt::WA_PaintOnScreen on X and port to
     1489    // OS/2 which would mean suddenly their widgets stop working.
     1490    //
     1491    // 2. Users set paint on screen and subclass paintEngine() to
     1492    // return 0, in which case we have a "hole" in the backingstore
     1493    // allowing use of GPI directly.
     1494    //
     1495    // 1 is WRONG, but to minimize silent failures, we have set this
     1496    // bit to ignore the setAttribute call. 2. needs to be
     1497    // supported because its our only means of embeddeding native
     1498    // graphics stuff.
     1499    const_cast<QWidgetPrivate *>(d_func())->noPaintOnScreen = 1;
     1500
    14831501    return 0;
    14841502}
Note: See TracChangeset for help on using the changeset viewer.