Qt:Документация 4.3.2/qabstractgraphicsshapeitem

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QAbstractGraphicsShapeItem Class Reference
[модуль QtGui ]

The QAbstractGraphicsShapeItem class provides a common base for all path items. More...

 #include <QAbstractGraphicsShapeItem>

Inherits QGraphicsItem.

Inherited by QGraphicsEllipseItem, QGraphicsPathItem, QGraphicsPolygonItem, QGraphicsRectItem, and QGraphicsSimpleTextItem.

This class was introduced in Qt 4.2.

[править] Открытые функции

  • 114 открытых функций унаследованных от QGraphicsItem

[править] Дополнительные унаследованные члены


[править] Подробное описание

The QAbstractGraphicsShapeItem class provides a common base for all path items.

This class does not fully implement an item by itself; in particular, it does not implement boundingRect() and paint(), which are inherited by QGraphicsItem.

You can subclass this item to provide a simple base implementation of accessors for the item's pen and brush.

See also QGraphicsRectItem, QGraphicsEllipseItem, QGraphicsPathItem, QGraphicsPolygonItem, QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, and The Graphics View Framework.


[править] Описание функций-членов

[править]
QAbstractGraphicsShapeItem::QAbstractGraphicsShapeItem ( QGraphicsItem * parent = 0 )

Constructs a QAbstractGraphicsShapeItem. parent is passed to QGraphicsItem's constructor.

[править]
QAbstractGraphicsShapeItem::~QAbstractGraphicsShapeItem ()

Destroys a QAbstractGraphicsShapeItem.

[править]
QBrush QAbstractGraphicsShapeItem::brush () const

Returns the item's brush, or an empty brush if no brush has been set.

See also setBrush().

[править]
QPen QAbstractGraphicsShapeItem::pen () const

Returns the item's pen. If no pen has been set, this function returns QPen(), a default black solid line pen with 0 width.

See also setPen().

[править]
void QAbstractGraphicsShapeItem::setBrush ( const QBrush & brush )

Sets the item's brush to brush.

The item's brush is used to fill the item.

If you use a brush with a QGradient, the gradient is relative to the item's coordinate system.

See also brush().

[править]
void QAbstractGraphicsShapeItem::setPen ( const QPen & pen )

Sets the pen for this item to pen.

The pen is used to draw the item's outline.

See also pen().


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2