Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

click on monitor ruler now seeks

svn path=/branches/KDE4/; revision=2269
parent 98bd42ba
......@@ -110,7 +110,7 @@ Monitor::Monitor(QString name, MonitorManager *manager, QWidget *parent)
m_contextMenu->addMenu(playMenu);
QAction *extractFrame = m_contextMenu->addAction(KIcon("document-new"), i18n("Extract frame"));
connect(extractFrame, SIGNAL(triggered()), this, SLOT(slotExtractCurrentFrame()));
connect(m_ruler, SIGNAL(seekRenderer(int)), this, SLOT(slotSeek(int)));
kDebug() << "/////// BUILDING MONITOR, ID: " << ui.video_frame->winId();
}
......@@ -199,16 +199,16 @@ void Monitor::slotForwardOneFrame() {
void Monitor::seekCursor(int pos) {
if (!m_isActive) m_monitorManager->activateMonitor(m_name);
int rulerPos = (int)(pos * m_scale);
//int rulerPos = (int)(pos * m_scale);
m_position = pos;
m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(pos));
//kDebug() << "seek: " << pos << ", scale: " << m_scale;
m_ruler->slotNewValue(rulerPos);
m_ruler->slotNewValue(pos); //rulerPos);
}
void Monitor::rendererStopped(int pos) {
int rulerPos = (int)(pos * m_scale);
m_ruler->slotNewValue(rulerPos);
//int rulerPos = (int)(pos * m_scale);
m_ruler->slotNewValue(pos);
m_position = pos;
m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(pos));
m_playAction->setChecked(false);
......
......@@ -61,23 +61,19 @@ void SmallRuler::setPixelPerMark(double rate) {
// virtual
void SmallRuler::mousePressEvent(QMouseEvent * event) {
int pos = event->x();
//slotNewValue( pos );
emit seekRenderer(pos);
kDebug() << pos;
double pos = event->x() / pixelPerMark();
emit seekRenderer((int) pos);
}
// virtual
void SmallRuler::mouseMoveEvent(QMouseEvent * event) {
int pos = event->x();
//slotNewValue( pos );
emit seekRenderer(pos);
kDebug() << pos;
double pos = event->x() / pixelPerMark();
emit seekRenderer((int) pos);
}
void SmallRuler::slotNewValue(int _value) {
m_cursorPosition = (int)(_value / pixelPerMark());
KRuler::slotNewValue(_value);
m_cursorPosition = (int)(_value ); /// pixelPerMark());
KRuler::slotNewValue(_value * pixelPerMark());
}
// virtual
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment