-void CustomRuler::setZone(QPoint p) {
- int min = qMin(m_zoneStart, p.x());
- int max = qMax(m_zoneEnd, p.y());
+void CustomRuler::updatePalette()
+{
+ m_zoneColor = KStatefulBrush(KColorScheme::View, KColorScheme::FocusColor, KSharedConfig::openConfig(KdenliveSettings::colortheme())).brush(this).color();
+ m_zoneColor.setAlpha(180);
+}
+
+void CustomRuler::updateProjectFps(const Timecode &t)
+{
+ m_timecode = t;
+ mediumMarkDistance = FRAME_SIZE * m_timecode.fps();
+ bigMarkDistance = FRAME_SIZE * m_timecode.fps() * 60;
+ update();
+}
+
+void CustomRuler::updateFrameSize()
+{
+ FRAME_SIZE = m_view->getFrameWidth();
+ littleMarkDistance = FRAME_SIZE;
+ mediumMarkDistance = FRAME_SIZE * m_timecode.fps();
+ bigMarkDistance = FRAME_SIZE * m_timecode.fps() * 60;
+ updateProjectFps(m_timecode);
+ if (m_rate > 0) setPixelPerMark(m_rate);
+}
+
+void CustomRuler::slotEditGuide()
+{
+ m_view->slotEditGuide(m_clickedGuide);
+}
+
+void CustomRuler::slotDeleteGuide()
+{
+ m_view->slotDeleteGuide(m_clickedGuide);
+}
+
+void CustomRuler::slotGoToGuide(QAction *act)
+{
+ m_view->seekCursorPos(act->data().toInt());
+ m_view->initCursorPos(act->data().toInt());
+}
+
+void CustomRuler::setZone(const QPoint &p)
+{