public RosterItemGroup(AvatarGrid <T> grid, string groupName)
            {
                m_Grid      = grid;
                m_GroupName = groupName;

                m_MoveAnimationTimeLine = new QTimeLine(500);

                m_MoveAnimation = new QGraphicsItemAnimation();
                m_MoveAnimation.SetItem(this);
                m_MoveAnimation.SetTimeLine(m_MoveAnimationTimeLine);

                m_FadeAnimationTimeLine = new QTimeLine(500);

                m_FadeAnimation = new FadeInOutAnimation();
                m_FadeAnimation.SetItem(this);
                m_FadeAnimation.SetTimeLine(m_FadeAnimationTimeLine);

                m_Font = new QFont(m_Grid.Font);
                m_Font.SetPointSize(8);                 // FIXME: Set to m_Grid.HeaderHeight.
                m_Font.SetBold(true);

                m_Metrics = new QFontMetrics(m_Font);

                m_Rect = new QRectF(m_Grid.IconPadding, 0, 0, 0);

                base.SetHandlesChildEvents(false);
                base.SetAcceptHoverEvents(true);
                base.SetAcceptDrops(true);
            }
Example #2
0
            public RosterItem(AvatarGrid <T> grid, T item, double width, double height, QGraphicsItem parent) : base(parent)
            {
                m_Grid = grid;
                m_Item = item;
                m_Rect = new QRectF(0, 0, 0, 0);

                m_MoveAnimationTimeLine = new QTimeLine(500);

                m_MoveAnimation = new QGraphicsItemAnimation();
                m_MoveAnimation.SetItem(this);
                m_MoveAnimation.SetTimeLine(m_MoveAnimationTimeLine);

                m_FadeAnimationTimeLine = new QTimeLine(500);

                m_FadeAnimation = new FadeInOutAnimation();
                m_FadeAnimation.SetItem(this);
                m_FadeAnimation.SetTimeLine(m_FadeAnimationTimeLine);

                // FIXME: This causes all sorts of problems.
                // this.SetCacheMode(QGraphicsItem.CacheMode.DeviceCoordinateCache);

                base.SetAcceptHoverEvents(true);
            }