Example #1
0
        public new bool EventFilter(QObject obj, QEvent evnt)
        {
            var type = evnt.type();

            if (type == QEvent.TypeOf.MouseButtonPress) {
                var mouseEvent = (QMouseEvent)evnt;
                if (mouseEvent.Button() == Qt.MouseButton.LeftButton) {
                    m_Moving = true;
                    m_OrigX = mouseEvent.X();
                    m_OrigY = mouseEvent.Y();
                    m_ParentWidget.Cursor = new QCursor(Qt.CursorShape.SizeAllCursor);
                }

            } else if (type == QEvent.TypeOf.MouseMove) {
                var mouseEvent = (QMouseEvent)evnt;
                if (m_Moving) {
                    var pos = mouseEvent.GlobalPos();
                    m_ParentWidget.Move(pos.X() - m_OrigX, pos.Y() - m_OrigY);
                }

            } else if (type == QEvent.TypeOf.MouseButtonRelease) {
                var mouseEvent = (QMouseEvent)evnt;
                if (m_Moving && mouseEvent.Button() == Qt.MouseButton.LeftButton) {
                    m_Moving = false;
                    m_ParentWidget.Cursor = new QCursor(Qt.CursorShape.ArrowCursor);
                }
            }

            return obj.EventFilter(obj, evnt);
        }
Example #2
0
 public new bool EventFilter(QObject obj, QEvent evnt)
 {
     if (evnt.type() == QEvent.TypeOf.KeyPress) {
         if (KeyEvent != null) {
             if (KeyEvent((QKeyEvent)evnt)) {
                 return true;
             }
         }
     }
     return obj.EventFilter(obj, evnt);
 }
Example #3
0
 public override bool Event(QEvent arg1)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Example #4
