QAbstractGraphicsShapeItem Class
QAbstractGraphicsShapeItem 클래스는 모든 경로 항목에 대한 공통 기반을 제공합니다. 더 보기...
Header: | #include <QAbstractGraphicsShapeItem> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
상속합니다: | QGraphicsItem |
상속받습니다: | QGraphicsEllipseItem, QGraphicsPathItem, QGraphicsPolygonItem, QGraphicsRectItem, 그리고 QGraphicsSimpleTextItem |
공용 함수
QAbstractGraphicsShapeItem(QGraphicsItem *parent = nullptr) | |
virtual | ~QAbstractGraphicsShapeItem() |
QBrush | brush() const |
QPen | pen() const |
void | setBrush(const QBrush &brush) |
void | setPen(const QPen &pen) |
재구현된 공용 함수
virtual bool | isObscuredBy(const QGraphicsItem *item) const override |
virtual QPainterPath | opaqueArea() const override |
상세 설명
이 클래스는 자체적으로 항목을 완전히 구현하지 않습니다. 특히 QGraphicsItem 에서 상속된 boundingRect() 및 paint() 를 구현하지 않습니다.
이 항목을 서브 클래스화하여 항목의 펜과 브러시에 대한 간단한 기본 접근자 구현을 제공할 수 있습니다.
QGraphicsRectItem, QGraphicsEllipseItem, QGraphicsPathItem, QGraphicsPolygonItem, QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, 및 그래픽 뷰 프레임워크도참조하십시오 .
멤버 함수 문서
[explicit]
QAbstractGraphicsShapeItem::QAbstractGraphicsShapeItem(QGraphicsItem *parent = nullptr)
QGraphicsItem 의 생성자에 parent 을 전달합니다.
[virtual noexcept]
QAbstractGraphicsShapeItem::~QAbstractGraphicsShapeItem()
QAbstractGraphicsShapeItem 을 파괴합니다.
QBrush QAbstractGraphicsShapeItem::brush() const
항목의 브러시를 반환하거나 브러시가 설정되지 않은 경우 빈 브러시를 반환합니다.
setBrush()도 참조하세요 .
[override virtual]
bool QAbstractGraphicsShapeItem::isObscuredBy(const QGraphicsItem *item) const
재구현합니다: QGraphicsItem::isObscuredBy(const QGraphicsItem *item) const.
[override virtual]
QPainterPath QAbstractGraphicsShapeItem::opaqueArea() const
재구현합니다: QGraphicsItem::opaqueArea() const.
QPen QAbstractGraphicsShapeItem::pen() const
항목의 펜을 반환합니다. 펜이 설정되지 않은 경우 이 함수는 너비 1의 기본 검은색 실선 펜인 QPen()을 반환합니다.
setPen()도 참조하세요 .
void QAbstractGraphicsShapeItem::setBrush(const QBrush &brush)
항목의 브러시를 brush 로 설정합니다.
항목의 브러시는 항목을 채우는 데 사용됩니다.
QGradient 이 있는 브러시를 사용하는 경우 그라데이션은 항목의 좌표계를 기준으로 합니다.
brush()도 참조하세요 .
void QAbstractGraphicsShapeItem::setPen(const QPen &pen)
이 항목의 펜을 pen 로 설정합니다.
펜은 항목의 윤곽을 그리는 데 사용됩니다.
pen()도 참조하세요 .
© 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.