42 #ifndef QGRAPHICSWIDGET_H 43 #define QGRAPHICSWIDGET_H 45 #include <QtGui/qfont.h> 46 #include <QtGui/qgraphicslayoutitem.h> 47 #include <QtGui/qgraphicsitem.h> 48 #include <QtGui/qpalette.h> 65 #if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW 82 Qt::WindowFlags windowFlags;
85 bool autoFillBackground;
96 void unsetLayoutDirection();
99 void setStyle(
QStyle *style);
102 void setFont(const
QFont &font);
105 void setPalette(const
QPalette &palette);
107 bool autoFillBackground() const;
108 void setAutoFillBackground(
bool enabled);
110 void resize(const
QSizeF &size);
123 void unsetWindowFrameMargins();
124 QRectF windowFrameGeometry()
const;
125 QRectF windowFrameRect()
const;
128 Qt::WindowFlags windowFlags()
const;
130 void setWindowFlags(Qt::WindowFlags wFlags);
131 bool isActiveWindow()
const;
132 void setWindowTitle(
const QString &title);
141 #ifndef QT_NO_SHORTCUT 143 void releaseShortcut(
int id);
144 void setShortcutEnabled(
int id,
bool enabled =
true);
145 void setShortcutAutoRepeat(
int id,
bool enabled =
true);
150 void addAction(
QAction *action);
154 void removeAction(
QAction *action);
172 void dumpFocusChain();
176 #ifdef Q_NO_USING_KEYWORD 183 void geometryChanged();
184 void layoutChanged();
190 virtual void initStyleOption(
QStyleOption *option)
const;
201 virtual bool windowFrameEvent(
QEvent *e);
212 virtual bool focusNextPrevChild(
bool next);
218 virtual void polishEvent();
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.
The QApplication class manages the GUI application's control flow and main settings.
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...
virtual bool sceneEvent(QEvent *event)
This virtual function receives events to this item.
The QFontMetrics class provides font metrics information.
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
QScopedPointer< QGraphicsItemPrivate > d_ptr
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
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.
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 ...
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framewor...
GraphicsItemChange
This enum describes the state changes that are notified by QGraphicsItem::itemChange().
The QString class provides a Unicode character string.
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework...
The QSizeF class defines the size of a two-dimensional object using floating point precision...
virtual QPainterPath shape() const
Returns the shape of this item as a QPainterPath in local coordinates.
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
virtual void focusInEvent(QFocusEvent *event)
This event handler, for event event, can be reimplemented to receive focus in events for this item...
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
This event handler, for event event, can be reimplemented to receive hover leave events for this item...
friend class QGraphicsWidget
static const QRectF boundingRect(const QPointF *points, int pointCount)
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const =0
This pure virtual function returns the size hint for which of the QGraphicsLayoutItem, using the width or height of constraint to constrain the output.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
virtual void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const
This virtual function provides the left, top, right and bottom contents margins for this QGraphicsLay...
The QStyleOption class stores the parameters used by QStyle functions.
The QHideEvent class provides an event which is sent after a widget is hidden.
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
This event handler, for event event, can be reimplemented to receive hover move events for this item...
virtual void updateGeometry()
This virtual function discards any cached size hint information.
static const char * data(const QByteArray &arr)
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts...
The QShowEvent class provides an event that is sent when a widget is shown.
#define Q_DECLARE_PRIVATE_D(Dptr, Class)
The QKeySequence class encapsulates a key sequence as used by shortcuts.
The QFont class specifies a font used for drawing text.
#define Q_INTERFACES(x)
This macro tells Qt which interfaces the class implements.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI...
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
const QObjectList & children() const
Returns a list of child objects.
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)=0
This function, which is usually called by QGraphicsView, paints the contents of an item in local coor...
The QGraphicsObject class provides a base class for all graphics items that require signals...
The QEvent class is the base class of all event classes.
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
virtual void focusOutEvent(QFocusEvent *event)
This event handler, for event event, can be reimplemented to receive focus out events for this item...
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem...
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...
The QList class is a template class that provides lists.
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
Qt::LayoutDirection direction
The QPalette class contains color groups for each widget state.