timelineview is now a true view of the blocks at all times

This commit is contained in:
itsmattkc
2019-08-11 21:01:37 +10:00
parent 9b63cc7755
commit 149f3fa907
13 changed files with 141 additions and 86 deletions
+2
View File
@@ -35,6 +35,8 @@ NodeView::NodeView(QWidget *parent) :
void NodeView::SetGraph(NodeGraph *graph)
{
if (graph_ != nullptr) {
disconnect(graph_, SIGNAL(NodeAdded(Node*)), this, SLOT(AddNode(Node*)));
disconnect(graph_, SIGNAL(NodeRemoved(Node*)), this, SLOT(RemoveNode(Node*)));
disconnect(graph_, SIGNAL(EdgeAdded(NodeEdgePtr)), this, SLOT(AddEdge(NodeEdgePtr)));
disconnect(graph_, SIGNAL(EdgeRemoved(NodeEdgePtr)), this, SLOT(RemoveEdge(NodeEdgePtr)));
}
+2
View File
@@ -257,6 +257,8 @@ void NodeViewItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
}
}
#include "node/block/block.h"
void NodeViewItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
// We override standard mouse behavior in some cases. In these cases, we don't want the standard "move" and "release"
+5
View File
@@ -67,6 +67,11 @@ void TimelineView::AddClip(ClipBlock *clip)
connect(clip, SIGNAL(Refreshed()), this, SLOT(BlockChanged()));
}
void TimelineView::RemoveClip(ClipBlock *clip)
{
delete clip_items_[clip];
}
void TimelineView::SetScale(const double &scale)
{
scale_ = scale;