QBackingStore Class
QBackingStoreクラスは、QWindow 。さらに...
ヘッダー | #include <QBackingStore> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
パブリック関数
QBackingStore(QWindow *window) | |
~QBackingStore() | |
void | beginPaint(const QRegion ®ion) |
void | endPaint() |
void | flush(const QRegion ®ion, QWindow *window = nullptr, const QPoint &offset = QPoint()) |
QPlatformBackingStore * | handle() const |
bool | hasStaticContents() const |
QPaintDevice * | paintDevice() |
void | resize(const QSize &size) |
bool | scroll(const QRegion &area, int dx, int dy) |
void | setStaticContents(const QRegion ®ion) |
QSize | size() const |
QRegion | staticContents() const |
QWindow * | window() const |
詳細説明
QBackingStoreはQPainter 、RasterSurface型のQWindow 。QWindow にレンダリングするもう1つの方法は、QOpenGLContext で OpenGL を使用することです。
QBackingStoreはウィンドウ内容のバッファリングされた表現を含むため、ウィンドウ内容のサブ領域のみを更新するためにQPainter 、部分的な更新をサポートします。
QBackingStoreは、OpenGLアクセラレーションなしで、QWidget またはQGraphicsView UIスタックを使用する余分なオーバーヘッドなしで、QPainter を使用したいアプリケーションによって使用されるかもしれません。QBackingStoreの使用方法については、ラスターウィンドウの例を参照してください。
メンバー関数ドキュメント
[explicit]
QBackingStore::QBackingStore(QWindow *window)
与えられたトップレベルwindow に対して空のサーフェスを構築する。
[noexcept]
QBackingStore::~QBackingStore()
この表面を破壊する。
void QBackingStore::beginPaint(const QRegion ®ion)
指定されたregion で、バッキングストアの表面にペイントを開始する。
paintDevice() を使用してペイントを行う前に、この関数を呼び出す必要があります。
endPaint() およびpaintDevice()も参照 。
void QBackingStore::endPaint()
ペインティングを終了する。
この関数は、paintDevice() によるペインティングが終了した後に呼び出す必要がある。
beginPaint() およびpaintDevice()も参照 。
void QBackingStore::flush(const QRegion ®ion, QWindow *window = nullptr, const QPoint &offset = QPoint())
指定されたwindow から指定されたregion をスクリーンにフラッシュする。
window は、このバッキングストアが表すトップレベルウィンドウか、そのウィンドウの一時的でない子ウィンドウでなければなりません。nullptr
を渡すと、バッキングストアのトップレベル・ウィンドウの使用に戻ります。
window が子ウィンドウの場合、region は子ウィンドウの座標でなければならず、offset はバッキングストアのトップレベルウィンドウに対する子ウィンドウのオフセットでなければなりません。
この関数は、endPaint() でペイントを終了した後に呼び出す必要があります。
QPlatformBackingStore *QBackingStore::handle() const
QPlatformBackingStore実装へのポインタを返します。
bool QBackingStore::hasStaticContents() const
このウィンドウが静的コンテンツを持つかどうかを示すブール値を返します。
QPaintDevice *QBackingStore::paintDevice()
このサーフェスのペイントデバイスを返します。
警告 このデバイスは、beginPaint() とendPaint() を呼び出す間のみ有効です。返された値をキャッシュしてはいけません。
void QBackingStore::resize(const QSize &size)
ウィンドウ表面のサイズをsize に設定する。
size()も参照のこと 。
bool QBackingStore::scroll(const QRegion &area, int dx, int dy)
与えられたarea dx ピクセルを右に、dy ピクセルを下にスクロールします。dx とdy の両方が負であってもかまいません。
領域が正常にスクロールされた場合はtrue
を返し、そうでない場合は false を返します。
void QBackingStore::setStaticContents(const QRegion ®ion)
このウィンドウの静的コンテンツとしてregion を設定する。
staticContents()も参照のこと 。
QSize QBackingStore::size() const
ウィンドウ表面の現在のサイズを返します。
QRegion QBackingStore::staticContents() const
静的コンテンツを持つウィンドウの領域を表すQRegion を返します。
setStaticContents()も参照してください 。
QWindow *QBackingStore::window() const
このサーフェスに関連付けられたトップレベルウィンドウへのポインタを返します。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.