⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qdirectpainter_qws.cpp

📁 奇趣公司比较新的qt/emd版本
💻 CPP
📖 第 1 页 / 共 2 页
字号:
    Returns the region requested by this QDirectPainter.    Note that if the QDirectPainter::Reserved flag is set, the region    returned by this function will always be equivalent to the region    returned by the allocatedRegion() function. Otherwise they might    differ (see \l {Dynamic Allocation} for details).    \sa geometry(), setRegion()*/QRegion QDirectPainter::requestedRegion() const{    Q_D(const QDirectPainter);    return d->requested_region;}/*!    \since 4.2    Returns the currently reserved region.    Note that if the QDirectPainter::Reserved flag is set, the region    returned by this function will always be equivalent to the region    returned by the requestedRegion() function. Otherwise they might    differ (see \l {Dynamic Allocation} for details).    \sa requestedRegion(), geometry()*/QRegion QDirectPainter::allocatedRegion() const{    Q_D(const QDirectPainter);    return d->surface->region();}/*!    \since 4.2    Returns the window system identifier of the widget.*/WId QDirectPainter::winId() const{    Q_D(const QDirectPainter);    return d->surface->windowId();}/*!    \fn void QDirectPainter::regionChanged(const QRegion &newRegion)    \since 4.2    This function is called when the allocated region changes.    This function is not called for region changes that happen while the    startPainting() function is executing.    Note that the given region, \a newRegion, is not guaranteed to be correct at the    time you access the display. To prevent reentrancy problems you should    always call startPainting() before updating the display and then use    allocatedRegion() to retrieve the correct region.    \sa allocatedRegion(), startPainting(), {Dynamic Allocation}*/void QDirectPainter::regionChanged(const QRegion &region){    Q_UNUSED(region);}/*!    \preliminary    \since 4.2    Call this function before you start updating the pixels in the    allocated region. The hardware will be notified, if necessary,    that you are about to start painting operations.    Set \a lockDisplay if you want startPainting() and endPainting()    to lock() and unlock() the display automatically.    Note that for a NonReserved direct painter, you must call    allocatedRegion() after calling this function, since the allocated    region is only guaranteed to be correct after this function has    returned.    The regionChanged() function will not be called between startPainting()    and endPainting().    \sa endPainting(), flush()*/void QDirectPainter::startPainting(bool lockDisplay){    Q_UNUSED(lockDisplay);    Q_D(QDirectPainter);    d->surface->beginPaint(d->surface->region());}/*!    \preliminary    \since 4.2    Call this function when you are done updating the screen. It will    notify the hardware, if necessary, that your painting operations    have ended.*/void QDirectPainter::endPainting(){    Q_D(QDirectPainter);    d->surface->endPaint(d->surface->region());}/*!    \preliminary    \since 4.3    \overload    This function will automatically call flush() to flush the    \a region to the display before notifying the hardware, if    necessary, that painting operations have ended.*/void QDirectPainter::endPainting(const QRegion &region){    endPainting();    flush(region);}/*!    \preliminary    \since 4.3    Flushes the \a region onto the screen.*/void QDirectPainter::flush(const QRegion &region){    Q_D(QDirectPainter);    d->surface->flush(0, region, QPoint());}/*!    \since 4.2    Raises the reserved region to the top of the widget stack.    After this call the reserved region will be visually in front of    any overlapping widgets.    \sa lower(), requestedRegion()*/void QDirectPainter::raise(){    QWidget::qwsDisplay()->setAltitude(winId(),QWSChangeAltitudeCommand::Raise);}/*!    \since 4.2    Lowers the reserved region to the bottom of the widget stack.    After this call the reserved region will be visually behind (and    therefore obscured by) any overlapping widgets.    \sa raise(), requestedRegion()*/void QDirectPainter::lower(){    QWidget::qwsDisplay()->setAltitude(winId(),QWSChangeAltitudeCommand::Lower);}/*!    \fn QRegion QDirectPainter::reserveRegion(const QRegion &region)    Attempts to reserve the \a region and returns the region that is    actually reserved.    This function also releases the previously reserved region if    any. If not released explicitly, the region will be released on    application exit.    \sa reservedRegion(), {Static Allocation}    \obsolete    Construct a QDirectPainter using QDirectPainter::ReservedSynchronous instead.*/QRegion QDirectPainter::reserveRegion(const QRegion &reg){    if (!QDirectPainterPrivate::staticPainter)        QDirectPainterPrivate::staticPainter = new QDirectPainter(qApp, ReservedSynchronous);    QDirectPainter *dp = QDirectPainterPrivate::staticPainter;    dp->setRegion(reg);    return dp->allocatedRegion();}/*!    Returns a pointer to the beginning of the display memory.    Note that it is the application's responsibility to limit itself    to modifying only the reserved region.    Do not use this pointer if the current screen has subscreens,    query the screen driver instead: A pointer to the current screen    driver can always be retrieved using the static    QScreen::instance() function. Then use QScreen's \l    {QScreen::}{subScreenIndexAt()} and \l {QScreen::}{subScreens()}    functions to access the correct subscreen, and the subscreen's \l    {QScreen::}{base()} function to retrieve a pointer to the    framebuffer.    \sa requestedRegion(), allocatedRegion(), linestep()*/uchar* QDirectPainter::frameBuffer(){    QScreen *screen = getPrimaryScreen();    if (!screen)        return 0;    return screen->base();}/*!    \since 4.2    Returns the reserved region.    \sa reserveRegion(), frameBuffer()    \obsolete    Use allocatedRegion() instead.*/QRegion QDirectPainter::reservedRegion(){    return QDirectPainterPrivate::staticPainter        ? QDirectPainterPrivate::staticPainter->allocatedRegion() : QRegion();}/*!    Returns the bit depth of the display.    \sa screenHeight(), screenWidth()*/int QDirectPainter::screenDepth(){    QScreen *screen = getPrimaryScreen();    if (!screen)        return 0;    return screen->depth();}/*!    Returns the width of the display in pixels.    \sa screenHeight(), screenDepth()*/int QDirectPainter::screenWidth(){    QScreen *screen = getPrimaryScreen();    if (!screen)        return 0;    return screen->deviceWidth();}/*!    Returns the height of the display in pixels.    \sa screenWidth(), screenDepth()*/int QDirectPainter::screenHeight(){    QScreen *screen = getPrimaryScreen();    if (!screen)        return 0;    return screen->deviceHeight();}/*!    Returns the length (in bytes) of each scanline of the framebuffer.    \sa frameBuffer()*/int QDirectPainter::linestep(){    QScreen *screen = getPrimaryScreen();    if (!screen)        return 0;    return screen->linestep();}/*!  \warning This function is not yet implemented.  Locks access to the framebuffer.  Note that calling this function will prevent all other  applications from working until unlock() is called.  \sa unlock()*/void QDirectPainter::lock(){    //###    qDebug("QDirectPainter::lock() not implemented");}/*!  \warning This function is not yet implemented.  Unlocks the lock on the framebuffer (set using the lock()  function), allowing other applications to access the screen.  \sa lock() */void QDirectPainter::unlock(){    //###    qDebug("QDirectPainter::unlock() not implemented");}#endif //QT_NO_DIRECTPAINTER#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -