FuncDoodle
Loading...
Searching...
No Matches
FuncDoodle::InsertFrameAction Class Reference

Inserts a frame into a project with undo support. More...

#include <Frame.h>

Inheritance diagram for FuncDoodle::InsertFrameAction:
FuncDoodle::Action

Public Member Functions

 InsertFrameAction (unsigned long frameI, const SharedPtr< ProjectFile > &proj)
 Creates an empty insert-frame action.
 InsertFrameAction (unsigned long frameI, Frame *frame, const SharedPtr< ProjectFile > &proj)
 Creates an insert-frame action with frame data.
void Undo () override
 Removes inserted frame.
void Redo () override
 Re-inserts frame.
Public Member Functions inherited from FuncDoodle::Action
virtual ~Action ()=default
 Virtual destructor for safe polymorphic destruction.

Private Attributes

unsigned long m_FrameIndex
 Frame index affected.
bool m_Empty
 Whether frame data exists.
std::optional< Framem_Frame
 Stored frame data.
WeakPtr< ProjectFilem_Proj
 Owning project.

Detailed Description

Inserts a frame into a project with undo support.

Constructor & Destructor Documentation

◆ InsertFrameAction() [1/2]

FuncDoodle::InsertFrameAction::InsertFrameAction ( unsigned long frameI,
const SharedPtr< ProjectFile > & proj )
inline

Creates an empty insert-frame action.

◆ InsertFrameAction() [2/2]

FuncDoodle::InsertFrameAction::InsertFrameAction ( unsigned long frameI,
Frame * frame,
const SharedPtr< ProjectFile > & proj )
inline

Creates an insert-frame action with frame data.

Member Function Documentation

◆ Redo()

void FuncDoodle::InsertFrameAction::Redo ( )
overridevirtual

Re-inserts frame.

Implements FuncDoodle::Action.

◆ Undo()

void FuncDoodle::InsertFrameAction::Undo ( )
overridevirtual

Removes inserted frame.

Implements FuncDoodle::Action.

Member Data Documentation

◆ m_Empty

bool FuncDoodle::InsertFrameAction::m_Empty
private

Whether frame data exists.

◆ m_Frame

std::optional<Frame> FuncDoodle::InsertFrameAction::m_Frame
private

Stored frame data.

◆ m_FrameIndex

unsigned long FuncDoodle::InsertFrameAction::m_FrameIndex
private

Frame index affected.

◆ m_Proj

WeakPtr<ProjectFile> FuncDoodle::InsertFrameAction::m_Proj
private

Owning project.


The documentation for this class was generated from the following files: