+ if (event->buttons() & Qt::LeftButton) {
+ if (pos != m_lastSeekPosition && pos != m_cursorFramePosition) {
+ m_render->seekToFrame(pos);
+ m_lastSeekPosition = pos;
+ update();
+ }
+ }
+ else {
+ if (m_cursorColor == palette().text() && qAbs(pos - m_cursorFramePosition) * m_scale < 7) {
+ // Mouse is over cursor
+ m_cursorColor = palette().link();
+ update();
+ }
+ else if (m_cursorColor == palette().link() && qAbs(pos - m_cursorFramePosition) * m_scale >= 7) {
+ m_cursorColor = palette().text();
+ update();
+ }
+ if (qAbs((pos - m_zoneStart) * m_scale) < 4) {
+ setToolTip(i18n("Zone start: %1", m_monitor->getTimecodeFromFrames(m_zoneStart)));
+ } else if (qAbs((pos - m_zoneEnd) * m_scale) < 4) {
+ setToolTip(i18n("Zone end: %1", m_monitor->getTimecodeFromFrames(m_zoneEnd)));
+ }
+ for (int i = 0; i < m_markers.count(); ++i) {
+ if (qAbs((pos - m_markers.at(i).time().frames(m_monitor->fps())) * m_scale) < 4) {
+ // We are on a marker
+ QString markerxt = m_monitor->getMarkerThumb(m_markers.at(i).time());
+ if (!markerxt.isEmpty()) {
+ markerxt.prepend("<img src=\"");
+ markerxt.append("\"><p align=\"center\">");
+ }
+ markerxt.append(m_markers.at(i).comment());
+ setToolTip(markerxt);
+ event->accept();
+ return;
+ }
+ }
+ if (pos > m_zoneStart && pos < m_zoneEnd) {
+ setToolTip(i18n("Zone duration: %1", m_monitor->getTimecodeFromFrames(m_zoneEnd - m_zoneStart)));
+ }
+ else setToolTip(i18n("Position: %1", m_monitor->getTimecodeFromFrames(pos)));
+ }
+ event->accept();