Beispiel #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);
        }
Beispiel #2
0
 protected override void ChangeEvent(Qyoto.QEvent arg1)
 {
     if (arg1.type() == QEvent.TypeOf.ActivationChange)
     {
         if (this.IsActiveWindow && m_Tabs.CurrentWidget() != null)
         {
             m_Tabs.CurrentWidget().SetFocus();
         }
     }
 }
Beispiel #3
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);
 }
 public override bool Event(QEvent e)
 {
     if (e != null && e.type() == QEvent.TypeOf.User)
     {
         ThreadEvent my = e as ThreadEvent;
         if (e != null)
         {
             my.dele();
             my.handle.SynchronizedFree();                      // free the handle so the event can be collected
             return(true);
         }
     }
     return(false);
 }
Beispiel #5
0
 public new bool EventFilter(Qyoto.QObject arg1, Qyoto.QEvent arg2)
 {
     if (arg2.type() == QEvent.TypeOf.HoverMove)
     {
         if (MouseMoved != null)
         {
             MouseMoved(this, EventArgs.Empty);
         }
     }
     else if (arg2.type() == QEvent.TypeOf.ContextMenu)
     {
         var mouseEvent = (QContextMenuEvent)arg2;
         this.Hide();
         if (RightClicked != null)
         {
             RightClicked(this.MapToGlobal(mouseEvent.Pos()));
         }
     }
     return(base.EventFilter(arg1, arg2));
 }
Beispiel #6
0
 /// <remarks>
 /// </remarks>        <short>   </short>
 protected new virtual bool EventFilter(QObject o, QEvent e)
 {
     return false;
 }
Beispiel #7
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);
 }
