44 #ifndef QT_NO_GRAPHICSVIEW 54 #include <private/qaction_p.h> 56 #include <private/qapplication_p.h> 57 #include <private/qgraphicsscene_p.h> 58 #ifndef QT_NO_SHORTCUT 59 #include <private/qshortcutmap_p.h> 61 #include <QtCore/qmutex.h> 62 #include <QtGui/qapplication.h> 63 #include <QtGui/qgraphicsview.h> 64 #include <QtGui/qgraphicsproxywidget.h> 65 #include <QtGui/qpalette.h> 66 #include <QtGui/qstyleoption.h> 182 d->init(parent, wFlags);
197 d->init(parent, wFlags);
215 return styles.value(widget, 0);
224 styles.remove(widget);
238 Q_D(QGraphicsWidget);
241 for (
int i = 0; i <
d->actions.size(); ++i) {
253 d->focusPrev->d_func()->focusNext =
d->focusNext;
254 d->focusNext->d_func()->focusPrev =
d->focusPrev;
270 QGraphicsWidget *
widget =
static_cast<QGraphicsWidget *
>(item);
280 widgetStyles()->setStyleForWidget(
this, 0);
376 if (newGeom == d->
geom) {
377 goto relayoutChildrenAndReturn;
386 if (newGeom == d->
geom) {
387 goto relayoutChildrenAndReturn;
400 bool moved = oldPos !=
pos();
404 event.setOldPos(oldPos);
405 event.setNewPos(
pos());
411 goto relayoutChildrenAndReturn;
417 bool resized = newGeom.
size() != oldSize;
431 relayoutChildrenAndReturn:
434 if (!lay->isActivated()) {
516 if (!
d->margins && left == 0 && top == 0 && right == 0 && bottom == 0)
519 if (left ==
d->margins[
d->Left]
520 && top ==
d->margins[
d->Top]
521 && right ==
d->margins[
d->Right]
522 && bottom ==
d->margins[
d->Bottom])
525 d->margins[
d->Left] =
left;
526 d->margins[
d->Top] = top;
528 d->margins[
d->Bottom] = bottom;
549 if (left || top || right || bottom)
552 *left =
d->margins[
d->Left];
554 *top =
d->margins[
d->Top];
556 *right =
d->margins[
d->Right];
558 *bottom =
d->margins[
d->Bottom];
575 if (!
d->windowFrameMargins && left == 0 && top == 0 && right == 0 && bottom == 0)
577 d->ensureWindowFrameMargins();
579 d->windowFrameMargins[
d->Left] == left
580 &&
d->windowFrameMargins[
d->Top] == top
581 &&
d->windowFrameMargins[
d->Right] == right
582 &&
d->windowFrameMargins[
d->Bottom] == bottom;
583 if (
d->setWindowFrameMargins && unchanged)
587 d->windowFrameMargins[
d->Left] =
left;
588 d->windowFrameMargins[
d->Top] = top;
589 d->windowFrameMargins[
d->Right] =
right;
590 d->windowFrameMargins[
d->Bottom] = bottom;
591 d->setWindowFrameMargins =
true;
604 if (left || top || right || bottom)
605 d->ensureWindowFrameMargins();
607 *left =
d->windowFrameMargins[
d->Left];
609 *top =
d->windowFrameMargins[
d->Top];
611 *right =
d->windowFrameMargins[
d->Right];
613 *bottom =
d->windowFrameMargins[
d->Bottom];
627 d->initStyleOptionTitleBar(&bar);
630 qreal titleBarHeight =
d->titleBarHeight(bar);
635 d->setWindowFrameMargins =
false;
647 return d->windowFrameMargins
649 d->windowFrameMargins[
d->Right],
d->windowFrameMargins[
d->Bottom])
661 return d->windowFrameMargins
662 ?
rect().
adjusted(-
d->windowFrameMargins[
d->Left], -
d->windowFrameMargins[
d->Top],
663 d->windowFrameMargins[
d->Right],
d->windowFrameMargins[
d->Bottom])
723 if (w->isActiveWindow())
774 marginSize =
QSizeF(
d->margins[
d->Left] +
d->margins[
d->Right],
775 d->margins[
d->Top] +
d->margins[
d->Bottom]);
777 sh =
d->layout->effectiveSizeHint(which, constraint - marginSize);
791 qWarning(
"QGraphicsWidget::sizeHint(): Don't know how to handle the value of 'which'");
864 d->setLayout_helper(l);
870 if (oldParent && oldParent !=
this) {
871 qWarning(
"QGraphicsWidget::setLayout: Attempting to set a layout on %s" 872 " \"%s\", when the layout already has a parent",
879 l->d_func()->reparentChildItems(
this);
937 d->setLayoutDirection_helper(direction);
943 d->resolveLayoutDirection();
956 if (
QStyle *
style = widgetStyles()->styleForWidget(
this))
978 widgetStyles()->setStyleForWidget(
this, style);
1022 QFont naturalFont =
d->naturalWidgetFont();
1024 d->setFont_helper(resolvedFont);
1065 QPalette naturalPalette =
d->naturalWidgetPalette();
1067 d->setPalette_helper(resolvedPalette);
1092 return d->autoFillBackground;
1097 if (
d->autoFillBackground != enabled) {
1117 if (parentItem && parentItem->
isLayout()) {
1137 ++
d->refCountInvokeRelayout;
1201 d->setGeometryFromSetPos();
1228 QGraphicsItem *child = qVariantValue<QGraphicsItem *>(value);
1230 static_cast<QGraphicsWidget *>(child)->d_func()->resolveLayoutDirection();
1294 switch (event->
type()) {
1296 d->windowFrameMousePressEvent(static_cast<QGraphicsSceneMouseEvent *>(event));
1299 d->ensureWindowData();
1301 d->windowFrameMouseMoveEvent(static_cast<QGraphicsSceneMouseEvent *>(event));
1306 d->windowFrameMouseReleaseEvent(static_cast<QGraphicsSceneMouseEvent *>(event));
1309 d->windowFrameHoverMoveEvent(static_cast<QGraphicsSceneHoverEvent *>(event));
1312 d->windowFrameHoverLeaveEvent(static_cast<QGraphicsSceneHoverEvent *>(event));
1317 return event->isAccepted();
1356 const qreal cornerMargin = 20;
1358 const qreal windowFrameWidth =
d->windowFrameMargins
1359 ?
d->windowFrameMargins[
d->Left] : 0;
1362 if (x <= left + cornerMargin) {
1363 if (y <= top + windowFrameWidth || (x <= left + windowFrameWidth && y <= top + cornerMargin)) {
1365 }
else if (y >= bottom - windowFrameWidth || (x <= left + windowFrameWidth && y >= bottom - windowFrameWidth)) {
1367 }
else if (x <= left + windowFrameWidth) {
1370 }
else if (x >= right - cornerMargin) {
1371 if (y <= top + windowFrameWidth || (x >= right - windowFrameWidth && y <= top + cornerMargin)) {
1373 }
else if (y >= bottom - windowFrameWidth || (x >= right - windowFrameWidth && y >= bottom - windowFrameWidth)) {
1375 }
else if (x >= right - windowFrameWidth) {
1378 }
else if (y <= top + windowFrameWidth) {
1380 }
else if (y >= bottom - windowFrameWidth) {
1386 ?
d->windowFrameMargins[
d->Top] : 0);
1437 d->layout->widgetEvent(event);
1440 switch (event->
type()) {
1442 moveEvent(static_cast<QGraphicsSceneMoveEvent *>(event));
1445 resizeEvent(static_cast<QGraphicsSceneResizeEvent *>(event));
1448 showEvent(static_cast<QShowEvent *>(event));
1451 hideEvent(static_cast<QHideEvent *>(event));
1457 d->updateFont(
d->font);
1495 d->ensureWindowData();
1496 if (
d->hasDecoration() &&
d->windowData->grabbedSection !=
Qt::NoSection)
1502 if (
d->hasDecoration()) {
1529 switch (event->
type()) {
1534 d->layout->invalidate();
1543 d->resolveFont(
d->inheritedFontResolveMask);
1544 d->resolvePalette(
d->inheritedPaletteResolveMask);
1601 if (
d->scene->focusNextPrevChild(next))
1804 return d->windowFlags;
1809 if (
d->windowFlags == wFlags)
1813 d->adjustWindowFlags(&wFlags);
1814 d->windowFlags = wFlags;
1815 if (!
d->setWindowFrameMargins)
1824 d->scene->d_func()->removePopup(
this);
1826 d->scene->d_func()->addPopup(
this);
1829 if (
d->scene &&
d->scene->d_func()->allItemsIgnoreHoverEvents &&
d->hasDecoration()) {
1830 d->scene->d_func()->allItemsIgnoreHoverEvents =
false;
1831 d->scene->d_func()->enableMouseTrackingOnViews();
1865 d->ensureWindowData();
1866 d->windowData->windowTitle = title;
1871 return d->windowData ?
d->windowData->windowTitle :
QString();
1900 return d->focusPolicy;
1905 if (
d->focusPolicy == policy)
1907 d->focusPolicy = policy;
1923 if (
d->subFocusItem &&
d->subFocusItem->d_ptr->isWidget)
1928 #ifndef QT_NO_SHORTCUT 1965 return qApp->d_func()->shortcutMap.addShortcut(
this, sequence, context);
1992 qApp->d_func()->shortcutMap.removeShortcut(
id,
this, 0);
2016 qApp->d_func()->shortcutMap.setShortcutEnabled(enabled,
id,
this, 0);
2034 qApp->d_func()->shortcutMap.setShortcutAutoRepeat(enabled,
id,
this, 0);
2038 #ifndef QT_NO_ACTION 2073 for (
int i = 0; i < actions.
count(); ++i)
2095 qWarning(
"QWidget::insertAction: Attempt to insert null action");
2100 int index =
d->actions.indexOf(action);
2102 d->actions.removeAt(index);
2104 int pos =
d->actions.indexOf(before);
2107 pos =
d->actions.size();
2109 d->actions.insert(pos, action);
2136 for (
int i = 0; i < actions.
count(); ++i)
2160 if (
d->actions.removeAll(action)) {
2210 if (!first && !second) {
2211 qWarning(
"QGraphicsWidget::setTabOrder(0, 0) is undefined");
2214 if ((first && second) && first->
scene() != second->
scene()) {
2215 qWarning(
"QGraphicsWidget::setTabOrder: scenes %p and %p are different",
2220 if (!scene && (!first || !second)) {
2221 qWarning(
"QGraphicsWidget::setTabOrder: assigning tab order from/to the" 2222 " scene requires the item to be in a scene.");
2241 if (firstFocusNext == second) {
2249 firstFocusNext->d_func()->focusPrev = second;
2250 first->d_func()->focusNext = second;
2251 second->d_func()->focusNext = firstFocusNext;
2252 second->d_func()->focusPrev = first;
2253 secondFocusPrev->d_func()->focusNext = secondFocusNext;
2254 secondFocusNext->d_func()->focusPrev = secondFocusPrev;
2256 Q_ASSERT(first->d_func()->focusNext->d_func()->focusPrev == first);
2257 Q_ASSERT(first->d_func()->focusPrev->d_func()->focusNext == first);
2259 Q_ASSERT(second->d_func()->focusNext->d_func()->focusPrev == second);
2260 Q_ASSERT(second->d_func()->focusPrev->d_func()->focusNext == second);
2279 d->setAttribute(attribute, on);
2291 return d->testAttribute(attribute);
2329 const bool embeddedWidgetFillsOwnBackground = proxy && proxy->
widget();
2332 if (fillBackground && !embeddedWidgetFillsOwnBackground)
2341 bar.QStyleOption::operator=(*option);
2342 d->initStyleOptionTitleBar(&bar);
2343 d->ensureWindowData();
2344 if (
d->windowData->buttonMouseOver)
2348 if (
d->windowData->buttonSunken)
2360 const QSize pixmapSize = windowFrameRect.
size();
2361 if (pixmapSize.
width() <= 0 || pixmapSize.
height() <= 0)
2377 if (fillBackground) {
2378 if (embeddedWidgetFillsOwnBackground) {
2381 windowFrameBackground.
addRect(windowFrameRect);
2384 windowFrameBackground.
addRect(
rect().translated(-styleOrigin).adjusted(0.5, 0.5, -0.5, -0.5));
2393 int height = (int)
d->titleBarHeight(bar);
2396 bar.
rect.
adjust(frameWidth, frameWidth, -frameWidth, 0);
2406 frameOptions.QStyleOption::operator=(*option);
2480 #ifdef Q_NO_USING_KEYWORD 2496 void QGraphicsWidget::dumpFocusChain()
2498 qDebug() <<
"=========== Dumping focus chain ==============";
2504 qWarning(
"Found a focus chain that is not circular, (next == 0)");
2509 qWarning(
"Already visited this node. However, I expected to dump until I found myself.");
2513 next = next->d_func()->focusNext;
2514 }
while (next !=
this);
2520 #endif //QT_NO_GRAPHICSVIEW static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QVariant class acts like a union for the most common Qt data types.
The QPainter class performs low-level painting on widgets and other paint devices.
QSizeF effectiveSizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
Returns the effective size hint for this QGraphicsLayoutItem.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items...
virtual void setGeometry(const QRectF &rect)
This virtual function sets the geometry of the QGraphicsLayoutItem to rect, which is in parent coordi...
bool hasFocus() const
Returns true if this item is active, and it or its focus proxy has keyboard input focus; otherwise...
qreal right() const
Returns the x-coordinate of the rectangle's right edge.
virtual bool sceneEvent(QEvent *event)
This virtual function receives events to this item.
QRect adjusted(int x1, int y1, int x2, int y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
void setHeight(int h)
Sets the height of the rectangle to the given height.
void setNewSize(const QSizeF &size)
void setHeight(qreal h)
Sets the height of the rectangle to the given height.
The QFontMetrics class provides font metrics information.
QGraphicsWidget * parentWidget() const
Returns a pointer to the item's parent widget.
#define QT_END_NAMESPACE
This macro expands to.
The QMutex class provides access serialization between threads.
bool isWindow() const
Returns true if the item is a QGraphicsWidget window, otherwise returns false.
QScopedPointer< QGraphicsLayoutItemPrivate > d_ptr
QPointer< QWidget > widget
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
QList< QGraphicsItem * > childItems() const
Returns a list of this item's children.
bool isPopup
Use windowType() == Qt::Popup instead.
T * data() const
Returns the value of the pointer referenced by this object.
QStyle::State state
the style flags that are used when drawing the control
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
static void postEvent(QObject *receiver, QEvent *event)
Adds the event event, with the object receiver as the receiver of the event, to an event queue and re...
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const =0
Returns the value of the given pixel metric.
qreal width() const
Returns the width.
void clearFocus()
Takes keyboard input focus from the item.
void setClipRect(const QRectF &, Qt::ClipOperation op=Qt::ReplaceClip)
Enables clipping, and sets the clip region to the given rectangle using the given clip operation...
The QPointF class defines a point in the plane using floating point precision.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
qreal height() const
Returns the height.
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
This virtual function is called by QGraphicsItem to notify custom items that some part of the item's ...
qreal left() const
Returns the x-coordinate of the rectangle's left edge.
The QStyleOptionTitleBar class is used to describe the parameters for drawing a title bar...
bool isVisible() const
Returns true if the item is visible; otherwise, false is returned.
void restore()
Restores the current painter state (pops a saved state off the stack).
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const =0
Returns an integer representing the specified style hint for the given widget described by the provid...
QPointF topLeft() const
Returns the position of the rectangle's top-left corner.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
bool toBool() const
Returns the variant as a bool if the variant has type() Bool.
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framewor...
QPointF pos() const
Returns the position of the item in parent coordinates.
int count(const T &t) const
Returns the number of occurrences of value in the list.
GraphicsItemChange
This enum describes the state changes that are notified by QGraphicsItem::itemChange().
void setParentLayoutItem(QGraphicsLayoutItem *parent)
Sets the parent of this QGraphicsLayoutItem to parent.
static QStyle * style()
Returns the application's style object.
The QActionEvent class provides an event that is generated when a QAction is added, removed, or changed.
void setOldSize(const QSizeF &size)
The QString class provides a Unicode character string.
QFontMetrics fontMetrics
the font metrics that should be used when drawing text in the control
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework...
T * qobject_cast(QObject *object)
bool isValid() const
Returns true if both the width and height is equal to or greater than 0; otherwise returns false...
bool isEnabled() const
Returns true if the item is enabled; otherwise, false is returned.
void update(const QRectF &rect=QRectF())
Schedules a redraw of the area covered by rect in this item.
void setPos(const QPointF &pos)
Sets the position of the item to pos, which is in parent coordinates.
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
The QSizeF class defines the size of a two-dimensional object using floating point precision...
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
void save()
Saves the current painter state (pushes the state onto a stack).
qreal x() const
Returns the x-coordinate of this point.
virtual void invalidate()
Clears any cached geometry and size hint information in the layout, and posts a LayoutRequest event t...
static QFont font()
Returns the default application font.
Q_CORE_EXPORT void qDebug(const char *,...)
bool contains(const QPointF &p) const
Returns true if the given point is inside or on the edge of the rectangle; otherwise returns false...
void setCurrentColorGroup(ColorGroup cg)
Set the palette's current color group to cg.
QFont resolve(const QFont &) const
Returns a new QFont that has attributes copied from other that have not been previously set on this f...
int lineWidth
the line width for drawing the frame
int width() const
Returns the width.
QRectF geometry() const
Returns the item's geometry (e.
void append(const T &t)
Inserts value at the end of the list.
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint...
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
bool isUnderMouse() const
Returns true if this item is currently under the mouse cursor in one of the views; otherwise...
void fillPath(const QPainterPath &path, const QBrush &brush)
Fills the given path using the given brush.
bool contains(const T &value) const
The QStyleOption class stores the parameters used by QStyle functions.
QStyle * style() const
Returns the scene's style, or the same as QApplication::style() if the scene has not been explicitly ...
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
QVariant data(int key) const
Returns this item's custom data for the key key as a QVariant.
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
QSize size() const
Returns the size of the rectangle.
const T & at(int i) const
Returns the item at index position i in the list.
QList< QGraphicsWidget * > graphicsWidgets
The QHideEvent class provides an event which is sent after a widget is hidden.
void adjust(int x1, int y1, int x2, int y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
virtual void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const =0
Draws the given primitive element with the provided painter using the style options specified by opti...
void moveTopLeft(const QPointF &p)
Moves the rectangle, leaving the top-left corner at the given position.
virtual void updateGeometry()
This virtual function discards any cached size hint information.
Q_CORE_EXPORT void qWarning(const char *,...)
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
void addRect(const QRectF &rect)
Adds the given rectangle to this path as a closed subpath.
bool isActive() const
Returns true if this item is active; otherwise returns false.
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts...
virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget=0) const =0
Draws the given control using the provided painter with the style options specified by option...
static void fillBackground(QPainter *p, const QRectF &rect, QBrush brush, const QPointF &origin, QRectF gradientRect=QRectF())
QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
The QShowEvent class provides an event that is sent when a widget is shown.
static bool instantInvalidatePropagation()
bool isEmpty() const
Returns true if the key sequence is empty; otherwise returns false.
QRect toRect() const
Returns a QRect based on the values of this rectangle.
void setSize(const QSizeF &s)
Sets the size of the rectangle to the given size.
bool isLayout() const
Returns true if this QGraphicsLayoutItem is a layout (e.g., is inherited by an object that arranges o...
QPalette palette
the palette that should be used when painting the control
QGraphicsWidget * tabFocusFirst
The QStyleHintReturnMask class provides style hints that return a QRegion.
QGraphicsItem * parentItem() const
Returns a pointer to this item's parent item.
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
The QKeySequence class encapsulates a key sequence as used by shortcuts.
void setClipRegion(const QRegion &, Qt::ClipOperation op=Qt::ReplaceClip)
Sets the clip region to the given region using the specified clip operation.
qreal y() const
This convenience function is equivalent to calling pos().
void prepareGeometryChange()
Prepares the item for a geometry change.
The QFont class specifies a font used for drawing text.
QSizeF boundedTo(const QSizeF &) const
Returns a size holding the minimum width and height of this size and the given otherSize.
QSizeF expandedTo(const QSizeF &) const
Returns a size holding the maximum width and height of this size and the given otherSize.
QGraphicsLayoutItem * parentLayoutItem() const
Returns the parent of this QGraphicsLayoutItem, or 0 if there is no parent, or if the parent does not...
int midLineWidth
the mid-line width for drawing the frame
QObject * parent() const
Returns a pointer to the parent object.
qreal x() const
This convenience function is equivalent to calling pos().
The QPoint class defines a point in the plane using integer precision.
void hide()
Hides the item.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI...
QGraphicsWidget * window() const
Returns the item's window, or 0 if this item does not have a window.
QString objectName() const
int height() const
Returns the height.
Qt::LayoutDirection direction
the text layout direction that should be used when drawing text in the control
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
bool acceptsHoverEvents() const
Call acceptHoverEvents() instead.
The QRect class defines a rectangle in the plane using integer precision.
bool isWidget() const
Returns true if this item is a widget (i.
virtual bool contains(const QPointF &point) const
Returns true if this item contains point, which is in local coordinates; otherwise, false is returned.
QSizeF size() const
Returns the size of the rectangle.
qreal y() const
Returns the y-coordinate of this point.
The QPixmap class is an off-screen image representation that can be used as a paint device...
qreal top() const
Returns the y-coordinate of the rectangle's top edge.
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device...
bool enabled
whether the item is enabled or not
The QSize class defines the size of a two-dimensional object using integer point precision.
void setFont(const QFont &f)
Sets the painter's font to the given font.
QGraphicsScene * scene() const
Returns the current scene for the item, or 0 if the item is not stored in a scene.
qreal bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
QRegion region
the region for style hints that return a QRegion
QRectF exposedRect
the exposed rectangle, in item coordinates
The QGraphicsObject class provides a base class for all graphics items that require signals...
void setFlag(GraphicsItemFlag flag, bool enabled=true)
If enabled is true, the item flag flag is enabled; otherwise, it is disabled.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
#define qPrintable(string)
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem...
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
void deleteLater()
Schedules this object for deletion.
QRect rect
the area that should be used for various calculations and painting
The QCloseEvent class contains parameters that describe a close event.
The QFocusEvent class contains event parameters for widget focus events.
The QAction class provides an abstract user interface action that can be inserted into widgets...
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
The QMap class is a template class that provides a skip-list-based dictionary.
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
The QList class is a template class that provides lists.
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
QPalette resolve(const QPalette &) const
Returns a new QPalette that has attributes copied from other.
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
Qt::LayoutDirection direction
void setFocus(Qt::FocusReason focusReason=Qt::OtherFocusReason)
Gives keyboard input focus to this item.
void translate(const QPointF &offset)
Translates the coordinate system by the given offset; i.e.
The QPalette class contains color groups for each widget state.