Changeset 112


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

gui: Paint event translation.

Location:
trunk/src/gui/kernel
Files:
4 edited

Legend:

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

    r109 r112  
    127127#endif
    128128    bool        translatePaintEvent(const QMSG &qmsg);
    129 //  bool        translateConfigEvent(const QMSG &msg);
     129msg);
    130130    bool        translateCloseEvent(const QMSG &qmsg);
    131131//  void        repolishStyle(QStyle &style);
     
    556556        } else {
    557557            switch(msg) {
     558
     559
     560
     561
     562
     563
     564
     565
     566
     567
     568
     569
     570
     571
     572
     573
     574
     575
     576
     577
     578
     579
     580
     581
     582
     583
     584
     585
     586
     587
     588
     589
     590
     591
    558592
    559593            case WM_SHOW: {
     
    14001434
    14011435//
     1436
     1437
     1438
     1439
     1440
     1441
     1442
     1443
     1444
     1445
     1446
     1447
     1448
     1449
     1450
     1451
     1452
     1453
     1454
     1455
     1456
     1457
     1458
     1459
     1460
     1461
     1462
     1463
     1464
     1465
     1466
     1467
     1468
     1469
     1470
     1471
     1472
     1473
     1474
     1475
     1476
     1477
     1478
     1479
     1480
     1481
     1482
     1483
     1484
     1485
     1486
     1487
     1488
     1489
     1490
     1491
     1492
     1493
     1494
     1495
     1496
     1497
     1498
     1499
     1500
     1501
     1502
     1503
     1504
     1505
     1506
     1507
     1508
     1509
     1510
     1511
     1512
     1513
     1514
     1515
     1516
     1517
     1518
     1519
     1520
     1521
    14021522// Close window event translation.
    14031523//
  • trunk/src/gui/kernel/qwidget.cpp

    r95 r112  
    184184        ,isScrolled(0)
    185185        ,isMoved(0)
    186 #ifdef Q_WS_WIN
     186#if
    187187        ,noPaintOnScreen(0)
    188188#endif
     
    96759675               "QWidgetPrivate::high_attributes[] too small to contain all attributes in WidgetAttribute");
    96769676
    9677 #ifdef Q_WS_WIN
     9677#if
    96789678    if (attribute == Qt::WA_PaintOnScreen && on) {
    9679         // see qwidget_win.cpp, ::paintEngine for details
     9679        // see qwidget_.cpp, ::paintEngine for details
    96809680        paintEngine();
    96819681        if (d->noPaintOnScreen)
  • trunk/src/gui/kernel/qwidget_p.h

    r100 r112  
    551551    uint isMoved : 1;
    552552
    553 #ifdef Q_WS_WIN
    554     uint noPaintOnScreen : 1; // see qwidget_win.cpp ::paintEngine()
     553#if
     554    uint noPaintOnScreen : 1; // see qwidget_.cpp ::paintEngine()
    555555#endif
    556556
  • 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 ??
    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.