0
 protected virtual bool SceneEvent(QEvent arg1)
 {
     return (bool) interceptor.Invoke("sceneEvent#", "sceneEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Example #5
0
 protected override bool EventFilter(QObject arg1, QEvent arg2)
 {
     return (bool) interceptor.Invoke("eventFilter##", "eventFilter(QObject*, QEvent*)", typeof(bool), typeof(QObject), arg1, typeof(QEvent), arg2);
 }
Example #6
0
 protected new virtual bool Event(QEvent arg1)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Example #7
0
 protected new virtual bool EventFilter(QObject watched, QEvent arg2)
 {
     return (bool) interceptor.Invoke("eventFilter##", "eventFilter(QObject*, QEvent*)", typeof(bool), typeof(QObject), watched, typeof(QEvent), arg2);
 }
Example #8
0
 protected override void OnExit(QEvent arg1)
 {
     interceptor.Invoke("onExit#", "onExit(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Example #9
0
 public QChildEvent(QEvent.TypeOf type, QObject child)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QChildEvent$#", "QChildEvent(QEvent::Type, QObject*)", typeof(void), typeof(QEvent.TypeOf), type, typeof(QObject), child);
 }
Example #10
0
 protected virtual bool WindowFrameEvent(QEvent e)
 {
     return (bool) interceptor.Invoke("windowFrameEvent#", "windowFrameEvent(QEvent*)", typeof(bool), typeof(QEvent), e);
 }
Example #11
0
 protected virtual void UngrabMouseEvent(QEvent arg1)
 {
     interceptor.Invoke("ungrabMouseEvent#", "ungrabMouseEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Example #12
0
 protected virtual void GrabKeyboardEvent(QEvent arg1)
 {
     interceptor.Invoke("grabKeyboardEvent#", "grabKeyboardEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Example #13
0
 protected override bool ViewportEvent(QEvent arg1)
 {
     return (bool) interceptor.Invoke("viewportEvent#", "viewportEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Example #14
0
 public virtual bool Notify(QObject arg1, QEvent arg2)
 {
     return (bool) interceptor.Invoke("notify##", "notify(QObject*, QEvent*)", typeof(bool), typeof(QObject), arg1, typeof(QEvent), arg2);
 }
Example #15
0
 public static bool SendEvent(QObject receiver, QEvent arg2)
 {
     return (bool) staticInterceptor.Invoke("sendEvent##", "sendEvent(QObject*, QEvent*)", typeof(bool), typeof(QObject), receiver, typeof(QEvent), arg2);
 }
Example #16
0
 /// <remarks>
 /// </remarks>        <short>   </short>
 protected new virtual bool EventFilter(QObject o, QEvent e)
 {
     return false;
 }
Example #17
0
 /// <remarks>
 ///          </remarks>        <short>   </short>
 protected virtual bool SceneEventFilter(QGraphicsItem watched, QEvent arg2)
 {
     return false;
 }
Example #18
0
 protected virtual void LeaveEvent(QEvent arg1)
 {
     interceptor.Invoke("leaveEvent#", "leaveEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Example #19
0
 public bool SendEvent(IQGraphicsItem item, QEvent arg2)
 {
     return (bool) interceptor.Invoke("sendEvent##", "sendEvent(QGraphicsItem*, QEvent*)", typeof(bool), typeof(IQGraphicsItem), item, typeof(QEvent), arg2);
 }
Example #20
0
 public static new bool Test(QEvent arg1)
 {
     return (bool) staticInterceptor.Invoke("test#", "test(const QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Example #21
0
File: QLayout.cs Project: KDE/qyoto
 protected void WidgetEvent(QEvent arg1)
 {
     interceptor.Invoke("widgetEvent#", "widgetEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Example #22
0
 protected override bool EventTest(QEvent arg1)
 {
     return (bool) interceptor.Invoke("eventTest#", "eventTest(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Example #23
0
 protected new virtual bool EventFilter(QObject o, QEvent e)
 {
     return (bool) interceptor.Invoke("eventFilter##", "eventFilter(QObject*, QEvent*)", typeof(bool), typeof(QObject), o, typeof(QEvent), e);
 }
Example #24
0
 protected override void OnTransition(QEvent arg1)
 {
     interceptor.Invoke("onTransition#", "onTransition(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Example #25
0
 protected override bool Event(QEvent e)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), e);
 }
Example #26
0
 public QMouseEvent(QEvent.TypeOf type, QPoint pos, QPoint globalPos, Qt.MouseButton button, uint buttons, uint modifiers)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QMouseEvent$##$$$", "QMouseEvent(QEvent::Type, const QPoint&, const QPoint&, Qt::MouseButton, Qt::MouseButtons, Qt::KeyboardModifiers)", typeof(void), typeof(QEvent.TypeOf), type, typeof(QPoint), pos, typeof(QPoint), globalPos, typeof(Qt.MouseButton), button, typeof(uint), buttons, typeof(uint), modifiers);
 }
Example #27
0
 protected virtual bool SceneEventFilter(IQGraphicsItem watched, QEvent arg2)
 {
     return (bool) interceptor.Invoke("sceneEventFilter##", "sceneEventFilter(QGraphicsItem*, QEvent*)", typeof(bool), typeof(IQGraphicsItem), watched, typeof(QEvent), arg2);
 }
Example #28
0
 public static QMouseEvent CreateExtendedMouseEvent(QEvent.TypeOf type, QPointF pos, QPoint globalPos, Qt.MouseButton button, uint buttons, uint modifiers)
 {
     return (QMouseEvent) staticInterceptor.Invoke("createExtendedMouseEvent$##$$$", "createExtendedMouseEvent(QEvent::Type, const QPointF&, const QPoint&, Qt::MouseButton, Qt::MouseButtons, Qt::KeyboardModifiers)", typeof(QMouseEvent), typeof(QEvent.TypeOf), type, typeof(QPointF), pos, typeof(QPoint), globalPos, typeof(Qt.MouseButton), button, typeof(uint), buttons, typeof(uint), modifiers);
 }
Example #29
0
 protected override void ChangeEvent(QEvent arg1)
 {
     interceptor.Invoke("changeEvent#", "changeEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Example #30
0
 protected new virtual bool EditorEvent(QEvent arg1, QAbstractItemModel model, QStyleOptionViewItem option, QModelIndex index)
 {
     return (bool) interceptor.Invoke("editorEvent####", "editorEvent(QEvent*, QAbstractItemModel*, const QStyleOptionViewItem&, const QModelIndex&)", typeof(bool), typeof(QEvent), arg1, typeof(QAbstractItemModel), model, typeof(QStyleOptionViewItem), option, typeof(QModelIndex), index);
 }