protected override void MouseMoveEvent(Qyoto.QGraphicsSceneMouseEvent evnt)
            {
                if (m_LeftButtonDown)
                {
                    if (evnt.Pos().Y() > m_Grid.HeaderHeight)
                    {
                        return;
                    }

                    var app = ((QApplication)QApplication.Instance());
                    if (new QLineF(evnt.ScreenPos(), evnt.ButtonDownScreenPos(Qt.MouseButton.LeftButton))
                        .Length() < app.StartDragDistance)
                    {
                        return;
                    }

                    if (m_Grid.Model is IAvatarGridEditableModel <T> )
                    {
                        QDrag drag = new QDrag(evnt.Widget());
                        drag.SetHotSpot(evnt.Pos().ToPoint());

                        var mime = new RosterItemGroupMimeData(this, m_Grid);
                        drag.SetMimeData(mime);

                        var pixmap = new QPixmap((int)BoundingRect().Width(), m_Grid.HeaderHeight);
                        pixmap.Fill(m_Grid.Palette.Color(QPalette.ColorRole.Base));
                        var painter = new QPainter(pixmap);
                        Paint(painter, null, null);
                        painter.End();
                        drag.SetPixmap(pixmap);

                        drag.Exec();
                    }
                }
            }
示例#2
0
            protected override void MouseMoveEvent(Qyoto.QGraphicsSceneMouseEvent evnt)
            {
                var app = ((QApplication)QApplication.Instance());

                if (new QLineF(evnt.ScreenPos(), evnt.ButtonDownScreenPos(Qt.MouseButton.LeftButton))
                    .Length() < app.StartDragDistance)
                {
                    return;
                }

                if (m_Grid.Model is IAvatarGridEditableModel <T> )
                {
                    QDrag     drag = new QDrag(evnt.Widget());
                    QMimeData mime = new RosterItemMimeData <T>(this, m_Grid);
                    drag.SetMimeData(mime);

                    QPixmap pixmap = new QPixmap(m_Grid.IconSize, m_Grid.IconSize);
                    pixmap.Fill(m_Grid.Palette.Color(QPalette.ColorRole.Base));
                    var painter = new QPainter(pixmap);
                    Paint(painter, null, null);
                    painter.End();
                    drag.SetPixmap(pixmap);


                    drag.Exec((uint)Qt.DropAction.MoveAction | (uint)Qt.DropAction.CopyAction | (uint)Qt.DropAction.IgnoreAction);
                }
            }
 protected override void MousePressEvent(Qyoto.QGraphicsSceneMouseEvent arg1)
 {
     if (arg1.Button() == Qt.MouseButton.LeftButton)
     {
         m_LeftButtonDown = true;
     }
 }
 protected override void MouseReleaseEvent(Qyoto.QGraphicsSceneMouseEvent arg1)
 {
     if (arg1.Button() == Qt.MouseButton.LeftButton)
     {
         m_LeftButtonDown = false;
         var pos  = arg1.Pos();
         var pos1 = arg1.ButtonDownPos(Qt.MouseButton.LeftButton);
         if (pos != null && pos1 != null && m_ArrowRect.Contains(pos1) && pos.Y() < m_Grid.HeaderHeight && pos1.Equals(pos))
         {
             this.IsExpanded = !this.IsExpanded;
             m_Grid.ResizeAndRepositionGroups();
         }
     }
 }
示例#5
0
 protected virtual void MouseReleaseEvent(QGraphicsSceneMouseEvent arg1)
 {
     interceptor.Invoke("mouseReleaseEvent#", "mouseReleaseEvent(QGraphicsSceneMouseEvent*)", typeof(void), typeof(QGraphicsSceneMouseEvent), arg1);
 }
示例#6
0
 /// <remarks>
 ///          </remarks>        <short>   </short>
 protected virtual void MousePressEvent(QGraphicsSceneMouseEvent arg1)
 {
 }
示例#7
0
 protected override void MousePressEvent(QGraphicsSceneMouseEvent arg1)
 {
     interceptor.Invoke("mousePressEvent#", "mousePressEvent(QGraphicsSceneMouseEvent*)", typeof(void), typeof(QGraphicsSceneMouseEvent), arg1);
 }
 public virtual void MousePressEvent(QGraphicsSceneMouseEvent arg1)
 {
     interceptor.Invoke("mousePressEvent#", "mousePressEvent(QGraphicsSceneMouseEvent*)", typeof(void), typeof(QGraphicsSceneMouseEvent), arg1);
 }
 protected virtual void MouseReleaseEvent(QGraphicsSceneMouseEvent arg1)
 {
 }
 protected virtual void MouseDoubleClickEvent(QGraphicsSceneMouseEvent arg1)
 {
 }
示例#11
0
 protected override void MouseDoubleClickEvent(QGraphicsSceneMouseEvent arg1)
 {
     interceptor.Invoke("mouseDoubleClickEvent#", "mouseDoubleClickEvent(QGraphicsSceneMouseEvent*)", typeof(void), typeof(QGraphicsSceneMouseEvent), arg1);
 }
示例#12
0
 protected virtual void MouseReleaseEvent(QGraphicsSceneMouseEvent arg1)
 {
     interceptor.Invoke("mouseReleaseEvent#", "mouseReleaseEvent(QGraphicsSceneMouseEvent*)", typeof(void), typeof(QGraphicsSceneMouseEvent), arg1);
 }
示例#13
0
 protected override void MouseReleaseEvent(Qyoto.QGraphicsSceneMouseEvent arg1)
 {
 }