このページでは

Utils::ProgressIndicatorPainter Class

class Utils::ProgressIndicatorPainter

ProgressIndicatorPainter クラスは、ProgressIndicator クラスの描画バックエンドです。詳細...

Header: #include <ProgressIndicatorPainter>

パブリック関数

ProgressIndicatorPainter(Utils::ProgressIndicatorSize size)
Utils::ProgressIndicatorSize indicatorSize() const
void setIndicatorSize(Utils::ProgressIndicatorSize size)
void setUpdateCallback(const Utils::ProgressIndicatorPainter::UpdateCallback &cb)
QSize size() const
void startAnimation()
void stopAnimation()

詳細な説明

たとえば、QWidget を使用できない場所で進行状況インジケーターを表示したい場合など、このクラスを使用すると、QPaintDevice に直接、円形の無限にアニメーションする進行状況インジケーターを描画することができます。

メンバー関数のドキュメント

ProgressIndicatorPainter::ProgressIndicatorPainter(Utils::ProgressIndicatorSize size)

size インジケータ用の進行状況インジケータ・ペインターを構築します。

setUpdateCallbackも参照してください 。

Utils::ProgressIndicatorSize ProgressIndicatorPainter::indicatorSize() const

現在のインジケーターのサイズを返します。結果のピクセルサイズを取得するには、size を使用してください。

「setIndicatorSize」も参照してください 。

void ProgressIndicatorPainter::setIndicatorSize(Utils::ProgressIndicatorSize size)

進行状況インジケーターのサイズをsize に変更します。このクラスを使用するユーザーは、結果として生じるピクセルサイズの変更に合わせて、描画やレイアウトのコードを調整する必要があります。

indicatorSize およびsizeも参照してください 。

void ProgressIndicatorPainter::setUpdateCallback(const Utils::ProgressIndicatorPainter::UpdateCallback &cb)

アニメーションの進行に伴い、進行状況インジケーターの再描画が必要になるたびに呼び出されるコールバック `cb ` を設定します。このコールバックは引数を取らない `void` 関数であり、通常は、実際の描画を行うウィジェットに対して `QWidget::update ` を呼び出す必要があります。

QSize ProgressIndicatorPainter::size() const

プログレスインジケータのサイズを、デバイス非依存ピクセル単位で返します。

setIndicatorSize およびpaintも参照してください 。

void ProgressIndicatorPainter::startAnimation()

進行状況インジケーターのアニメーションを開始します。

setUpdateCallback およびstopAnimationも参照してください 。

void ProgressIndicatorPainter::stopAnimation()

進行状況インジケーターのアニメーションを停止します。

setUpdateCallback およびstartAnimationも参照してください 。

Copyright © The Qt Company Ltd. and other contributors. 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.