connect(m_scene, SIGNAL(actionFinished()), this, SLOT(slotUpdateGeometry()));
+ connect(m_scene, SIGNAL(addKeyframe()), this, SLOT(slotAddKeyframe()));
connect(m_monitor, SIGNAL(renderPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
connect(this, SIGNAL(parameterChanged()), this, SLOT(slotUpdateProperties()));
}
void MonitorScene::slotUpdateBackground()
{
if (m_view && m_view->isVisible()) {
- if (m_lastUpdate.elapsed() > 200) {
+ if (m_lastUpdate.elapsed() > 100) {
m_background->setPixmap(QPixmap::fromImage(m_backgroundImage, Qt::ThresholdDither));
m_lastUpdate.start();
}
void MonitorScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
- if (!m_enabled)
+ if (!m_enabled) {
+ if (m_view)
+ m_view->setCursor(Qt::ArrowCursor);
return;
+ }
/*if (event->buttons() != Qt::NoButton && (event->screenPos() - m_screenClickPoint).manhattanLength() < QApplication::startDragDistance()) {
event->accept();
void MonitorScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
+ Q_UNUSED(event);
+
if (!m_enabled)
return;
- QGraphicsScene::mouseReleaseEvent(event);
if (m_modified) {
m_modified = false;
emit actionFinished();
}
}
+void MonitorScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
+{
+ Q_UNUSED(event);
+
+ if (!m_enabled)
+ emit addKeyframe();
+}
+
+
#include "monitorscene.moc"
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
public slots:
void slotUpdateBackground();
signals:
void actionFinished();
void zoomChanged(int);
+ void addKeyframe();
};
#endif