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);
            }
Пример #2
0
        public AboutDialog(QWidget parentWindow) : base(parentWindow)
        {
            SetupUi();

            m_Scene = new QGraphicsScene(m_Scene);
            graphicsView.SetScene(m_Scene);
            m_Scene.SetSceneRect(0, 0, 200, 200);

            textLabel.Pixmap = new QPixmap("resource:/text.png");

            var octy = new QGraphicsPixmapItem(new QPixmap("resource:/octy.png"));

            octy.SetPos(0, 10);
            m_Scene.AddItem(octy);

            m_TimeLine            = new QTimeLine(2000, m_Scene);
            m_TimeLine.curveShape = QTimeLine.CurveShape.EaseOutCurve;
            QObject.Connect(m_TimeLine, Qt.SIGNAL("finished()"), TimerFinished);

            QGraphicsItemAnimation animation = new QGraphicsItemAnimation(m_Scene);

            animation.SetItem(octy);
            animation.SetTimeLine(m_TimeLine);
            animation.SetPosAt(1, new QPointF(0, 0));

            m_TimeLine.Start();

            Gui.CenterWidgetOnScreen(this);
        }
Пример #3
0
        public NoAccountsWidget(QWidget parent) : base(parent)
        {
            SetupUi();

            m_Scene = new QGraphicsScene(m_Scene);
            m_GraphicsView.SetScene(m_Scene);
            m_Scene.SetSceneRect(0, 0, 200, 200);

            var octy = new QGraphicsPixmapItem(new QPixmap("resource:/octy.png"));

            octy.SetPos(0, 10);
            m_Scene.AddItem(octy);

            // TODO: Add bubbles!

            m_TimeLine            = new QTimeLine(2000, m_Scene);
            m_TimeLine.curveShape = QTimeLine.CurveShape.EaseOutCurve;
            QObject.Connect(m_TimeLine, Qt.SIGNAL("finished()"), HandleTimerFinished);

            QGraphicsItemAnimation animation = new QGraphicsItemAnimation(m_Scene);

            animation.SetItem(octy);
            animation.SetTimeLine(m_TimeLine);
            animation.SetPosAt(1, new QPointF(0, 0));

            m_TimeLine.Start();
        }
Пример #4
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);
            }