Beispiel #8
0
 protected override void OnTransition(QEvent arg1)
 {
     interceptor.Invoke("onTransition#", "onTransition(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #9
0
 public static new bool Test(QEvent arg1)
 {
     return (bool) staticInterceptor.Invoke("test#", "test(const QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Beispiel #10
0
 public override bool Event(QEvent arg1)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Beispiel #11
0
 protected override bool Event(QEvent arg1)
 {
     return((bool)interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1));
 }
Beispiel #12
0
 protected new virtual bool Event(QEvent arg1)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Beispiel #13
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);
 }
Beispiel #14
0
 protected override void OnExit(QEvent arg1)
 {
     interceptor.Invoke("onExit#", "onExit(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #15
0
 public virtual void WidgetEvent(QEvent e)
 {
     interceptor.Invoke("widgetEvent#", "widgetEvent(QEvent*)", typeof(void), typeof(QEvent), e);
 }
Beispiel #16
0
 protected void WidgetEvent(QEvent arg1)
 {
     interceptor.Invoke("widgetEvent#", "widgetEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #17
0
 protected virtual void CustomEvent(QEvent arg1)
 {
     interceptor.Invoke("customEvent#", "customEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #18
0
 public virtual bool FilterEvent(QEvent arg1)
 {
     return((bool)interceptor.Invoke("filterEvent#", "filterEvent(const QEvent*)", typeof(bool), typeof(QEvent), arg1));
 }
Beispiel #19
0
 public override bool Notify(QObject arg1, QEvent arg2)
 {
     return((bool)interceptor.Invoke("notify##", "notify(QObject*, QEvent*)", typeof(bool), typeof(QObject), arg1, typeof(QEvent), arg2));
 }
Beispiel #20
0
 protected virtual bool ViewportEvent(QEvent arg1)
 {
     return((bool)interceptor.Invoke("viewportEvent#", "viewportEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1));
 }
Beispiel #21
0
 protected new virtual bool EventFilter(QObject arg1, QEvent arg2)
 {
     return((bool)interceptor.Invoke("eventFilter##", "eventFilter(QObject*, QEvent*)", typeof(bool), typeof(QObject), arg1, typeof(QEvent), arg2));
 }
Beispiel #22
0
 protected new virtual bool Event(QEvent e)
 {
     return((bool)interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), e));
 }
Beispiel #23
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);
 }
 protected override void UngrabMouseEvent(QEvent arg1)
 {
     interceptor.Invoke("ungrabMouseEvent#", "ungrabMouseEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #25
0
 protected virtual bool SceneEvent(QEvent arg1)
 {
     return (bool) interceptor.Invoke("sceneEvent#", "sceneEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Beispiel #26
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));
 }
Beispiel #27
0
 protected virtual uint SelectionCommand(QModelIndex index, QEvent arg2)
 {
     return((uint)interceptor.Invoke("selectionCommand##", "selectionCommand(const QModelIndex&, const QEvent*) const", typeof(uint), typeof(QModelIndex), index, typeof(QEvent), arg2));
 }
Beispiel #28
0
 public static void PostEvent(QObject receiver, QEvent arg2)
 {
     staticInterceptor.Invoke("postEvent##", "postEvent(QObject*, QEvent*)", typeof(void), typeof(QObject), receiver, typeof(QEvent), arg2);
 }
Beispiel #29
0
 protected override bool EventTest(QEvent arg1)
 {
     return (bool) interceptor.Invoke("eventTest#", "eventTest(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Beispiel #30
0
 public static void PostEvent(QObject receiver, QEvent arg2, int priority)
 {
     staticInterceptor.Invoke("postEvent##$", "postEvent(QObject*, QEvent*, int)", typeof(void), typeof(QObject), receiver, typeof(QEvent), arg2, typeof(int), priority);
 }
Beispiel #31
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);
 }
Beispiel #32
0
 protected override bool ViewportEvent(QEvent e)
 {
     return((bool)interceptor.Invoke("viewportEvent#", "viewportEvent(QEvent*)", typeof(bool), typeof(QEvent), e));
 }
Beispiel #33
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);
 }
Beispiel #34
0
 protected override bool EventFilter(QObject watched, QEvent arg2)
 {
     return((bool)interceptor.Invoke("eventFilter##", "eventFilter(QObject*, QEvent*)", typeof(bool), typeof(QObject), watched, typeof(QEvent), arg2));
 }
Beispiel #35
0
 /// <remarks>
 ///          </remarks>        <short>   </short>
 protected virtual bool SceneEventFilter(QGraphicsItem watched, QEvent arg2)
 {
     return false;
 }
Beispiel #36
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);
 }
Beispiel #37
0
 protected override void LeaveEvent(QEvent arg1)
 {
     interceptor.Invoke("leaveEvent#", "leaveEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #38
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);
 }
Beispiel #39
0
 public bool SendEvent(IQGraphicsItem item, QEvent arg2)
 {
     return (bool) interceptor.Invoke("sendEvent##", "sendEvent(QGraphicsItem*, QEvent*)", typeof(bool), typeof(IQGraphicsItem), item, typeof(QEvent), arg2);
 }
Beispiel #40
0
 protected override bool ViewportEvent(QEvent arg1)
 {
     return (bool) interceptor.Invoke("viewportEvent#", "viewportEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Beispiel #41
0
 protected void WidgetEvent(QEvent arg1)
 {
     interceptor.Invoke("widgetEvent#", "widgetEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #42
0
 protected virtual void GrabKeyboardEvent(QEvent arg1)
 {
     interceptor.Invoke("grabKeyboardEvent#", "grabKeyboardEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #43
0
 public new virtual bool Event(QEvent arg1)
 {
     return((bool)interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1));
 }
Beispiel #44
0
 protected virtual void UngrabMouseEvent(QEvent arg1)
 {
     interceptor.Invoke("ungrabMouseEvent#", "ungrabMouseEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #45
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);
 }
Beispiel #46
0
 protected virtual bool WindowFrameEvent(QEvent e)
 {
     return (bool) interceptor.Invoke("windowFrameEvent#", "windowFrameEvent(QEvent*)", typeof(bool), typeof(QEvent), e);
 }
Beispiel #47
0
 protected override void ChangeEvent(QEvent arg1)
 {
     interceptor.Invoke("changeEvent#", "changeEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #48
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);
 }
Beispiel #49
0
 protected override bool Event(QEvent e)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), e);
 }
Beispiel #50
0
 protected virtual void LeaveEvent(QEvent arg1)
 {
     interceptor.Invoke("leaveEvent#", "leaveEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #51
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);
 }
Beispiel #52
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));
 }
Beispiel #53
0
 protected override void ChangeEvent(QEvent arg1)
 {
     interceptor.Invoke("changeEvent#", "changeEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Beispiel #54
0
 protected virtual bool Edit(QModelIndex index, QAbstractItemView.EditTrigger trigger, QEvent arg3)
 {
     return((bool)interceptor.Invoke("edit#$#", "edit(const QModelIndex&, QAbstractItemView::EditTrigger, QEvent*)", typeof(bool), typeof(QModelIndex), index, typeof(QAbstractItemView.EditTrigger), trigger, typeof(QEvent), arg3));
 }