本文整理汇总了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);
}
示例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);
}
示例3: Event
public override bool Event(QEvent arg1)
{
return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
}
示例4: SceneEvent
protected virtual bool SceneEvent(QEvent arg1)
{
return (bool) interceptor.Invoke("sceneEvent#", "sceneEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
}
示例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);
}
示例6: Event
protected new virtual bool Event(QEvent arg1)
{
return (bool) interceptor.Invoke("event#", "event(QEvent*)", typeof(bool), typeof(QEvent), arg1);
}
示例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);
}
示例8: OnExit
protected override void OnExit(QEvent arg1)
{
interceptor.Invoke("onExit#", "onExit(QEvent*)", typeof(void), typeof(QEvent), arg1);
}
示例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);
}
示例10: WindowFrameEvent
protected virtual bool WindowFrameEvent(QEvent e)
{
return (bool) interceptor.Invoke("windowFrameEvent#", "windowFrameEvent(QEvent*)", typeof(bool), typeof(QEvent), e);
}
示例11: UngrabMouseEvent
protected virtual void UngrabMouseEvent(QEvent arg1)
{
interceptor.Invoke("ungrabMouseEvent#", "ungrabMouseEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
}
示例12: GrabKeyboardEvent
protected virtual void GrabKeyboardEvent(QEvent arg1)
{
interceptor.Invoke("grabKeyboardEvent#", "grabKeyboardEvent(QEvent*)", typeof(void), typeof(QEvent), arg1);
}
示例13: ViewportEvent
protected override bool ViewportEvent(QEvent arg1)
{
return (bool) interceptor.Invoke("viewportEvent#", "viewportEvent(QEvent*)", typeof(bool), typeof(QEvent), arg1);
}
示例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);
}
示例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);
}