]> git.sesse.net Git - kdenlive/blobdiff - src/clipitem.cpp
First steps for downloadable rendering profiles
[kdenlive] / src / clipitem.cpp
index 361b0f14ca74a8010d0459db1a1c795164dd3f03..98e9b3c76b359a01fb3299b501eab927e30b6979 100644 (file)
@@ -479,6 +479,10 @@ QString ClipItem::clipName() const {
     return m_clipName;
 }
 
+void ClipItem::setClipName(const QString &name) {
+    m_clipName = name;
+}
+
 const QString &ClipItem::clipProducer() const {
     return m_producer;
 }
@@ -735,6 +739,8 @@ void ClipItem::paint(QPainter *painter,
 
 
 OPERATIONTYPE ClipItem::operationMode(QPointF pos) {
+    if (isItemLocked()) return NONE;
+
     if (isSelected()) {
         m_editedKeyframe = mouseOverKeyFrames(pos);
         if (m_editedKeyframe != -1) return KEYFRAME;
@@ -935,6 +941,7 @@ void ClipItem::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) {
 //virtual
 void ClipItem::hoverEnterEvent(QGraphicsSceneHoverEvent *e) {
     //if (e->pos().x() < 20) m_hover = true;
+    if (isItemLocked()) return;
     m_hover = true;
     QRectF r = boundingRect();
     double width = 35 / projectScene()->scale();
@@ -946,6 +953,7 @@ void ClipItem::hoverEnterEvent(QGraphicsSceneHoverEvent *e) {
 
 //virtual
 void ClipItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *) {
+    if (isItemLocked()) return;
     m_hover = false;
     QRectF r = boundingRect();
     double width = 35 / projectScene()->scale();
@@ -1312,7 +1320,8 @@ void ClipItem::dropEvent(QGraphicsSceneDragDropEvent * event) {
 
 //virtual
 void ClipItem::dragEnterEvent(QGraphicsSceneDragDropEvent *event) {
-    event->setAccepted(event->mimeData()->hasFormat("kdenlive/effectslist"));
+    if (isItemLocked()) event->setAccepted(false);
+    else event->setAccepted(event->mimeData()->hasFormat("kdenlive/effectslist"));
 }
 
 void ClipItem::dragLeaveEvent(QGraphicsSceneDragDropEvent *event) {