Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QGraphicsWidget class is the base class for all widget items in a QGraphicsScene. More...
Public Member Functions | |
QGraphicsWidget (IQGraphicsItem parent=null, Qt.WindowType wFlags=0) | |
| |
override void | CreateProxy () |
new System.Collections.Generic.List < QAction > | Actions () |
| |
new void | AddAction (QAction action) |
| |
new void | AddActions (System.Collections.Generic.List< QAction > actions) |
| |
new void | AdjustSize () |
| |
override QRectF | BoundingRect () |
| |
new System.Collections.Generic.List < QObject > | Children () |
new bool | Close () |
| |
override bool | OnEvent (QEvent @event) |
| |
new QGraphicsWidget | FocusWidget () |
| |
virtual void | GetContentsMargins (ref double left, ref double top, ref double right, ref double bottom) |
| |
new void | GetWindowFrameMargins (ref double left, ref double top, ref double right, ref double bottom) |
| |
new int | GrabShortcut (QKeySequence sequence, Qt.ShortcutContext context=Qt.ShortcutContext.WindowShortcut) |
| |
new void | InsertAction (QAction before, QAction action) |
| |
new void | InsertActions (QAction before, System.Collections.Generic.List< QAction > actions) |
| |
new bool | IsActiveWindow () |
| |
override void | Paint (QPainter painter, QStyleOptionGraphicsItem option, QWidget widget=null) |
| |
virtual void | PaintWindowFrame (QPainter painter, QStyleOptionGraphicsItem option, QWidget widget=null) |
| |
new QRectF | Rect () |
| |
new void | ReleaseShortcut (int id) |
| |
new void | RemoveAction (QAction action) |
| |
new void | Resize (double w, double h) |
new void | SetAttribute (Qt.WidgetAttribute attribute, bool on=true) |
| |
new void | SetContentsMargins (double left, double top, double right, double bottom) |
| |
new void | SetGeometry (double x, double y, double w, double h) |
new void | SetShortcutAutoRepeat (int id, bool enabled=true) |
| |
new void | SetShortcutEnabled (int id, bool enabled=true) |
| |
new void | SetWindowFlags (Qt.WindowType wFlags) |
new void | SetWindowFrameMargins (double left, double top, double right, double bottom) |
| |
override QPainterPath | Shape () |
| |
new bool | TestAttribute (Qt.WidgetAttribute attribute) |
| |
override int | Type () |
| |
new void | UnsetLayoutDirection () |
new void | UnsetWindowFrameMargins () |
| |
virtual void | UpdateGeometry () |
| |
new Qt.WindowType | windowFlags () |
new QRectF | WindowFrameGeometry () |
| |
new QRectF | WindowFrameRect () |
| |
new Qt.WindowType | WindowType () |
| |
new void | Dispose () |
new QRectF | ContentsRect () |
new QSizeF | EffectiveSizeHint (Qt.SizeHint which) |
new QSizeF | EffectiveSizeHint (Qt.SizeHint which, QSizeF constraint) |
new IQGraphicsItem | GraphicsItem () |
new bool | IsLayout () |
new bool | OwnedByLayout () |
new void | SetMaximumSize (double w, double h) |
new void | SetMinimumSize (double w, double h) |
new void | SetPreferredSize (double w, double h) |
new void | SetSizePolicy (QSizePolicy.Policy hPolicy, QSizePolicy.Policy vPolicy, QSizePolicy.ControlType controlType=QSizePolicy.ControlType.DefaultType) |
Public Member Functions inherited from QtGui.QGraphicsObject | |
QGraphicsObject (IQGraphicsItem parent=null) | |
| |
new System.Collections.Generic.List < QObject > | Children () |
new void | GrabGesture (Qt.GestureType type, Qt.GestureFlag flags=0) |
| |
new void | UngrabGesture (Qt.GestureType type) |
| |
new void | Dispose () |
virtual void | Advance (int phase) |
new QRegion | BoundingRegion (QTransform itemToDeviceTransform) |
new System.Collections.Generic.List < IQGraphicsItem > | ChildItems () |
new QRectF | ChildrenBoundingRect () |
new void | ClearFocus () |
new QPainterPath | ClipPath () |
virtual bool | CollidesWithItem (IQGraphicsItem other, Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape) |
virtual bool | CollidesWithPath (QPainterPath path, Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape) |
new System.Collections.Generic.List < IQGraphicsItem > | CollidingItems (Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape) |
new IQGraphicsItem | CommonAncestorItem (IQGraphicsItem other) |
virtual bool | Contains (QPointF point) |
new object | Data (int key) |
new QTransform | DeviceTransform (QTransform viewportTransform) |
new double | EffectiveOpacity () |
new void | EnsureVisible () |
new void | EnsureVisible (QRectF rect, int xmargin=50, int ymargin=50) |
new void | EnsureVisible (double x, double y, double w, double h, int xmargin=50, int ymargin=50) |
new IQGraphicsItem | FocusItem () |
new IQGraphicsItem | FocusScopeItem () |
new void | GrabKeyboard () |
new void | GrabMouse () |
new bool | HasCursor () |
new bool | HasFocus () |
new void | Hide () |
new void | InstallSceneEventFilter (IQGraphicsItem filterItem) |
new bool | IsActive () |
new bool | IsAncestorOf (IQGraphicsItem child) |
new bool | IsBlockedByModalPanel (IQGraphicsItem blockingPanel=null) |
new bool | IsClipped () |
new bool | IsEnabled () |
new bool | IsObscured () |
new bool | IsObscured (QRectF rect) |
new bool | IsObscured (double x, double y, double w, double h) |
virtual bool | IsObscuredBy (IQGraphicsItem item) |
new bool | IsPanel () |
new bool | IsSelected () |
new bool | IsUnderMouse () |
new bool | IsVisible () |
new bool | IsVisibleTo (IQGraphicsItem parent) |
new bool | IsWidget () |
new bool | IsWindow () |
new QTransform | ItemTransform (IQGraphicsItem other) |
new QTransform | ItemTransform (IQGraphicsItem other, ref bool ok) |
new QPointF | MapFromItem (IQGraphicsItem item, QPointF point) |
new QPolygonF | MapFromItem (IQGraphicsItem item, QRectF rect) |
new QPolygonF | MapFromItem (IQGraphicsItem item, QPolygonF polygon) |
new QPainterPath | MapFromItem (IQGraphicsItem item, QPainterPath path) |
new QPointF | MapFromItem (IQGraphicsItem item, double x, double y) |
new QPolygonF | MapFromItem (IQGraphicsItem item, double x, double y, double w, double h) |
new QPointF | MapFromParent (QPointF point) |
new QPolygonF | MapFromParent (QRectF rect) |
new QPolygonF | MapFromParent (QPolygonF polygon) |
new QPainterPath | MapFromParent (QPainterPath path) |
new QPointF | MapFromParent (double x, double y) |
new QPolygonF | MapFromParent (double x, double y, double w, double h) |
new QPointF | MapFromScene (QPointF point) |
new QPolygonF | MapFromScene (QRectF rect) |
new QPolygonF | MapFromScene (QPolygonF polygon) |
new QPainterPath | MapFromScene (QPainterPath path) |
new QPointF | MapFromScene (double x, double y) |
new QPolygonF | MapFromScene (double x, double y, double w, double h) |
new QRectF | MapRectFromItem (IQGraphicsItem item, QRectF rect) |
new QRectF | MapRectFromItem (IQGraphicsItem item, double x, double y, double w, double h) |
new QRectF | MapRectFromParent (QRectF rect) |
new QRectF | MapRectFromParent (double x, double y, double w, double h) |
new QRectF | MapRectFromScene (QRectF rect) |
new QRectF | MapRectFromScene (double x, double y, double w, double h) |
new QRectF | MapRectToItem (IQGraphicsItem item, QRectF rect) |
new QRectF | MapRectToItem (IQGraphicsItem item, double x, double y, double w, double h) |
new QRectF | MapRectToParent (QRectF rect) |
new QRectF | MapRectToParent (double x, double y, double w, double h) |
new QRectF | MapRectToScene (QRectF rect) |
new QRectF | MapRectToScene (double x, double y, double w, double h) |
new QPointF | MapToItem (IQGraphicsItem item, QPointF point) |
new QPolygonF | MapToItem (IQGraphicsItem item, QRectF rect) |
new QPolygonF | MapToItem (IQGraphicsItem item, QPolygonF polygon) |
new QPainterPath | MapToItem (IQGraphicsItem item, QPainterPath path) |
new QPointF | MapToItem (IQGraphicsItem item, double x, double y) |
new QPolygonF | MapToItem (IQGraphicsItem item, double x, double y, double w, double h) |
new QPointF | MapToParent (QPointF point) |
new QPolygonF | MapToParent (QRectF rect) |
new QPolygonF | MapToParent (QPolygonF polygon) |
new QPainterPath | MapToParent (QPainterPath path) |
new QPointF | MapToParent (double x, double y) |
new QPolygonF | MapToParent (double x, double y, double w, double h) |
new QPointF | MapToScene (QPointF point) |
new QPolygonF | MapToScene (QRectF rect) |
new QPolygonF | MapToScene (QPolygonF polygon) |
new QPainterPath | MapToScene (QPainterPath path) |
new QPointF | MapToScene (double x, double y) |
new QPolygonF | MapToScene (double x, double y, double w, double h) |
new void | MoveBy (double dx, double dy) |
virtual QPainterPath | OpaqueArea () |
new IQGraphicsItem | Panel () |
new QGraphicsObject | ParentObject () |
new QGraphicsWidget | ParentWidget () |
new void | RemoveSceneEventFilter (IQGraphicsItem filterItem) |
new void | ResetMatrix () |
new void | ResetTransform () |
new void | Rotate (double angle) |
new double | Scale () |
new void | Scale (double sx, double sy) |
new QGraphicsScene | Scene () |
new QRectF | SceneBoundingRect () |
new QMatrix | SceneMatrix () |
new QPointF | ScenePos () |
new QTransform | SceneTransform () |
new void | Scroll (double dx, double dy) |
new void | Scroll (double dx, double dy, QRectF rect) |
new void | SetActive (bool active) |
new void | SetCacheMode (QGraphicsItem.CacheMode mode, QSize cacheSize) |
new void | SetData (int key, object value) |
new void | SetEnabled (bool enabled) |
new void | SetFlag (QGraphicsItem.GraphicsItemFlag flag, bool enabled=true) |
new void | SetFocus (Qt.FocusReason focusReason=Qt.FocusReason.OtherFocusReason) |
new void | SetMatrix (QMatrix matrix, bool combine=false) |
new void | SetPos (double x, double y) |
new void | SetScale (double scale) |
new void | SetSelected (bool selected) |
new void | SetTransform (QTransform matrix, bool combine=false) |
new void | SetTransformOriginPoint (double ax, double ay) |
new void | SetVisible (bool visible) |
new void | Shear (double sh, double sv) |
new void | Show () |
new void | StackBefore (IQGraphicsItem sibling) |
new QGraphicsObject | ToGraphicsObject () |
new IQGraphicsItem | TopLevelItem () |
new QGraphicsWidget | TopLevelWidget () |
new void | Translate (double dx, double dy) |
new void | UngrabKeyboard () |
new void | UngrabMouse () |
new void | UnsetCursor () |
new void | Update () |
new void | Update (QRectF rect) |
new void | Update (double x, double y, double width, double height) |
new QGraphicsWidget | Window () |
Public Member Functions inherited from QtCore.QObject | |
QObject (QObject parent=null) | |
| |
new bool | BlockSignals (bool b) |
| |
new System.Collections.Generic.List < QObject > | Children () |
| |
new bool | Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
new void | DeleteLater () |
| |
new bool | Disconnect (QObject receiver, string member=null) |
| |
new bool | Disconnect (string signal=null, QObject receiver=null, string member=null) |
| |
new void | DumpObjectInfo () |
| |
new void | DumpObjectTree () |
| |
new System.Collections.Generic.List < QByteArray > | DynamicPropertyNames () |
| |
virtual bool | OnEvent (QEvent arg1) |
| |
virtual bool | EventFilter (QObject arg1, QEvent arg2) |
| |
new bool | Inherits (string classname) |
| |
new void | InstallEventFilter (QObject arg1) |
| |
new bool | IsWidgetType () |
| |
new void | KillTimer (int id) |
| |
new object | Property (string name) |
| |
new void | RemoveEventFilter (QObject arg1) |
| |
new bool | SetProperty (string name, object value) |
| |
new void | SetUserData (uint id, QObjectUserData data) |
new bool | SignalsBlocked () |
| |
new int | StartTimer (int interval) |
| |
new QObjectUserData | UserData (uint id) |
new void | Dispose () |
Public Member Functions inherited from QtCore.Qt | |
delegate QTextStream | FuncQTextStreamQTextStream (QTextStream qTextStream) |
delegate string | FuncStringQByteArray (QByteArray qByteArray) |
delegate QByteArray | FuncQByteArrayString (string @string) |
delegate void | ActionQtMsgTypeString (QtMsgType qtMsgType, string @string) |
delegate QObject | FuncQObject () |
Public Member Functions inherited from QtGui.IQGraphicsItem | |
void | Advance (int phase) |
QRectF | BoundingRect () |
new QRegion | BoundingRegion (QTransform itemToDeviceTransform) |
new System.Collections.Generic.List < IQGraphicsItem > | ChildItems () |
new System.Collections.Generic.List < IQGraphicsItem > | Children () |
new QRectF | ChildrenBoundingRect () |
new void | ClearFocus () |
new QPainterPath | ClipPath () |
bool | CollidesWithItem (IQGraphicsItem other, Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape) |
bool | CollidesWithPath (QPainterPath path, Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape) |
new System.Collections.Generic.List < IQGraphicsItem > | CollidingItems (Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape) |
new IQGraphicsItem | CommonAncestorItem (IQGraphicsItem other) |
bool | Contains (QPointF point) |
new object | Data (int key) |
new QTransform | DeviceTransform (QTransform viewportTransform) |
new double | EffectiveOpacity () |
new void | EnsureVisible () |
new void | EnsureVisible (QRectF rect, int xmargin=50, int ymargin=50) |
new void | EnsureVisible (double x, double y, double w, double h, int xmargin=50, int ymargin=50) |
new IQGraphicsItem | FocusItem () |
new IQGraphicsItem | FocusScopeItem () |
new void | GrabKeyboard () |
new void | GrabMouse () |
new bool | HasCursor () |
new bool | HasFocus () |
new void | Hide () |
new void | InstallSceneEventFilter (IQGraphicsItem filterItem) |
new bool | IsActive () |
new bool | IsAncestorOf (IQGraphicsItem child) |
new bool | IsBlockedByModalPanel (IQGraphicsItem blockingPanel=null) |
new bool | IsClipped () |
new bool | IsEnabled () |
new bool | IsObscured () |
new bool | IsObscured (QRectF rect) |
new bool | IsObscured (double x, double y, double w, double h) |
bool | IsObscuredBy (IQGraphicsItem item) |
new bool | IsPanel () |
new bool | IsSelected () |
new bool | IsUnderMouse () |
new bool | IsVisible () |
new bool | IsVisibleTo (IQGraphicsItem parent) |
new bool | IsWidget () |
new bool | IsWindow () |
new QTransform | ItemTransform (IQGraphicsItem other) |
new QTransform | ItemTransform (IQGraphicsItem other, ref bool ok) |
new QPolygonF | MapFromItem (IQGraphicsItem item, QRectF rect) |
new QPainterPath | MapFromItem (IQGraphicsItem item, QPainterPath path) |
new QPointF | MapFromItem (IQGraphicsItem item, QPointF point) |
new QPolygonF | MapFromItem (IQGraphicsItem item, QPolygonF polygon) |
new QPointF | MapFromItem (IQGraphicsItem item, double x, double y) |
new QPolygonF | MapFromItem (IQGraphicsItem item, double x, double y, double w, double h) |
new QPolygonF | MapFromParent (QPolygonF polygon) |
new QPolygonF | MapFromParent (QRectF rect) |
new QPainterPath | MapFromParent (QPainterPath path) |
new QPointF | MapFromParent (QPointF point) |
new QPointF | MapFromParent (double x, double y) |
new QPolygonF | MapFromParent (double x, double y, double w, double h) |
new QPolygonF | MapFromScene (QPolygonF polygon) |
new QPolygonF | MapFromScene (QRectF rect) |
new QPainterPath | MapFromScene (QPainterPath path) |
new QPointF | MapFromScene (QPointF point) |
new QPointF | MapFromScene (double x, double y) |
new QPolygonF | MapFromScene (double x, double y, double w, double h) |
new QRectF | MapRectFromItem (IQGraphicsItem item, QRectF rect) |
new QRectF | MapRectFromItem (IQGraphicsItem item, double x, double y, double w, double h) |
new QRectF | MapRectFromParent (QRectF rect) |
new QRectF | MapRectFromParent (double x, double y, double w, double h) |
new QRectF | MapRectFromScene (QRectF rect) |
new QRectF | MapRectFromScene (double x, double y, double w, double h) |
new QRectF | MapRectToItem (IQGraphicsItem item, QRectF rect) |
new QRectF | MapRectToItem (IQGraphicsItem item, double x, double y, double w, double h) |
new QRectF | MapRectToParent (QRectF rect) |
new QRectF | MapRectToParent (double x, double y, double w, double h) |
new QRectF | MapRectToScene (QRectF rect) |
new QRectF | MapRectToScene (double x, double y, double w, double h) |
new QPainterPath | MapToItem (IQGraphicsItem item, QPainterPath path) |
new QPolygonF | MapToItem (IQGraphicsItem item, QRectF rect) |
new QPolygonF | MapToItem (IQGraphicsItem item, QPolygonF polygon) |
new QPointF | MapToItem (IQGraphicsItem item, QPointF point) |
new QPointF | MapToItem (IQGraphicsItem item, double x, double y) |
new QPolygonF | MapToItem (IQGraphicsItem item, double x, double y, double w, double h) |
new QPolygonF | MapToParent (QPolygonF polygon) |
new QPainterPath | MapToParent (QPainterPath path) |
new QPointF | MapToParent (QPointF point) |
new QPolygonF | MapToParent (QRectF rect) |
new QPointF | MapToParent (double x, double y) |
new QPolygonF | MapToParent (double x, double y, double w, double h) |
new QPolygonF | MapToScene (QPolygonF polygon) |
new QPointF | MapToScene (QPointF point) |
new QPainterPath | MapToScene (QPainterPath path) |
new QPolygonF | MapToScene (QRectF rect) |
new QPointF | MapToScene (double x, double y) |
new QPolygonF | MapToScene (double x, double y, double w, double h) |
new void | MoveBy (double dx, double dy) |
QPainterPath | OpaqueArea () |
void | Paint (QPainter painter, QStyleOptionGraphicsItem option, QWidget widget=null) |
new IQGraphicsItem | Panel () |
new QGraphicsObject | ParentObject () |
new QGraphicsWidget | ParentWidget () |
new void | RemoveSceneEventFilter (IQGraphicsItem filterItem) |
new void | ResetMatrix () |
new void | ResetTransform () |
new void | Rotate (double angle) |
new double | Scale () |
new void | Scale (double sx, double sy) |
new QGraphicsScene | Scene () |
new QRectF | SceneBoundingRect () |
new QMatrix | SceneMatrix () |
new QPointF | ScenePos () |
new QTransform | SceneTransform () |
new void | Scroll (double dx, double dy) |
new void | Scroll (double dx, double dy, QRectF rect) |
new void | SetActive (bool active) |
new void | SetCacheMode (QGraphicsItem.CacheMode mode, QSize cacheSize) |
new void | SetData (int key, object value) |
new void | SetEnabled (bool enabled) |
new void | SetFlag (QGraphicsItem.GraphicsItemFlag flag, bool enabled=true) |
new void | SetFocus (Qt.FocusReason focusReason=Qt.FocusReason.OtherFocusReason) |
new void | SetMatrix (QMatrix matrix, bool combine=false) |
new void | SetPos (double x, double y) |
new void | SetScale (double scale) |
new void | SetSelected (bool selected) |
new void | SetTransform (QTransform matrix, bool combine=false) |
new void | SetTransformOriginPoint (double ax, double ay) |
new void | SetVisible (bool visible) |
QPainterPath | Shape () |
new void | Shear (double sh, double sv) |
new void | Show () |
new void | StackBefore (IQGraphicsItem sibling) |
new QGraphicsObject | ToGraphicsObject () |
new IQGraphicsItem | TopLevelItem () |
new QGraphicsWidget | TopLevelWidget () |
new void | Translate (double dx, double dy) |
int | Type () |
new void | UngrabKeyboard () |
new void | UngrabMouse () |
new void | UnsetCursor () |
new void | Update () |
new void | Update (QRectF rect) |
new void | Update (double x, double y, double width, double height) |
new QGraphicsWidget | Window () |
Public Member Functions inherited from QtGui.IQGraphicsLayoutItem | |
new QRectF | ContentsRect () |
new QSizeF | EffectiveSizeHint (Qt.SizeHint which) |
new QSizeF | EffectiveSizeHint (Qt.SizeHint which, QSizeF constraint) |
void | GetContentsMargins (ref double left, ref double top, ref double right, ref double bottom) |
new IQGraphicsItem | GraphicsItem () |
new bool | IsLayout () |
new bool | OwnedByLayout () |
new void | SetMaximumSize (double w, double h) |
new void | SetMinimumSize (double w, double h) |
new void | SetPreferredSize (double w, double h) |
new void | SetSizePolicy (QSizePolicy.Policy hPolicy, QSizePolicy.Policy vPolicy, QSizePolicy.ControlType controlType=QSizePolicy.ControlType.DefaultType) |
void | UpdateGeometry () |
Static Public Member Functions | |
static void | SetTabOrder (QGraphicsWidget first, QGraphicsWidget second) |
| |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Static Public Member Functions inherited from QtGui.QGraphicsObject | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Static Public Member Functions inherited from QtCore.QObject | |
static bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection) |
| |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
| |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
| |
static uint | RegisterUserData () |
static string | Tr (string s, string c=null) |
| |
static string | Tr (string s, string c, int n) |
| |
static string | TrUtf8 (string s, string c=null) |
| |
static string | TrUtf8 (string s, string c, int n) |
| |
Static Public Member Functions inherited from QtCore.Qt | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream arg1, QSizeF arg2) |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream arg1, QPoint arg2) |
static QDataStream | Write (QDataStream arg1, QLineF arg2) |
static QDataStream | Write (QDataStream arg1, QPointF arg2) |
static QDataStream | Write (QDataStream arg1, QChar arg2) |
static QDataStream | Write (QDataStream arg1, QByteArray arg2) |
static QDataStream | Write (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Write (QDataStream arg1, QRectF arg2) |
static QDataStream | Write (QDataStream arg1, QDateTime arg2) |
static QDataStream | Write (QDataStream arg1, QUrl arg2) |
static QDataStream | Write (QDataStream arg1, QTime arg2) |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream arg1, QBitArray arg2) |
static QDataStream | Write (QDataStream arg1, QUuid arg2) |
static QDataStream | Write (QDataStream arg1, QLine arg2) |
static QDataStream | Write (QDataStream arg1, QDate arg2) |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
static QDataStream | Write (QDataStream arg1, QRect arg2) |
static QDataStream | Write (QDataStream arg1, QSize arg2) |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
static QDataStream | Read (QDataStream arg1, QChar arg2) |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream arg1, QRect arg2) |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream arg1, QDate arg2) |
static QDataStream | Read (QDataStream arg1, QUrl arg2) |
static QDataStream | Read (QDataStream arg1, QUuid arg2) |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream arg1, QLineF arg2) |
static QDataStream | Read (QDataStream arg1, QRectF arg2) |
static QDataStream | Read (QDataStream arg1, QPointF arg2) |
static QDataStream | Read (QDataStream arg1, QLine arg2) |
static QDataStream | Read (QDataStream arg1, QBitArray arg2) |
static QDataStream | Read (QDataStream arg1, QSize arg2) |
static QDataStream | Read (QDataStream arg1, QDateTime arg2) |
static QDataStream | Read (QDataStream arg1, QTime arg2) |
static QDataStream | Read (QDataStream arg1, QPoint arg2) |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream arg1, QByteArray arg2) |
static QDataStream | Read (QDataStream arg1, QSizeF arg2) |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
static double | qAcos (double v) |
static void | qAddPostRoutine (System.Action arg1) |
static string | qAppName () |
static double | qAsin (double v) |
static double | qAtan (double v) |
static double | qAtan2 (double x, double y) |
static void | qBadAlloc () |
static int | qCeil (double v) |
static ushort | qChecksum (string s, uint len) |
static QByteArray | qCompress (QByteArray data) |
static QByteArray | qCompress (QByteArray data, int compressionLevel=-1) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
static double | qCos (double v) |
static double | qExp (double v) |
static double | qFabs (double v) |
static double | qFastCos (double x) |
static double | qFastSin (double x) |
static string | qFlagLocation (string method) |
static int | qFloor (double v) |
static bool | qFuzzyCompare (double p1, double p2) |
static bool | qFuzzyCompare (float p1, float p2) |
static bool | qFuzzyIsNull (double d) |
static bool | qFuzzyIsNull (float f) |
static uint | qHash (QBitArray key) |
static uint | qHash (QChar key) |
static uint | qHash (QStringRef key) |
static uint | qHash (QUrl url) |
static uint | qHash (QPersistentModelIndex index) |
static uint | qHash (QByteArray key) |
static uint | qHash (QModelIndex index) |
static uint | qHash (uint key) |
static uint | qHash (sbyte key) |
static uint | qHash (byte key) |
static uint | qHash (short key) |
static uint | qHash (NativeLong key) |
static uint | qHash (ushort key) |
static uint | qHash (long key) |
static uint | qHash (ulong key) |
static uint | qHash (int key) |
static uint | qHash (string key) |
static uint | qHash (NativeULong key) |
static double | qInf () |
static Qt.ActionQtMsgTypeString | qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1) |
static int | qIntCast (float f) |
static int | qIntCast (double f) |
static bool | qIsFinite (double d) |
static bool | qIsFinite (float f) |
static bool | qIsInf (float f) |
static bool | qIsInf (double d) |
static bool | qIsNaN (float f) |
static bool | qIsNaN (double d) |
static bool | qIsNull (float f) |
static bool | qIsNull (double d) |
static double | qLn (double v) |
static double | qPow (double x, double y) |
static double | qQNaN () |
static void | qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
static void | qRemovePostRoutine (System.Action arg1) |
static int | qRound (double d) |
static long | qRound64 (double d) |
static double | qSNaN () |
static bool | qSharedBuild () |
static double | qSin (double v) |
static double | qSqrt (double v) |
static bool | qStringComparisonHelper (QStringRef s1, string s2) |
static double | qTan (double v) |
static QByteArray | qUncompress (QByteArray data) |
static QByteArray | qUncompress (Pointer< byte > data, int nbytes) |
static string | qVersion () |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
static bool | Qputenv (string varName, QByteArray value) |
static int | Qrand () |
static void | Qsrand (uint seed) |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
static Pointer< sbyte > | Qstrdup (string arg1) |
static int | Qstricmp (string arg1, string arg2) |
static uint | Qstrlen (string str) |
static int | Qstrncmp (string str1, string str2, uint len) |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
static int | Qstrnicmp (string arg1, string arg2, uint len) |
static uint | Qstrnlen (string str, uint maxlen) |
static string | QtTrId (string id, int n=-1) |
Properties | |
Slot | GeometryChanged |
| |
Slot | LayoutChanged |
virtual QRectF | Geometry [get, set] |
new QStyle | Style [get, set] |
| |
new double | MaximumHeight [get, set] |
new QSizeF | MaximumSize [get, set] |
new double | MaximumWidth [get, set] |
new double | MinimumHeight [get, set] |
new QSizeF | MinimumSize [get, set] |
new double | MinimumWidth [get, set] |
new IQGraphicsLayoutItem | ParentLayoutItem [get, set] |
new double | PreferredHeight [get, set] |
new QSizeF | PreferredSize [get, set] |
new double | PreferredWidth [get, set] |
new QSizePolicy | SizePolicy [get, set] |
new QPalette | Palette [get, set] |
| |
new QFont | Font [get, set] |
| |
new Qt.LayoutDirection | LayoutDirection [get, set] |
| |
new QSizeF | Size [get, set] |
| |
new Qt.FocusPolicy | FocusPolicy [get, set] |
| |
new Qt.WindowType | WindowFlags [get, set] |
| |
new string | WindowTitle [get, set] |
| |
new bool | AutoFillBackground [get, set] |
| |
new QGraphicsLayout | Layout [get, set] |
static new QMetaObject | StaticMetaObject [get] |
new IQGraphicsWidgetSignals | Emit [get] |
Properties inherited from QtGui.QGraphicsObject | |
Slot | ParentChanged |
| |
Slot | OpacityChanged |
| |
Slot | VisibleChanged |
| |
Slot | EnabledChanged |
| |
Slot | XChanged |
Slot | YChanged |
Slot | ZChanged |
Slot | RotationChanged |
| |
Slot | ScaleChanged |
| |
Slot | ChildrenChanged |
Slot | WidthChanged |
Slot | HeightChanged |
new bool | AcceptDrops [get, set] |
new bool | AcceptHoverEvents [get, set] |
new bool | AcceptTouchEvents [get, set] |
new Qt.MouseButton | AcceptedMouseButtons [get, set] |
new bool | AcceptsHoverEvents [get, set] |
new double | BoundingRegionGranularity [get, set] |
new QGraphicsItem.CacheMode | cacheMode [get, set] |
new QCursor | Cursor [get, set] |
new bool | FiltersChildEvents [get, set] |
new QGraphicsItem.GraphicsItemFlag | Flags [get, set] |
new IQGraphicsItem | FocusProxy [get, set] |
new QGraphicsEffect | GraphicsEffect [get, set] |
new QGraphicsItemGroup | Group [get, set] |
new bool | HandlesChildEvents [get, set] |
new Qt.InputMethodHint | InputMethodHints [get, set] |
new double | Opacity [get, set] |
new QGraphicsItem.PanelModality | panelModality [get, set] |
new IQGraphicsItem | ParentItem [get, set] |
new QPointF | Pos [get, set] |
new double | Rotation [get, set] |
new string | ToolTip [get, set] |
new QPointF | TransformOriginPoint [get, set] |
new System.Collections.Generic.List < QGraphicsTransform > | Transformations [get, set] |
new double | X [get, set] |
new double | Y [get, set] |
new double | zValue [get, set] |
new QMatrix | Matrix [get] |
new QTransform | Transform [get] |
new QGraphicsObject | Parent [get, set] |
new double | Z [get, set] |
new QGraphicsEffect | Effect [get, set] |
new double | Width [get, set] |
new double | Height [get, set] |
static new QMetaObject | StaticMetaObject [get] |
new IQGraphicsObjectSignals | Emit [get] |
Properties inherited from QtCore.QObject | |
virtual EventHandler < QEventArgs< QChildEvent > > | ChildEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | CustomEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | Event |
| |
virtual EventHandler < QEventArgs< QTimerEvent > > | TimerEvent |
| |
Slot< QObject > | DestroyedQObject |
Slot | Destroyed |
| |
new QObject | Parent [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
new string | ObjectName [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
| |
static new QMetaObject | StaticQtMetaObject [get] |
new IQObjectSignals | Emit [get] |
Properties inherited from QtGui.IQGraphicsItem | |
System.Boolean | AcceptDrops [get, set] |
System.Boolean | AcceptHoverEvents [get, set] |
System.Boolean | AcceptTouchEvents [get, set] |
Qt.MouseButton | AcceptedMouseButtons [get, set] |
System.Boolean | AcceptsHoverEvents [get, set] |
System.Double | BoundingRegionGranularity [get, set] |
QGraphicsItem.CacheMode | cacheMode [get, set] |
QCursor | Cursor [get, set] |
System.Boolean | FiltersChildEvents [get, set] |
QGraphicsItem.GraphicsItemFlag | Flags [get, set] |
IQGraphicsItem | FocusProxy [get, set] |
QGraphicsEffect | GraphicsEffect [get, set] |
QGraphicsItemGroup | Group [get, set] |
System.Boolean | HandlesChildEvents [get, set] |
Qt.InputMethodHint | InputMethodHints [get, set] |
System.Double | Opacity [get, set] |
QGraphicsItem.PanelModality | panelModality [get, set] |
IQGraphicsItem | ParentItem [get, set] |
QPointF | Pos [get, set] |
System.Double | Rotation [get, set] |
System.String | ToolTip [get, set] |
QPointF | TransformOriginPoint [get, set] |
System.Collections.Generic.List < QGraphicsTransform > | Transformations [get, set] |
System.Double | X [get, set] |
System.Double | Y [get, set] |
System.Double | zValue [get, set] |
QMatrix | Matrix [get] |
QTransform | Transform [get] |
Properties inherited from QtGui.IQGraphicsLayoutItem | |
QRectF | Geometry [get, set] |
System.Double | MaximumHeight [get, set] |
QSizeF | MaximumSize [get, set] |
System.Double | MaximumWidth [get, set] |
System.Double | MinimumHeight [get, set] |
QSizeF | MinimumSize [get, set] |
System.Double | MinimumWidth [get, set] |
IQGraphicsLayoutItem | ParentLayoutItem [get, set] |
System.Double | PreferredHeight [get, set] |
QSizeF | PreferredSize [get, set] |
System.Double | PreferredWidth [get, set] |
QSizePolicy | SizePolicy [get, set] |
The QGraphicsWidget class is the base class for all widget items in a QGraphicsScene.
QGraphicsWidget is an extended base item that provides extra functionality over QGraphicsItem. It is similar to QWidget in many ways:
Provides a palette, a font and a style().
Has a defined geometry().
Supports layouts with setLayout() and layout().
Supports shortcuts and actions with grabShortcut() and insertAction()
Unlike QGraphicsItem, QGraphicsWidget is not an abstract class; you can create instances of a QGraphicsWidget without having to subclass it. This approach is useful for widgets that only serve the purpose of organizing child widgets into a layout.
QGraphicsWidget can be used as a base item for your own custom item if you require advanced input focus handling, e.g., tab focus and activation, or layouts.
Since QGraphicsWidget resembles QWidget and has similar API, it is easier to port a widget from QWidget to QGraphicsWidget, instead of QGraphicsItem.
Note: QWidget-based widgets can be directly embedded into a QGraphicsScene using QGraphicsProxyWidget.
Noticeable differences between QGraphicsWidget and QWidget are:
QGraphicsWidgetQWidget
Coordinates and geometry are defined with qreals (doubles or floats, depending on the platform). QWidget uses integer geometry (QPoint, QRect).
The widget is already visible by default; you do not have to call show() to display the widget. QWidget is hidden by default until you call show().
A subset of widget attributes are supported. All widget attributes are supported.
A top-level item's style defaults to QGraphicsScene::style A top-level widget's style defaults to QApplication::style
Graphics View provides a custom drag and drop framework, different from QWidget. Standard drag and drop framework.
Widget items do not support modality. Full modality support.
QGraphicsWidget supports a subset of Qt's widget attributes, (Qt::WidgetAttribute), as shown in the table below. Any attributes not listed in this table are unsupported, or otherwise unused.
Widget AttributeUsage
Qt::WA_SetLayoutDirection Set by setLayoutDirection(), cleared by unsetLayoutDirection(). You can test this attribute to check if the widget has been explicitly assigned a layoutDirection. If the attribute is not set, the layoutDirection() is inherited.
Qt::WA_RightToLeft Toggled by setLayoutDirection(). Inherited from the parent/scene. If set, the widget's layout will order horizontally arranged widgets from right to left.
Qt::WA_SetStyle Set and cleared by setStyle(). If this attribute is set, the widget has been explicitly assigned a style. If it is unset, the widget will use the scene's or the application's style.
Qt::WA_Resized Set by setGeometry() and resize().
Qt::WA_SetPalette Set by setPalette().
Qt::WA_SetFont Set by setFont().
Qt::WA_WindowPropagation Enables propagation to window widgets.
Although QGraphicsWidget inherits from both QObject and QGraphicsItem, you should use the functions provided by QGraphicsItem, not QObject, to manage the relationships between parent and child items. These functions control the stacking order of items as well as their ownership.
Note: The QObject::parent() should always return 0 for QGraphicsWidgets, but this policy is not strictly defined.
See also QGraphicsProxyWidget, QGraphicsItem, and Widgets and Layouts.
|
protected |
QtGui.QGraphicsWidget.QGraphicsWidget | ( | IQGraphicsItem | parent = null , |
Qt.WindowType | wFlags = 0 |
||
) |
Constructs a QGraphicsWidget instance. The optional parent argument is passed to QGraphicsItem's constructor. The optional wFlags argument specifies the widget's window flags (e.g., whether the widget should be a window, a tool, a popup, etc).
new System.Collections.Generic.List<QAction> QtGui.QGraphicsWidget.Actions | ( | ) |
Returns the (possibly empty) list of this widget's actions.
This function was introduced in Qt 4.5.
See also insertAction(), removeAction(), QWidget::actions(), QAction::associatedWidgets(), and QAction::associatedGraphicsWidgets().
new void QtGui.QGraphicsWidget.AddAction | ( | QAction | action | ) |
Appends the action action to this widget's list of actions.
All QGraphicsWidgets have a list of QActions, however they can be represented graphically in many different ways. The default use of the QAction list (as returned by actions()) is to create a context QMenu.
A QGraphicsWidget should only have one of each action and adding an action it already has will not cause the same action to be in the widget twice.
This function was introduced in Qt 4.5.
See also removeAction(), insertAction(), actions(), and QWidget::addAction().
new void QtGui.QGraphicsWidget.AddActions | ( | System.Collections.Generic.List< QAction > | actions | ) |
Appends the actions actions to this widget's list of actions.
This function was introduced in Qt 4.5.
See also removeAction(), QMenu, addAction(), and QWidget::addActions().
new void QtGui.QGraphicsWidget.AdjustSize | ( | ) |
Adjusts the size of the widget to its effective preferred size hint.
This function is called implicitly when the item is shown for the first time.
See also effectiveSizeHint() and Qt::MinimumSize.
|
virtual |
Reimplemented from QGraphicsItem::boundingRect().
Implements QtGui.QGraphicsObject.
new System.Collections.Generic.List<QObject> QtGui.QGraphicsWidget.Children | ( | ) |
new bool QtGui.QGraphicsWidget.Close | ( | ) |
Call this function to close the widget.
Returns true if the widget was closed; otherwise returns false. This slot will first send a QCloseEvent to the widget, which may or may not accept the event. If the event was ignored, nothing happens. If the event was accepted, it will hide() the widget.
If the widget has the Qt::WA_DeleteOnClose attribute set it will be deleted.
new QRectF QtGui.QGraphicsWidget.ContentsRect | ( | ) |
|
virtual |
Reimplemented from QtGui.QGraphicsObject.
new void QtGui.QGraphicsWidget.Dispose | ( | ) |
new QSizeF QtGui.QGraphicsWidget.EffectiveSizeHint | ( | Qt.SizeHint | which | ) |
new QSizeF QtGui.QGraphicsWidget.EffectiveSizeHint | ( | Qt.SizeHint | which, |
QSizeF | constraint | ||
) |
|
protectedvirtual |
Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns true if it can find a new widget; returns false otherwise. If next is true, this function searches forward; if next is false, it searches backward.
Sometimes, you will want to reimplement this function to provide special focus handling for your widget and its subwidgets. For example, a web browser might reimplement it to move its current active link forward or backward, and call the base implementation only when it reaches the last or first link on the page.
Child widgets call focusNextPrevChild() on their parent widgets, but only the window that contains the child widgets decides where to redirect focus. By reimplementing this function for an object, you gain control of focus traversal for all child widgets.
See also focusPolicy().
Reimplemented in QtGui.QGraphicsProxyWidget.
new QGraphicsWidget QtGui.QGraphicsWidget.FocusWidget | ( | ) |
If this widget, a child or descendant of this widget currently has input focus, this function will return a pointer to that widget. If no descendant widget has input focus, 0 is returned.
See also QGraphicsItem::focusItem() and QWidget::focusWidget().
|
virtual |
Reimplemented from QGraphicsLayoutItem::getContentsMargins().
Gets the widget's contents margins. The margins are stored in left, top, right and bottom, as pointers to qreals. Each argument can be omitted by passing 0.
See also setContentsMargins().
new void QtGui.QGraphicsWidget.GetWindowFrameMargins | ( | ref double | left, |
ref double | top, | ||
ref double | right, | ||
ref double | bottom | ||
) |
Gets the widget's window frame margins. The margins are stored in left, top, right and bottom as pointers to qreals. Each argument can be omitted by passing 0.
See also setWindowFrameMargins() and windowFrameRect().
new int QtGui.QGraphicsWidget.GrabShortcut | ( | QKeySequence | sequence, |
Qt.ShortcutContext | context = Qt.ShortcutContext.WindowShortcut |
||
) |
Adds a shortcut to Qt's shortcut system that watches for the given key sequence in the given context. If the context is Qt::ApplicationShortcut, the shortcut applies to the application as a whole. Otherwise, it is either local to this widget, Qt::WidgetShortcut, or to the window itself, Qt::WindowShortcut. For widgets that are not part of a window (i.e., top-level widgets and their children), Qt::WindowShortcut shortcuts apply to the scene.
If the same key sequence has been grabbed by several widgets, when the key sequence occurs a QEvent::Shortcut event is sent to all the widgets to which it applies in a non-deterministic order, but with the ``ambiguous'' flag set to true.
Warning: You should not normally need to use this function; instead create QActions with the shortcut key sequences you require (if you also want equivalent menu options and toolbar buttons), or create QShortcuts if you just need key sequences. Both QAction and QShortcut handle all the event filtering for you, and provide signals which are triggered when the user triggers the key sequence, so are much easier to use than this low-level function.
This function was introduced in Qt 4.5.
See also releaseShortcut(), setShortcutEnabled(), and QWidget::grabShortcut().
new IQGraphicsItem QtGui.QGraphicsWidget.GraphicsItem | ( | ) |
|
protectedvirtual |
Populates a style option object for this widget based on its current state, and stores the output in option. The default implementation populates option with the following properties.
Style Option PropertyValue
state & QStyle::State_Enabled Corresponds to QGraphicsItem::isEnabled().
state & QStyle::State_HasFocus Corresponds to QGraphicsItem::hasFocus().
state & QStyle::State_MouseOver Corresponds to QGraphicsItem::isUnderMouse().
direction Corresponds to QGraphicsWidget::layoutDirection().
rect Corresponds to QGraphicsWidget::rect().toRect().
palette Corresponds to QGraphicsWidget::palette().
fontMetrics Corresponds to QFontMetrics(QGraphicsWidget::font()).
Subclasses of QGraphicsWidget should call the base implementation, and then test the type of option using qstyleoption_cast<>() or test QStyleOption::Type before storing widget-specific options.
For example:
void MyGroupBoxWidget::initStyleOption(QStyleOption *option) const
{
QGraphicsWidget::initStyleOption(option);
if (QStyleOptionGroupBox *box = qstyleoption_cast<QStyleOptionGroupBox *>(option)) {
// Add group box specific state.
box->flat = isFlat();
...
}
}
See also QStyleOption::initFrom().
Inserts the action action to this widget's list of actions, before the action before. It appends the action if before is 0 or before is not a valid action for this widget.
A QGraphicsWidget should only have one of each action.
This function was introduced in Qt 4.5.
See also removeAction(), addAction(), QMenu, actions(), and QWidget::insertActions().
new void QtGui.QGraphicsWidget.InsertActions | ( | QAction | before, |
System.Collections.Generic.List< QAction > | actions | ||
) |
Inserts the actions actions to this widget's list of actions, before the action before. It appends the action if before is 0 or before is not a valid action for this widget.
A QGraphicsWidget can have at most one of each action.
This function was introduced in Qt 4.5.
See also removeAction(), QMenu, insertAction(), and QWidget::insertActions().
new bool QtGui.QGraphicsWidget.IsActiveWindow | ( | ) |
Returns true if this widget's window is in the active window, or if the widget does not have a window but is in an active scene (i.e., a scene that currently has focus).
The active window is the window that either contains a child widget that currently has input focus, or that itself has input focus.
See also QGraphicsScene::activeWindow(), QGraphicsScene::setActiveWindow(), and isActive().
new bool QtGui.QGraphicsWidget.IsLayout | ( | ) |
|
protectedvirtual |
Reimplemented from QGraphicsItem::itemChange().
QGraphicsWidget uses the base implementation of this function to catch and deliver events related to state changes in the item. Because of this, it is very important that subclasses call the base implementation.
change specifies the type of change, and value is the new value.
For example, QGraphicsWidget uses ItemVisibleChange to deliver Show and Hide events, ItemPositionHasChanged to deliver Move events, and ItemParentChange both to deliver ParentChange events, and for managing the focus chain.
QGraphicsWidget enables the ItemSendsGeometryChanges flag by default in order to track position changes.
See also QGraphicsItem::itemChange().
Reimplemented from QtGui.QGraphicsObject.
|
protectedvirtual |
This event handler can be reimplemented to handle state changes.
The state being changed in this event can be retrieved through event.
Change events include: QEvent::ActivationChange, QEvent::EnabledChange, QEvent::FontChange, QEvent::StyleChange, QEvent::PaletteChange, QEvent::ParentChange, QEvent::LayoutDirectionChange, and QEvent::ContentsRectChange.
|
protectedvirtual |
This event handler, for event, can be reimplemented in a subclass to receive widget close events. The default implementation accepts the event.
See also close() and QCloseEvent.
override bool QtGui.QGraphicsWidget.OnEvent | ( | QEvent @ | event | ) |
Reimplemented from QObject::event().
Handles the event. QGraphicsWidget handles the following events:
Polish Delivered to the widget some time after it has been shown.
GraphicsSceneMove Delivered to the widget after its local position has changed.
GraphicsSceneResize Delivered to the widget after its size has changed.
Show Delivered to the widget before it has been shown.
Hide Delivered to the widget after it has been hidden.
PaletteChange Delivered to the widget after its palette has changed.
FontChange Delivered to the widget after its font has changed.
EnabledChange Delivered to the widget after its enabled state has changed.
StyleChange Delivered to the widget after its style has changed.
LayoutDirectionChange Delivered to the widget after its layout direction has changed.
ContentsRectChange Delivered to the widget after its contents margins/ contents rect has changed.
|
protectedvirtual |
Reimplemented from QGraphicsItem::focusInEvent().
Reimplemented from QtGui.QGraphicsObject.
|
protectedvirtual |
Reimplemented from QGraphicsItem::focusOutEvent().
Reimplemented from QtGui.QGraphicsObject.
|
protected |
This signal gets emitted whenever the geometry is changed in setGeometry().
|
protectedvirtual |
This event handler, for event, can be reimplemented in a subclass to receive notifications for QEvent::GrabKeyboard events.
See also grabKeyboard() and grabMouse().
|
protectedvirtual |
This event handler, for event, can be reimplemented in a subclass to receive notifications for QEvent::GrabMouse events.
See also grabMouse() and grabKeyboard().
Reimplemented in QtGui.QGraphicsProxyWidget.
|
protectedvirtual |
This event handler, for Hide events, is delivered after the widget has been hidden, for example, setVisible(false) has been called for the widget or one of its ancestors when the widget was previously shown.
You can reimplement this event handler to detect when your widget is hidden. Calling QEvent::accept() or QEvent::ignore() on event has no effect.
See also showEvent(), QWidget::hideEvent(), and ItemVisibleChange.
Reimplemented in QtGui.QGraphicsProxyWidget.
|
protectedvirtual |
Reimplemented from QGraphicsItem::hoverLeaveEvent().
Reimplemented from QtGui.QGraphicsObject.
|
protectedvirtual |
Reimplemented from QGraphicsItem::hoverMoveEvent().
Reimplemented from QtGui.QGraphicsObject.
|
protected |
|
protectedvirtual |
This event handler, for GraphicsSceneMove events, is delivered after the widget has moved (e.g., its local position has changed).
This event is only delivered when the item is moved locally. Calling setTransform() or moving any of the item's ancestors does not affect the item's local position.
You can reimplement this event handler to detect when your widget has moved. Calling QEvent::accept() or QEvent::ignore() on event has no effect.
See also ItemPositionChange and ItemPositionHasChanged.
|
protectedvirtual |
This event is delivered to the item by the scene at some point after it has been constructed, but before it is shown or otherwise accessed through the scene. You can use this event handler to do last-minute initializations of the widget which require the item to be fully constructed.
The base implementation does nothing.
|
protectedvirtual |
This event handler, for GraphicsSceneResize events, is delivered after the widget has been resized (i.e., its local size has changed). event contains both the old and the new size.
This event is only delivered when the widget is resized locally; calling setTransform() on the widget or any of its ancestors or view, does not affect the widget's local size.
You can reimplement this event handler to detect when your widget has been resized. Calling QEvent::accept() or QEvent::ignore() on event has no effect.
See also geometry() and setGeometry().
Reimplemented in QtGui.QGraphicsProxyWidget.
|
protectedvirtual |
Reimplemented from QGraphicsItem::sceneEvent().
QGraphicsWidget's implementation of sceneEvent() simply passes event to QGraphicsWidget::event(). You can handle all events for your widget in event() or in any of the convenience functions; you should not have to reimplement this function in a subclass of QGraphicsWidget.
See also QGraphicsItem::sceneEvent().
Reimplemented from QtGui.QGraphicsObject.
|
protectedvirtual |
This event handler, for Show events, is delivered before the widget has been shown, for example, setVisible(true) has been called for the widget or one of its ancestors when the widget was previously hidden.
You can reimplement this event handler to detect when your widget is shown. Calling QEvent::accept() or QEvent::ignore() on event has no effect.
See also hideEvent(), QWidget::showEvent(), and ItemVisibleChange.
Reimplemented in QtGui.QGraphicsProxyWidget.
|
protectedvirtual |
This event handler, for event, can be reimplemented in a subclass to receive notifications for QEvent::UngrabKeyboard events.
See also ungrabKeyboard() and ungrabMouse().
|
protectedvirtual |
This event handler, for event, can be reimplemented in a subclass to receive notifications for QEvent::UngrabMouse events.
See also ungrabMouse() and ungrabKeyboard().
Reimplemented in QtGui.QGraphicsProxyWidget.
|
protectedvirtual |
This event handler, for event, receives events for the window frame if this widget is a window. Its base implementation provides support for default window frame interaction such as moving, resizing, etc.
You can reimplement this handler in a subclass of QGraphicsWidget to provide your own custom window frame interaction support.
Returns true if event has been recognized and processed; otherwise, returns false.
See also event().
new bool QtGui.QGraphicsWidget.OwnedByLayout | ( | ) |
|
virtual |
Reimplemented from QGraphicsItem::paint().
Implements QtGui.QGraphicsObject.
|
virtual |
This virtual function is called by QGraphicsScene to draw the window frame for windows using painter, option, and widget, in local coordinates. The base implementation uses the current style to render the frame and title bar.
You can reimplement this function in a subclass of QGraphicsWidget to provide custom rendering of the widget's window frame.
See also QGraphicsItem::paint().
|
protectedvirtual |
new QRectF QtGui.QGraphicsWidget.Rect | ( | ) |
Returns the item's local rect as a QRectF. This function is equivalent to QRectF(QPointF(), size()).
See also setGeometry() and resize().
new void QtGui.QGraphicsWidget.ReleaseShortcut | ( | int | id | ) |
Removes the shortcut with the given id from Qt's shortcut system. The widget will no longer receive QEvent::Shortcut events for the shortcut's key sequence (unless it has other shortcuts with the same key sequence).
Warning: You should not normally need to use this function since Qt's shortcut system removes shortcuts automatically when their parent widget is destroyed. It is best to use QAction or QShortcut to handle shortcuts, since they are easier to use than this low-level function. Note also that this is an expensive operation.
This function was introduced in Qt 4.5.
See also grabShortcut(), setShortcutEnabled(), and QWidget::releaseShortcut().
new void QtGui.QGraphicsWidget.RemoveAction | ( | QAction | action | ) |
Removes the action action from this widget's list of actions.
This function was introduced in Qt 4.5.
See also insertAction(), actions(), insertAction(), and QWidget::removeAction().
new void QtGui.QGraphicsWidget.Resize | ( | double | w, |
double | h | ||
) |
new void QtGui.QGraphicsWidget.SetAttribute | ( | Qt.WidgetAttribute | attribute, |
bool | on = true |
||
) |
If on is true, this function enables attribute; otherwise attribute is disabled.
See the class documentation for QGraphicsWidget for a complete list of which attributes are supported, and what they are for.
See also testAttribute() and QWidget::setAttribute().
new void QtGui.QGraphicsWidget.SetContentsMargins | ( | double | left, |
double | top, | ||
double | right, | ||
double | bottom | ||
) |
Sets the widget's contents margins to left, top, right and bottom.
Contents margins are used by the assigned layout to define the placement of subwidgets and layouts. Margins are particularly useful for widgets that constrain subwidgets to only a section of its own geometry. For example, a group box with a layout will place subwidgets inside its frame, but below the title.
Changing a widget's contents margins will always trigger an update(), and any assigned layout will be activated automatically. The widget will then receive a ContentsRectChange event.
See also getContentsMargins() and setGeometry().
new void QtGui.QGraphicsWidget.SetGeometry | ( | double | x, |
double | y, | ||
double | w, | ||
double | h | ||
) |
|
protected |
new void QtGui.QGraphicsWidget.SetMaximumSize | ( | double | w, |
double | h | ||
) |
new void QtGui.QGraphicsWidget.SetMinimumSize | ( | double | w, |
double | h | ||
) |
|
protected |
new void QtGui.QGraphicsWidget.SetPreferredSize | ( | double | w, |
double | h | ||
) |
new void QtGui.QGraphicsWidget.SetShortcutAutoRepeat | ( | int | id, |
bool | enabled = true |
||
) |
If enabled is true, auto repeat of the shortcut with the given id is enabled; otherwise it is disabled.
This function was introduced in Qt 4.5.
See also grabShortcut(), releaseShortcut(), and QWidget::setShortcutAutoRepeat().
new void QtGui.QGraphicsWidget.SetShortcutEnabled | ( | int | id, |
bool | enabled = true |
||
) |
If enabled is true, the shortcut with the given id is enabled; otherwise the shortcut is disabled.
Warning: You should not normally need to use this function since Qt's shortcut system enables/disables shortcuts automatically as widgets become hidden/visible and gain or lose focus. It is best to use QAction or QShortcut to handle shortcuts, since they are easier to use than this low-level function.
This function was introduced in Qt 4.5.
See also grabShortcut(), releaseShortcut(), and QWidget::setShortcutEnabled().
new void QtGui.QGraphicsWidget.SetSizePolicy | ( | QSizePolicy.Policy | hPolicy, |
QSizePolicy.Policy | vPolicy, | ||
QSizePolicy.ControlType | controlType = QSizePolicy.ControlType.DefaultType |
||
) |
|
static |
Moves the second widget around the ring of focus widgets so that keyboard focus moves from the first widget to the second widget when the Tab key is pressed.
Note that since the tab order of the second widget is changed, you should order a chain like this:
setTabOrder(a, b); // a to b
setTabOrder(b, c); // a to b to c
setTabOrder(c, d); // a to b to c to d
not like this:
// WRONG
setTabOrder(c, d); // c to d
setTabOrder(a, b); // a to b AND c to d
setTabOrder(b, c); // a to b to c, but not c to d
If first is 0, this indicates that second should be the first widget to receive input focus should the scene gain Tab focus (i.e., the user hits Tab so that focus passes into the scene). If second is 0, this indicates that first should be the first widget to gain focus if the scene gained BackTab focus.
By default, tab order is defined implicitly using widget creation order.
See also focusPolicy and Keyboard Focus.
new void QtGui.QGraphicsWidget.SetWindowFlags | ( | Qt.WindowType | wFlags | ) |
new void QtGui.QGraphicsWidget.SetWindowFrameMargins | ( | double | left, |
double | top, | ||
double | right, | ||
double | bottom | ||
) |
Sets the widget's window frame margins to left, top, right and bottom. The default frame margins are provided by the style, and they depend on the current window flags.
If you would like to draw your own window decoration, you can set your own frame margins to override the default margins.
See also unsetWindowFrameMargins(), getWindowFrameMargins(), and windowFrameRect().
|
virtual |
Reimplemented from QGraphicsItem::shape().
Reimplemented from QtGui.QGraphicsObject.
|
protected |
Reimplemented from QGraphicsLayoutItem::sizeHint().
|
protectedvirtual |
Reimplemented from QGraphicsLayoutItem::sizeHint().
Reimplemented in QtGui.QGraphicsProxyWidget.
new bool QtGui.QGraphicsWidget.TestAttribute | ( | Qt.WidgetAttribute | attribute | ) |
Returns true if attribute is enabled for this widget; otherwise, returns false.
See also setAttribute().
|
static |
|
static |
|
static |
|
static |
|
virtual |
Reimplemented from QGraphicsItem::type().
Reimplemented from QtGui.QGraphicsObject.
new void QtGui.QGraphicsWidget.UnsetLayoutDirection | ( | ) |
new void QtGui.QGraphicsWidget.UnsetWindowFrameMargins | ( | ) |
Resets the window frame margins to the default value, provided by the style.
See also setWindowFrameMargins(), getWindowFrameMargins(), and windowFrameRect().
|
virtual |
Reimplemented from QGraphicsLayoutItem::updateGeometry().
If this widget is currently managed by a layout, this function notifies the layout that the widget's size hints have changed and the layout may need to resize and reposition the widget accordingly.
Call this function if the widget's sizeHint() has changed.
See also QGraphicsLayout::invalidate().
new Qt.WindowType QtGui.QGraphicsWidget.windowFlags | ( | ) |
new QRectF QtGui.QGraphicsWidget.WindowFrameGeometry | ( | ) |
Returns the widget's geometry in parent coordinates including any window frame.
See also windowFrameRect(), getWindowFrameMargins(), and setWindowFrameMargins().
new QRectF QtGui.QGraphicsWidget.WindowFrameRect | ( | ) |
Returns the widget's local rect including any window frame.
See also windowFrameGeometry(), getWindowFrameMargins(), and setWindowFrameMargins().
|
protectedvirtual |
Returns the window frame section at position pos, or Qt::NoSection if there is no window frame section at this position.
This function is used in QGraphicsWidget's base implementation for window frame interaction.
You can reimplement this function if you want to customize how a window can be interactively moved or resized. For instance, if you only want to allow a window to be resized by the bottom right corner, you can reimplement this function to return Qt::NoSection for all sections except Qt::BottomRightSection.
This function was introduced in Qt 4.4.
See also windowFrameEvent(), paintWindowFrame(), and windowFrameGeometry().
new Qt.WindowType QtGui.QGraphicsWidget.WindowType | ( | ) |
Returns the widgets window type.
See also windowFlags(), isWindow(), and isPanel().
|
getset |
This property holds whether the widget background is filled automatically.
If enabled, this property will cause Qt to fill the background of the widget before invoking the paint() method. The color used is defined by the QPalette::Window color role from the widget's palette.
In addition, Windows are always filled with QPalette::Window, unless the WA_OpaquePaintEvent or WA_NoSystemBackground attributes are set.
By default, this property is false.
This property was introduced in Qt 4.7.
|
getprotected |
|
getset |
This property holds the way the widget accepts keyboard focus.
The focus policy is Qt::TabFocus if the widget accepts keyboard focus by tabbing, Qt::ClickFocus if the widget accepts focus by clicking, Qt::StrongFocus if it accepts both, and Qt::NoFocus (the default) if it does not accept focus at all.
You must enable keyboard focus for a widget if it processes keyboard events. This is normally done from the widget's constructor. For instance, the QLineEdit constructor calls setFocusPolicy(Qt::StrongFocus).
If you enable a focus policy (i.e., not Qt::NoFocus), QGraphicsWidget will automatically enable the ItemIsFocusable flag. Setting Qt::NoFocus on a widget will clear the ItemIsFocusable flag. If the widget currently has keyboard focus, the widget will automatically lose focus.
|
getset |
This property holds the widgets' font.
This property provides the widget's font.
QFont consists of font properties that have been explicitly defined and properties implicitly inherited from the widget's parent. Hence, font() can return a different font compared to the one set with setFont(). This scheme allows you to define single entries in a font without affecting the font's inherited entries.
When a widget's font changes, it resolves its entries against its parent widget. If the widget does not have a parent widget, it resolves its entries against the scene. The widget then sends itself a FontChange event and notifies all its descendants so that they can resolve their fonts as well.
By default, this property contains the application's default font.
|
getset |
|
addremove |
This signal gets emitted whenever the geometry is changed in setGeometry().
|
getset |
|
addremove |
|
getset |
This property holds the layout direction for this widget.
This property modifies this widget's and all of its descendants' Qt::WA_RightToLeft attribute. It also sets this widget's Qt::WA_SetLayoutDirection attribute.
The widget's layout direction determines the order in which the layout manager horizontally arranges subwidgets of this widget. The default value depends on the language and locale of the application, and is typically in the same direction as words are read and written. With Qt::LeftToRight, the layout starts placing subwidgets from the left side of this widget towards the right. Qt::RightToLeft does the opposite - the layout will place widgets starting from the right edge moving towards the left.
Subwidgets inherit their layout direction from the parent. Top-level widget items inherit their layout direction from QGraphicsScene::layoutDirection. If you change a widget's layout direction by calling setLayoutDirection(), the widget will send itself a LayoutDirectionChange event, and then propagate the new layout direction to all its descendants.
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
This property holds the widget's palette.
This property provides the widget's palette. The palette provides colors and brushes for color groups (e.g., QPalette::Button) and states (e.g., QPalette::Inactive), loosely defining the general look of the widget and its children.
QPalette consists of color groups that have been explicitly defined, and groups that are implicitly inherited from the widget's parent. Because of this, palette() can return a different palette than what has been set with setPalette(). This scheme allows you to define single entries in a palette without affecting the palette's inherited entries.
When a widget's palette changes, it resolves its entries against its parent widget, or if it doesn't have a parent widget, it resolves against the scene. It then sends itself a PaletteChange event, and notifies all its descendants so they can resolve their palettes as well.
By default, this property contains the application's default palette.
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
This property holds the size of the widget.
Calling resize() resizes the widget to a size bounded by minimumSize() and maximumSize(). This property only affects the widget's width and height (e.g., its right and bottom edges); the widget's position and top-left corner remains unaffected.
Resizing a widget triggers the widget to immediately receive a GraphicsSceneResize event with the widget's old and new size. If the widget has a layout assigned when this event arrives, the layout will be activated and it will automatically update any child widgets's geometry.
This property does not affect any layout of the parent widget. If the widget itself is managed by a parent layout; e.g., it has a parent widget with a layout assigned, that layout will not activate.
By default, this property contains a size with zero width and height.
|
getset |
|
staticget |
|
getset |
Returns a pointer to the widget's style. If this widget does not have any explicitly assigned style, the scene's style is returned instead. In turn, if the scene does not have any assigned style, this function returns QApplication::style().
Sets the widget's style to style. QGraphicsWidget does not take ownership of style.
If no style is assigned, or style is 0, the widget will use QGraphicsScene::style() (if this has been set). Otherwise the widget will use QApplication::style().
This function sets the Qt::WA_SetStyle attribute if style is not 0; otherwise it clears the attribute.
|
getset |
This property holds the widget's window flags.
Window flags are a combination of a window type (e.g., Qt::Dialog) and several flags giving hints on the behavior of the window. The behavior is platform-dependent.
By default, this property contains no window flags.
Windows are panels. If you set the Qt::Window flag, the ItemIsPanel flag will be set automatically. If you clear the Qt::Window flag, the ItemIsPanel flag is also cleared. Note that the ItemIsPanel flag can be set independently of Qt::Window.
|
getset |
This property holds this property holds the window title (caption).
This property is only used for windows.
By default, if no title has been set, this property contains an empty string.