change: change code style to Linux style except indent.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -30,144 +30,162 @@
|
||||
#include "widget/timebased/timebasedviewselectionmanager.h"
|
||||
#include "widget/timetarget/timetarget.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
class KeyframeView : public TimeBasedView, public TimeTargetObject
|
||||
namespace olive
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
class KeyframeView : public TimeBasedView, public TimeTargetObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
KeyframeView(QWidget* parent = nullptr);
|
||||
KeyframeView(QWidget *parent = nullptr);
|
||||
|
||||
void DeleteSelected();
|
||||
void DeleteSelected();
|
||||
|
||||
using ElementConnections = QVector<KeyframeViewInputConnection *>;
|
||||
using InputConnections = QVector<ElementConnections>;
|
||||
using NodeConnections = QMap<QString, InputConnections>;
|
||||
using ElementConnections = QVector<KeyframeViewInputConnection *>;
|
||||
using InputConnections = QVector<ElementConnections>;
|
||||
using NodeConnections = QMap<QString, InputConnections>;
|
||||
|
||||
NodeConnections AddKeyframesOfNode(Node* n);
|
||||
NodeConnections AddKeyframesOfNode(Node *n);
|
||||
|
||||
InputConnections AddKeyframesOfInput(Node *n, const QString &input);
|
||||
InputConnections AddKeyframesOfInput(Node *n, const QString &input);
|
||||
|
||||
ElementConnections AddKeyframesOfElement(const NodeInput &input);
|
||||
ElementConnections AddKeyframesOfElement(const NodeInput &input);
|
||||
|
||||
KeyframeViewInputConnection *AddKeyframesOfTrack(const NodeKeyframeTrackReference &ref);
|
||||
KeyframeViewInputConnection *
|
||||
AddKeyframesOfTrack(const NodeKeyframeTrackReference &ref);
|
||||
|
||||
void RemoveKeyframesOfTrack(KeyframeViewInputConnection *connection);
|
||||
void RemoveKeyframesOfTrack(KeyframeViewInputConnection *connection);
|
||||
|
||||
void SelectAll();
|
||||
void SelectAll();
|
||||
|
||||
void DeselectAll();
|
||||
void DeselectAll();
|
||||
|
||||
void Clear();
|
||||
void Clear();
|
||||
|
||||
const std::vector<NodeKeyframe*> &GetSelectedKeyframes() const
|
||||
{
|
||||
return selection_manager_.GetSelectedObjects();
|
||||
}
|
||||
const std::vector<NodeKeyframe *> &GetSelectedKeyframes() const
|
||||
{
|
||||
return selection_manager_.GetSelectedObjects();
|
||||
}
|
||||
|
||||
const QVector<KeyframeViewInputConnection*> &GetKeyframeTracks() const
|
||||
{
|
||||
return tracks_;
|
||||
}
|
||||
const QVector<KeyframeViewInputConnection *> &GetKeyframeTracks() const
|
||||
{
|
||||
return tracks_;
|
||||
}
|
||||
|
||||
virtual void SelectionManagerSelectEvent(void *obj) override;
|
||||
virtual void SelectionManagerDeselectEvent(void *obj) override;
|
||||
virtual void SelectionManagerSelectEvent(void *obj) override;
|
||||
virtual void SelectionManagerDeselectEvent(void *obj) override;
|
||||
|
||||
void SetMaxScroll(int i)
|
||||
{
|
||||
max_scroll_ = i;
|
||||
UpdateSceneRect();
|
||||
}
|
||||
void SetMaxScroll(int i)
|
||||
{
|
||||
max_scroll_ = i;
|
||||
UpdateSceneRect();
|
||||
}
|
||||
|
||||
bool CopySelected(bool cut);
|
||||
bool CopySelected(bool cut);
|
||||
|
||||
bool Paste(std::function<Node *(const QString &)> find_node_function);
|
||||
bool Paste(std::function<Node *(const QString &)> find_node_function);
|
||||
|
||||
virtual void CatchUpScrollEvent() override;
|
||||
virtual void CatchUpScrollEvent() override;
|
||||
|
||||
signals:
|
||||
void Dragged(int current_x, int current_y);
|
||||
void Dragged(int current_x, int current_y);
|
||||
|
||||
void SelectionChanged();
|
||||
void SelectionChanged();
|
||||
|
||||
void Released();
|
||||
void Released();
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent(QMouseEvent *event) override;
|
||||
virtual void mouseMoveEvent(QMouseEvent *event) override;
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
virtual void mousePressEvent(QMouseEvent *event) override;
|
||||
virtual void mouseMoveEvent(QMouseEvent *event) override;
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
|
||||
virtual void drawForeground(QPainter *painter, const QRectF &rect) override;
|
||||
virtual void drawForeground(QPainter *painter, const QRectF &rect) override;
|
||||
|
||||
virtual void DrawKeyframe(QPainter *painter, NodeKeyframe *key, KeyframeViewInputConnection *track, const QRectF &key_rect);
|
||||
virtual void DrawKeyframe(QPainter *painter, NodeKeyframe *key,
|
||||
KeyframeViewInputConnection *track,
|
||||
const QRectF &key_rect);
|
||||
|
||||
virtual void ScaleChangedEvent(const double& scale) override;
|
||||
virtual void ScaleChangedEvent(const double &scale) override;
|
||||
|
||||
virtual void TimeTargetChangedEvent(ViewerOutput *v) override;
|
||||
virtual void TimeTargetChangedEvent(ViewerOutput *v) override;
|
||||
|
||||
virtual void TimebaseChangedEvent(const rational &timebase) override;
|
||||
virtual void TimebaseChangedEvent(const rational &timebase) override;
|
||||
|
||||
virtual void ContextMenuEvent(Menu &m);
|
||||
virtual void ContextMenuEvent(Menu &m);
|
||||
|
||||
virtual bool FirstChanceMousePress(QMouseEvent *event){return false;}
|
||||
virtual void FirstChanceMouseMove(QMouseEvent *event){}
|
||||
virtual void FirstChanceMouseRelease(QMouseEvent *event){}
|
||||
virtual bool FirstChanceMousePress(QMouseEvent *event)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual void FirstChanceMouseMove(QMouseEvent *event)
|
||||
{
|
||||
}
|
||||
virtual void FirstChanceMouseRelease(QMouseEvent *event)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void KeyframeDragStart(QMouseEvent *event){}
|
||||
virtual void KeyframeDragMove(QMouseEvent *event, QString &tip){}
|
||||
virtual void KeyframeDragRelease(QMouseEvent *event, MultiUndoCommand *command){}
|
||||
virtual void KeyframeDragStart(QMouseEvent *event)
|
||||
{
|
||||
}
|
||||
virtual void KeyframeDragMove(QMouseEvent *event, QString &tip)
|
||||
{
|
||||
}
|
||||
virtual void KeyframeDragRelease(QMouseEvent *event,
|
||||
MultiUndoCommand *command)
|
||||
{
|
||||
}
|
||||
|
||||
void SelectKeyframe(NodeKeyframe *key);
|
||||
void SelectKeyframe(NodeKeyframe *key);
|
||||
|
||||
void DeselectKeyframe(NodeKeyframe *key);
|
||||
void DeselectKeyframe(NodeKeyframe *key);
|
||||
|
||||
bool IsKeyframeSelected(NodeKeyframe *key) const
|
||||
{
|
||||
return selection_manager_.IsSelected(key);
|
||||
}
|
||||
bool IsKeyframeSelected(NodeKeyframe *key) const
|
||||
{
|
||||
return selection_manager_.IsSelected(key);
|
||||
}
|
||||
|
||||
rational GetUnadjustedKeyframeTime(NodeKeyframe *key, const rational &time);
|
||||
rational GetUnadjustedKeyframeTime(NodeKeyframe *key)
|
||||
{
|
||||
return GetUnadjustedKeyframeTime(key, key->time());
|
||||
}
|
||||
rational GetUnadjustedKeyframeTime(NodeKeyframe *key, const rational &time);
|
||||
rational GetUnadjustedKeyframeTime(NodeKeyframe *key)
|
||||
{
|
||||
return GetUnadjustedKeyframeTime(key, key->time());
|
||||
}
|
||||
|
||||
rational GetAdjustedKeyframeTime(NodeKeyframe *key);
|
||||
rational GetAdjustedKeyframeTime(NodeKeyframe *key);
|
||||
|
||||
double GetKeyframeSceneX(NodeKeyframe *key);
|
||||
double GetKeyframeSceneX(NodeKeyframe *key);
|
||||
|
||||
virtual qreal GetKeyframeSceneY(KeyframeViewInputConnection *track, NodeKeyframe *key);
|
||||
virtual qreal GetKeyframeSceneY(KeyframeViewInputConnection *track,
|
||||
NodeKeyframe *key);
|
||||
|
||||
void SetAutoSelectSiblings(bool e)
|
||||
{
|
||||
autoselect_siblings_ = e;
|
||||
}
|
||||
void SetAutoSelectSiblings(bool e)
|
||||
{
|
||||
autoselect_siblings_ = e;
|
||||
}
|
||||
|
||||
virtual void SceneRectUpdateEvent(QRectF& rect) override;
|
||||
virtual void SceneRectUpdateEvent(QRectF &rect) override;
|
||||
|
||||
protected slots:
|
||||
void Redraw();
|
||||
void Redraw();
|
||||
|
||||
private:
|
||||
rational CalculateNewTimeFromScreen(const rational& old_time, double cursor_diff);
|
||||
rational CalculateNewTimeFromScreen(const rational &old_time,
|
||||
double cursor_diff);
|
||||
|
||||
QVector<KeyframeViewInputConnection*> tracks_;
|
||||
QVector<KeyframeViewInputConnection *> tracks_;
|
||||
|
||||
TimeBasedViewSelectionManager<NodeKeyframe> selection_manager_;
|
||||
TimeBasedViewSelectionManager<NodeKeyframe> selection_manager_;
|
||||
|
||||
bool autoselect_siblings_;
|
||||
bool autoselect_siblings_;
|
||||
|
||||
int max_scroll_;
|
||||
int max_scroll_;
|
||||
|
||||
bool first_chance_mouse_event_;
|
||||
bool first_chance_mouse_event_;
|
||||
|
||||
private slots:
|
||||
void ShowContextMenu();
|
||||
void ShowContextMenu();
|
||||
|
||||
void ShowKeyframePropertiesDialog();
|
||||
|
||||
void UpdateRubberBandForScroll();
|
||||
void ShowKeyframePropertiesDialog();
|
||||
|
||||
void UpdateRubberBandForScroll();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -22,79 +22,87 @@
|
||||
|
||||
#include "keyframeview.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
KeyframeViewInputConnection::KeyframeViewInputConnection(const NodeKeyframeTrackReference &input, KeyframeView *parent) :
|
||||
QObject(parent),
|
||||
keyframe_view_(parent),
|
||||
input_(input),
|
||||
y_(0),
|
||||
y_behavior_(kSingleRow),
|
||||
brush_(Qt::white)
|
||||
namespace olive
|
||||
{
|
||||
Node *n = input.input().node();
|
||||
|
||||
connect(n, &Node::KeyframeAdded, this, &KeyframeViewInputConnection::AddKeyframe);
|
||||
connect(n, &Node::KeyframeRemoved, this, &KeyframeViewInputConnection::RemoveKeyframe);
|
||||
connect(n, &Node::KeyframeTimeChanged, this, &KeyframeViewInputConnection::KeyframeChanged);
|
||||
connect(n, &Node::KeyframeTypeChanged, this, &KeyframeViewInputConnection::KeyframeChanged);
|
||||
connect(n, &Node::KeyframeTypeChanged, this, &KeyframeViewInputConnection::KeyframeTypeChanged);
|
||||
connect(n, &Node::KeyframeValueChanged, this, &KeyframeViewInputConnection::KeyframeChanged);
|
||||
KeyframeViewInputConnection::KeyframeViewInputConnection(
|
||||
const NodeKeyframeTrackReference &input, KeyframeView *parent)
|
||||
: QObject(parent)
|
||||
, keyframe_view_(parent)
|
||||
, input_(input)
|
||||
, y_(0)
|
||||
, y_behavior_(kSingleRow)
|
||||
, brush_(Qt::white)
|
||||
{
|
||||
Node *n = input.input().node();
|
||||
|
||||
connect(n, &Node::KeyframeAdded, this,
|
||||
&KeyframeViewInputConnection::AddKeyframe);
|
||||
connect(n, &Node::KeyframeRemoved, this,
|
||||
&KeyframeViewInputConnection::RemoveKeyframe);
|
||||
connect(n, &Node::KeyframeTimeChanged, this,
|
||||
&KeyframeViewInputConnection::KeyframeChanged);
|
||||
connect(n, &Node::KeyframeTypeChanged, this,
|
||||
&KeyframeViewInputConnection::KeyframeChanged);
|
||||
connect(n, &Node::KeyframeTypeChanged, this,
|
||||
&KeyframeViewInputConnection::KeyframeTypeChanged);
|
||||
connect(n, &Node::KeyframeValueChanged, this,
|
||||
&KeyframeViewInputConnection::KeyframeChanged);
|
||||
}
|
||||
|
||||
void KeyframeViewInputConnection::SetKeyframeY(int y)
|
||||
{
|
||||
if (y_ != y) {
|
||||
y_ = y;
|
||||
if (y_ != y) {
|
||||
y_ = y;
|
||||
|
||||
emit RequireUpdate();
|
||||
}
|
||||
emit RequireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void KeyframeViewInputConnection::SetYBehavior(YBehavior e)
|
||||
{
|
||||
if (y_behavior_ != e) {
|
||||
y_behavior_ = e;
|
||||
if (y_behavior_ != e) {
|
||||
y_behavior_ = e;
|
||||
|
||||
emit RequireUpdate();
|
||||
}
|
||||
emit RequireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void KeyframeViewInputConnection::SetBrush(const QBrush &brush)
|
||||
{
|
||||
if (brush_ != brush) {
|
||||
brush_ = brush;
|
||||
if (brush_ != brush) {
|
||||
brush_ = brush;
|
||||
|
||||
emit RequireUpdate();
|
||||
}
|
||||
emit RequireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void KeyframeViewInputConnection::AddKeyframe(NodeKeyframe *key)
|
||||
{
|
||||
if (key->key_track_ref() == input_) {
|
||||
emit RequireUpdate();
|
||||
}
|
||||
if (key->key_track_ref() == input_) {
|
||||
emit RequireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void KeyframeViewInputConnection::RemoveKeyframe(NodeKeyframe *key)
|
||||
{
|
||||
if (key->key_track_ref() == input_) {
|
||||
emit RequireUpdate();
|
||||
}
|
||||
if (key->key_track_ref() == input_) {
|
||||
emit RequireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void KeyframeViewInputConnection::KeyframeChanged(NodeKeyframe *key)
|
||||
{
|
||||
if (key->key_track_ref() == input_) {
|
||||
emit RequireUpdate();
|
||||
}
|
||||
if (key->key_track_ref() == input_) {
|
||||
emit RequireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void KeyframeViewInputConnection::KeyframeTypeChanged(NodeKeyframe *key)
|
||||
{
|
||||
if (key->key_track_ref() == input_) {
|
||||
emit TypeChanged();
|
||||
}
|
||||
if (key->key_track_ref() == input_) {
|
||||
emit TypeChanged();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,72 +26,72 @@
|
||||
#include "node/node.h"
|
||||
#include "node/param.h"
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
class KeyframeView;
|
||||
|
||||
class KeyframeViewInputConnection : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
class KeyframeViewInputConnection : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
KeyframeViewInputConnection(const NodeKeyframeTrackReference &input, KeyframeView *parent);
|
||||
KeyframeViewInputConnection(const NodeKeyframeTrackReference &input,
|
||||
KeyframeView *parent);
|
||||
|
||||
const int &GetKeyframeY() const
|
||||
{
|
||||
return y_;
|
||||
}
|
||||
const int &GetKeyframeY() const
|
||||
{
|
||||
return y_;
|
||||
}
|
||||
|
||||
void SetKeyframeY(int y);
|
||||
void SetKeyframeY(int y);
|
||||
|
||||
enum YBehavior {
|
||||
kSingleRow,
|
||||
kValueIsHeight
|
||||
};
|
||||
enum YBehavior { kSingleRow, kValueIsHeight };
|
||||
|
||||
void SetYBehavior(YBehavior e);
|
||||
void SetYBehavior(YBehavior e);
|
||||
|
||||
const QVector<NodeKeyframe*> &GetKeyframes() const
|
||||
{
|
||||
return input_.input().node()->GetKeyframeTracks(input_.input()).at(input_.track());
|
||||
}
|
||||
const QVector<NodeKeyframe *> &GetKeyframes() const
|
||||
{
|
||||
return input_.input()
|
||||
.node()
|
||||
->GetKeyframeTracks(input_.input())
|
||||
.at(input_.track());
|
||||
}
|
||||
|
||||
const QBrush &GetBrush() const
|
||||
{
|
||||
return brush_;
|
||||
}
|
||||
const QBrush &GetBrush() const
|
||||
{
|
||||
return brush_;
|
||||
}
|
||||
|
||||
const NodeKeyframeTrackReference &GetReference() const
|
||||
{
|
||||
return input_;
|
||||
}
|
||||
const NodeKeyframeTrackReference &GetReference() const
|
||||
{
|
||||
return input_;
|
||||
}
|
||||
|
||||
void SetBrush(const QBrush &brush);
|
||||
void SetBrush(const QBrush &brush);
|
||||
|
||||
signals:
|
||||
void RequireUpdate();
|
||||
void RequireUpdate();
|
||||
|
||||
void TypeChanged();
|
||||
void TypeChanged();
|
||||
|
||||
private:
|
||||
KeyframeView *keyframe_view_;
|
||||
KeyframeView *keyframe_view_;
|
||||
|
||||
NodeKeyframeTrackReference input_;
|
||||
NodeKeyframeTrackReference input_;
|
||||
|
||||
int y_;
|
||||
int y_;
|
||||
|
||||
YBehavior y_behavior_;
|
||||
YBehavior y_behavior_;
|
||||
|
||||
QBrush brush_;
|
||||
QBrush brush_;
|
||||
|
||||
private slots:
|
||||
void AddKeyframe(NodeKeyframe *key);
|
||||
void AddKeyframe(NodeKeyframe *key);
|
||||
|
||||
void RemoveKeyframe(NodeKeyframe *key);
|
||||
void RemoveKeyframe(NodeKeyframe *key);
|
||||
|
||||
void KeyframeChanged(NodeKeyframe *key);
|
||||
|
||||
void KeyframeTypeChanged(NodeKeyframe *key);
|
||||
void KeyframeChanged(NodeKeyframe *key);
|
||||
|
||||
void KeyframeTypeChanged(NodeKeyframe *key);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -23,59 +23,64 @@
|
||||
#include "node/node.h"
|
||||
#include "node/project/sequence/sequence.h"
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
KeyframeSetTypeCommand::KeyframeSetTypeCommand(NodeKeyframe* key, NodeKeyframe::Type type) :
|
||||
key_(key),
|
||||
old_type_(key->type()),
|
||||
new_type_(type)
|
||||
KeyframeSetTypeCommand::KeyframeSetTypeCommand(NodeKeyframe *key,
|
||||
NodeKeyframe::Type type)
|
||||
: key_(key)
|
||||
, old_type_(key->type())
|
||||
, new_type_(type)
|
||||
{
|
||||
}
|
||||
|
||||
Project *KeyframeSetTypeCommand::GetRelevantProject() const
|
||||
{
|
||||
return key_->parent()->project();
|
||||
return key_->parent()->project();
|
||||
}
|
||||
|
||||
void KeyframeSetTypeCommand::redo()
|
||||
{
|
||||
key_->set_type(new_type_);
|
||||
key_->set_type(new_type_);
|
||||
}
|
||||
|
||||
void KeyframeSetTypeCommand::undo()
|
||||
{
|
||||
key_->set_type(old_type_);
|
||||
key_->set_type(old_type_);
|
||||
}
|
||||
|
||||
KeyframeSetBezierControlPoint::KeyframeSetBezierControlPoint(NodeKeyframe* key, NodeKeyframe::BezierType mode, const QPointF& point) :
|
||||
key_(key),
|
||||
mode_(mode),
|
||||
old_point_(key->bezier_control(mode_)),
|
||||
new_point_(point)
|
||||
KeyframeSetBezierControlPoint::KeyframeSetBezierControlPoint(
|
||||
NodeKeyframe *key, NodeKeyframe::BezierType mode, const QPointF &point)
|
||||
: key_(key)
|
||||
, mode_(mode)
|
||||
, old_point_(key->bezier_control(mode_))
|
||||
, new_point_(point)
|
||||
{
|
||||
}
|
||||
|
||||
KeyframeSetBezierControlPoint::KeyframeSetBezierControlPoint(NodeKeyframe* key, NodeKeyframe::BezierType mode, const QPointF &new_point, const QPointF &old_point) :
|
||||
key_(key),
|
||||
mode_(mode),
|
||||
old_point_(old_point),
|
||||
new_point_(new_point)
|
||||
KeyframeSetBezierControlPoint::KeyframeSetBezierControlPoint(
|
||||
NodeKeyframe *key, NodeKeyframe::BezierType mode, const QPointF &new_point,
|
||||
const QPointF &old_point)
|
||||
: key_(key)
|
||||
, mode_(mode)
|
||||
, old_point_(old_point)
|
||||
, new_point_(new_point)
|
||||
{
|
||||
}
|
||||
|
||||
Project *KeyframeSetBezierControlPoint::GetRelevantProject() const
|
||||
{
|
||||
return key_->parent()->project();
|
||||
return key_->parent()->project();
|
||||
}
|
||||
|
||||
void KeyframeSetBezierControlPoint::redo()
|
||||
{
|
||||
key_->set_bezier_control(mode_, new_point_);
|
||||
key_->set_bezier_control(mode_, new_point_);
|
||||
}
|
||||
|
||||
void KeyframeSetBezierControlPoint::undo()
|
||||
{
|
||||
key_->set_bezier_control(mode_, old_point_);
|
||||
key_->set_bezier_control(mode_, old_point_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,47 +24,51 @@
|
||||
#include "node/keyframe.h"
|
||||
#include "undo/undocommand.h"
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
class KeyframeSetTypeCommand : public UndoCommand {
|
||||
public:
|
||||
KeyframeSetTypeCommand(NodeKeyframe* key, NodeKeyframe::Type type);
|
||||
KeyframeSetTypeCommand(NodeKeyframe *key, NodeKeyframe::Type type);
|
||||
|
||||
virtual Project* GetRelevantProject() const override;
|
||||
virtual Project *GetRelevantProject() const override;
|
||||
|
||||
protected:
|
||||
virtual void redo() override;
|
||||
virtual void undo() override;
|
||||
virtual void redo() override;
|
||||
virtual void undo() override;
|
||||
|
||||
private:
|
||||
NodeKeyframe* key_;
|
||||
NodeKeyframe *key_;
|
||||
|
||||
NodeKeyframe::Type old_type_;
|
||||
|
||||
NodeKeyframe::Type new_type_;
|
||||
NodeKeyframe::Type old_type_;
|
||||
|
||||
NodeKeyframe::Type new_type_;
|
||||
};
|
||||
|
||||
class KeyframeSetBezierControlPoint : public UndoCommand {
|
||||
public:
|
||||
KeyframeSetBezierControlPoint(NodeKeyframe* key, NodeKeyframe::BezierType mode, const QPointF& point);
|
||||
KeyframeSetBezierControlPoint(NodeKeyframe* key, NodeKeyframe::BezierType mode, const QPointF& new_point, const QPointF& old_point);
|
||||
KeyframeSetBezierControlPoint(NodeKeyframe *key,
|
||||
NodeKeyframe::BezierType mode,
|
||||
const QPointF &point);
|
||||
KeyframeSetBezierControlPoint(NodeKeyframe *key,
|
||||
NodeKeyframe::BezierType mode,
|
||||
const QPointF &new_point,
|
||||
const QPointF &old_point);
|
||||
|
||||
virtual Project* GetRelevantProject() const override;
|
||||
virtual Project *GetRelevantProject() const override;
|
||||
|
||||
protected:
|
||||
virtual void redo() override;
|
||||
virtual void undo() override;
|
||||
virtual void redo() override;
|
||||
virtual void undo() override;
|
||||
|
||||
private:
|
||||
NodeKeyframe* key_;
|
||||
NodeKeyframe *key_;
|
||||
|
||||
NodeKeyframe::BezierType mode_;
|
||||
NodeKeyframe::BezierType mode_;
|
||||
|
||||
QPointF old_point_;
|
||||
|
||||
QPointF new_point_;
|
||||
QPointF old_point_;
|
||||
|
||||
QPointF new_point_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user