QGraphicsColorizeEffect Class

QGraphicsColorizeEffect 클래스는 컬러화 효과를 제공합니다. 더 보기...

Header: #include <QGraphicsColorizeEffect>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
상속합니다: QGraphicsEffect

속성

공용 기능

QGraphicsColorizeEffect(QObject *parent = nullptr)
virtual ~QGraphicsColorizeEffect()
QColor color() const
qreal strength() const

공용 슬롯

void setColor(const QColor &c)
void setStrength(qreal strength)

신호

void colorChanged(const QColor &color)
void strengthChanged(qreal strength)

재구현된 보호 기능

virtual void draw(QPainter *painter) override

상세 설명

컬러라이즈 효과는 소스를 color() 색조로 렌더링합니다. 색상은 setColor() 함수를 사용하여 수정할 수 있습니다.

기본적으로 색상은 하늘색(QColor(0, 0, 192))입니다.

QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsOpacityEffect참조하세요 .

속성 문서

color : QColor

이 속성은 효과의 색상을 보유합니다.

기본적으로 색상은 하늘색(QColor(0, 0, 192))입니다.

기능에 액세스합니다:

QColor color() const
void setColor(const QColor &c)

알림 신호:

void colorChanged(const QColor &color)

strength : qreal

이 속성은 효과의 강도를 유지합니다.

기본적으로 강도는 1.0입니다. 강도 0.0은 효과가 없는 것과 같고 1.0은 전체 색상을 의미합니다.

기능에 액세스합니다:

qreal strength() const
void setStrength(qreal strength)

알림 신호:

void strengthChanged(qreal strength)

멤버 함수 문서

QGraphicsColorizeEffect::QGraphicsColorizeEffect(QObject *parent = nullptr)

새로운 QGraphicsColorizeEffect 인스턴스를 구축합니다. parent 파라미터는 QGraphicsEffect 의 생성자에 전달됩니다.

[virtual noexcept] QGraphicsColorizeEffect::~QGraphicsColorizeEffect()

효과를 파괴합니다.

[signal] void QGraphicsColorizeEffect::colorChanged(const QColor &color)

이 신호는 효과의 색상이 변경될 때마다 전송됩니다. color 매개변수는 효과의 새 색상을 보유합니다.

참고: 프로퍼티 알림 신호 color.

[override virtual protected] void QGraphicsColorizeEffect::draw(QPainter *painter)

다시 구현합니다: QGraphicsEffect::draw(QPainter *페인터).

[signal] void QGraphicsColorizeEffect::strengthChanged(qreal strength)

이 신호는 setStrength()가 컬러라이즈 강도 속성을 변경할 때마다 발생합니다. strength 에는 컬러라이즈 효과의 새 강도 값이 포함됩니다.

참고: strength 속성에 대한 알림 신호입니다.

© 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.