当前位置: 首页>>代码示例>>C#>>正文


C# Qyoto.QEvent类代码示例

本文整理汇总了C#中Qyoto.QEvent的典型用法代码示例。如果您正苦于以下问题:C# QEvent类的具体用法?C# QEvent怎么用?C# QEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


QEvent类属于Qyoto命名空间,在下文中一共展示了QEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EventFilter

        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);
        }
开发者ID:jrudolph,项目名称:synapse,代码行数:30,代码来源:WindowMover.cs

示例2: EventFilter

 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);
 }
开发者ID:jrudolph,项目名称:synapse,代码行数:11,代码来源:KeyPressEater.cs

示例3: Event

 public override bool Event(QEvent arg1)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
开发者ID:KDE,项目名称:qyoto,代码行数:4,代码来源:QWebPage.cs

示例4: SceneEvent

 protected virtual bool SceneEvent(QEvent arg1)
 {
     return (bool) interceptor.Invoke("sceneEvent#", "sceneEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
开发者ID:KDE,项目名称:qyoto,代码行数:4,代码来源:QGraphicsTextItem.cs

示例5: EventFilter

 protected override bool EventFilter(QObject arg1, QEvent arg2)
 {
     return (bool) interceptor.Invoke("eventFilter##", "eventFilter(QObject*, QEvent*)", typeof(bool), typeof(QObject), arg1, typeof(QEvent), arg2);
 }
开发者ID:KDE,项目名称:kimono,代码行数:4,代码来源:KToggleFullScreenAction.cs

示例6: Event

 protected new virtual bool Event(QEvent arg1)
 {
     return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:4,代码来源:QCompleter.cs

示例7: EventFilter

 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);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:4,代码来源:QGraphicsScene.cs

示例8: OnExit

 protected override void OnExit(QEvent arg1)
 {
     interceptor.Invoke("onExit#", "onExit(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:4,代码来源:QState.cs

示例9: QChildEvent

 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);
 }
开发者ID:KDE,项目名称:qyoto,代码行数:6,代码来源:QChildEvent.cs

示例10: WindowFrameEvent

 protected virtual bool WindowFrameEvent(QEvent e)
 {
     return (bool) interceptor.Invoke("windowFrameEvent#", "windowFrameEvent(QEvent*)", typeof(bool), typeof(QEvent), e);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:4,代码来源:QGraphicsWidget.cs

示例11: UngrabMouseEvent

 protected virtual void UngrabMouseEvent(QEvent arg1)
 {
     interceptor.Invoke("ungrabMouseEvent#", "ungrabMouseEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:4,代码来源:QGraphicsWidget.cs

示例12: GrabKeyboardEvent

 protected virtual void GrabKeyboardEvent(QEvent arg1)
 {
     interceptor.Invoke("grabKeyboardEvent#", "grabKeyboardEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:4,代码来源:QGraphicsWidget.cs

示例13: ViewportEvent

 protected override bool ViewportEvent(QEvent arg1)
 {
     return (bool) interceptor.Invoke("viewportEvent#", "viewportEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
 }
开发者ID:KDE,项目名称:qyoto,代码行数:4,代码来源:QMdiArea.cs

示例14: Notify

 public virtual bool Notify(QObject arg1, QEvent arg2)
 {
     return (bool) interceptor.Invoke("notify##", "notify(QObject*, QEvent*)", typeof(bool), typeof(QObject), arg1, typeof(QEvent), arg2);
 }
开发者ID:KDE,项目名称:qyoto,代码行数:4,代码来源:QCoreApplication.cs

示例15: SendEvent

 public static bool SendEvent(QObject receiver, QEvent arg2)
 {
     return (bool) staticInterceptor.Invoke("sendEvent##", "sendEvent(QObject*, QEvent*)", typeof(bool), typeof(QObject), receiver, typeof(QEvent), arg2);
 }
开发者ID:KDE,项目名称:qyoto,代码行数:4,代码来源:QCoreApplication.cs


注:本文中的Qyoto.QEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。