示例#1
0
//! [0]
bool DBScreen::initDevice()
{
    if (!QLinuxFbScreen::initDevice())
        return false;

    QScreenCursor::initSoftwareCursor();
    image = new QImage(deviceWidth(), deviceHeight(), pixelFormat());
    painter = new QPainter(image);

    return true;
}
示例#2
0
/*!
    \reimp
*/
QRegion QTransformedScreen::region() const
{
    QRegion deviceRegion = QProxyScreen::region();
    return mapFromDevice(deviceRegion, QSize(deviceWidth(), deviceHeight()));
}