Exemplo n.º 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);
        }
Exemplo n.º 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();
         }
     }
 }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 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));
 }
Exemplo n.º 6
0
 /// <remarks>
 /// </remarks>        <short>   </short>
 protected new virtual bool EventFilter(QObject o, QEvent e)
 {
     return false;
 }
Exemplo n.º 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);
 }
Exemplo n.º 8
0
 protected override void OnTransition(QEvent arg1)
 {
     interceptor.Invoke("onTransition#", "onTransition(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 9
0
 public static new bool Test(QEvent arg1)
 {
     return (bool) staticInterceptor.Invoke("test#", "test(const QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Exemplo n.º 10
0
 public override bool Event(QEvent arg1)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Exemplo n.º 11
0
 protected override bool Event(QEvent arg1)
 {
     return((bool)interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1));
 }
Exemplo n.º 12
0
 protected new virtual bool Event(QEvent arg1)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Exemplo n.º 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);
 }
Exemplo n.º 14
0
 protected override void OnExit(QEvent arg1)
 {
     interceptor.Invoke("onExit#", "onExit(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 15
0
 public virtual void WidgetEvent(QEvent e)
 {
     interceptor.Invoke("widgetEvent#", "widgetEvent(QEvent*)", typeof(void), typeof(QEvent), e);
 }
Exemplo n.º 16
0
 protected void WidgetEvent(QEvent arg1)
 {
     interceptor.Invoke("widgetEvent#", "widgetEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 17
0
 protected virtual void CustomEvent(QEvent arg1)
 {
     interceptor.Invoke("customEvent#", "customEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 18
0
 public virtual bool FilterEvent(QEvent arg1)
 {
     return((bool)interceptor.Invoke("filterEvent#", "filterEvent(const QEvent*)", typeof(bool), typeof(QEvent), arg1));
 }
Exemplo n.º 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));
 }
Exemplo n.º 20
0
 protected virtual bool ViewportEvent(QEvent arg1)
 {
     return((bool)interceptor.Invoke("viewportEvent#", "viewportEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1));
 }
Exemplo n.º 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));
 }
Exemplo n.º 22
0
 protected new virtual bool Event(QEvent e)
 {
     return((bool)interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), e));
 }
Exemplo n.º 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);
 }
Exemplo n.º 24
0
 protected override void UngrabMouseEvent(QEvent arg1)
 {
     interceptor.Invoke("ungrabMouseEvent#", "ungrabMouseEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 25
0
 protected virtual bool SceneEvent(QEvent arg1)
 {
     return (bool) interceptor.Invoke("sceneEvent#", "sceneEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 28
0
 public static void PostEvent(QObject receiver, QEvent arg2)
 {
     staticInterceptor.Invoke("postEvent##", "postEvent(QObject*, QEvent*)", typeof(void), typeof(QObject), receiver, typeof(QEvent), arg2);
 }
Exemplo n.º 29
0
 protected override bool EventTest(QEvent arg1)
 {
     return (bool) interceptor.Invoke("eventTest#", "eventTest(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 32
0
 protected override bool ViewportEvent(QEvent e)
 {
     return((bool)interceptor.Invoke("viewportEvent#", "viewportEvent(QEvent*)", typeof(bool), typeof(QEvent), e));
 }
Exemplo n.º 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);
 }
Exemplo n.º 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));
 }
Exemplo n.º 35
0
 /// <remarks>
 ///          </remarks>        <short>   </short>
 protected virtual bool SceneEventFilter(QGraphicsItem watched, QEvent arg2)
 {
     return false;
 }
Exemplo n.º 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);
 }
Exemplo n.º 37
0
 protected override void LeaveEvent(QEvent arg1)
 {
     interceptor.Invoke("leaveEvent#", "leaveEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 40
0
 protected override bool ViewportEvent(QEvent arg1)
 {
     return (bool) interceptor.Invoke("viewportEvent#", "viewportEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
Exemplo n.º 41
0
Arquivo: QLayout.cs Projeto: KDE/qyoto
 protected void WidgetEvent(QEvent arg1)
 {
     interceptor.Invoke("widgetEvent#", "widgetEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 42
0
 protected virtual void GrabKeyboardEvent(QEvent arg1)
 {
     interceptor.Invoke("grabKeyboardEvent#", "grabKeyboardEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 43
0
 public new virtual bool Event(QEvent arg1)
 {
     return((bool)interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1));
 }
Exemplo n.º 44
0
 protected virtual void UngrabMouseEvent(QEvent arg1)
 {
     interceptor.Invoke("ungrabMouseEvent#", "ungrabMouseEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 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);
 }
Exemplo n.º 46
0
 protected virtual bool WindowFrameEvent(QEvent e)
 {
     return (bool) interceptor.Invoke("windowFrameEvent#", "windowFrameEvent(QEvent*)", typeof(bool), typeof(QEvent), e);
 }
Exemplo n.º 47
0
 protected override void ChangeEvent(QEvent arg1)
 {
     interceptor.Invoke("changeEvent#", "changeEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 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);
 }
Exemplo n.º 49
0
 protected override bool Event(QEvent e)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), e);
 }
Exemplo n.º 50
0
 protected virtual void LeaveEvent(QEvent arg1)
 {
     interceptor.Invoke("leaveEvent#", "leaveEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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));
 }
Exemplo n.º 53
0
 protected override void ChangeEvent(QEvent arg1)
 {
     interceptor.Invoke("changeEvent#", "changeEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
Exemplo n.º 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));
 }