6#include "dsp/chord_descriptor.h"
7#include "gui/backend/backend/actions/undoable_action.h"
9namespace zrythm::gui::actions
15class ChordAction :
public QObject,
public UndoableAction
19 DEFINE_UNDOABLE_ACTION_QML_PROPERTIES (ChordAction)
47 const std::vector<ChordDescriptor> &chords_before,
48 const std::vector<ChordDescriptor> &chords_after,
49 QObject * parent =
nullptr);
58 const ChordDescriptor &chord,
60 QObject * parent =
nullptr);
64 friend void init_from (
66 const ChordAction &other,
70 void init_loaded_impl ()
override { }
71 void perform_impl ()
override;
72 void undo_impl ()
override;
74 void do_or_undo (
bool do_it);
79 ChordDescriptor chord_before_;
80 ChordDescriptor chord_after_;
A ChordDescriptor describes a chord and is not linked to any specific object by itself.
Action for chord pad changes.
std::vector< ChordDescriptor > chords_after_
Chords after the change.
Type
Type of chord action.
@ Single
Change single chord.
ChordAction(const ChordDescriptor &chord, int chord_idx, QObject *parent=nullptr)
Creates a new action for changing a single chord.
std::vector< ChordDescriptor > chords_before_
Chords before the change.
QString to_string() const override
Stringizes the action to be used in Undo/Redo buttons.
ChordAction(const std::vector< ChordDescriptor > &chords_before, const std::vector< ChordDescriptor > &chords_after, QObject *parent=nullptr)
Creates a new action for changing all chords.