コード例 #1
0
	void FrameView::scrollHorizontal(int i)
	{
		if (m_updating)
			return;

		DocInfo *dinfo = gui::activeDocInfo();
		if (dinfo == NULL)
			return;
		dinfo->setCurrentChannel(i);

		m_updating = true;
		gui::updateFrameChannel();
		m_updating = false;
	}
コード例 #2
0
	void FrameView::mouseReleaseEvent(QMouseEvent *e)
	{
		DocInfo *dinfo = gui::activeDocInfo();
		if (dinfo == NULL)
			return;

		QPoint p = viewport()->mapFromParent(e->pos());

		unsigned int frame, chan;
		if (posToFrameChannel(p, frame, chan))
		{
			if (!gui::isPlaying())
			{
				dinfo->setCurrentFrame(frame);
			}
			dinfo->setCurrentChannel(chan);
			dinfo->setCurrentChannelColumn(0);
			gui::updateFrameChannel();
		}
	}