Skip to main content

ExportVideoWidgetState

ExportVideoWidgetState

State class for Export_Video_Widget. More…

#include <ExportVideoWidgetState.hpp>

Inherits from EditorState, QObject

Public Signals

Name
void selectedMediaWidgetIdChanged(QString const & id)
Emitted when the selected media widget changes.
void outputFilenameChanged(QString const & filename)
Emitted when the output filename changes.
void startFrameChanged(int frame)
Emitted when the start frame changes.
void endFrameChanged(int frame)
Emitted when the end frame changes.
void frameRateChanged(int rate)
Emitted when the frame rate changes.
void outputDimensionsChanged(int width, int height)
Emitted when the output dimensions change.

Public Functions

Name
ExportVideoWidgetState(QObject * parent =[nullptr])
Construct a new ExportVideoWidgetState.
~ExportVideoWidgetState() override =default
virtual QString getTypeName() const override
Get the type name for this state.
virtual QString getDisplayName() const override
Get the display name for UI.
virtual void setDisplayName(QString const & name) override
Set the display name.
virtual std::string toJson() const override
Serialize state to JSON.
virtual bool fromJson(std::string const & json) override
Restore state from JSON.
void setSelectedMediaWidgetId(QString const & id)
Set the selected media widget ID for export.
QString selectedMediaWidgetId() const
Get the selected media widget ID.
void setOutputFilename(QString const & filename)
Set the output filename.
QString outputFilename() const
Get the output filename.
void setStartFrame(int frame)
Set the start frame.
int startFrame() const
Get the start frame.
void setEndFrame(int frame)
Set the end frame.
int endFrame() const
Get the end frame.
void setFrameRate(int rate)
Set the frame rate.
int frameRate() const
Get the frame rate.
void setOutputWidth(int width)
Set the output width.
int outputWidth() const
Get the output width.
void setOutputHeight(int height)
Set the output height.
int outputHeight() const
Get the output height.

Additional inherited members

Public Signals inherited from EditorState

Name
void stateChanged()
Emitted when any state property changes.
void displayNameChanged(QString const & newName)
Emitted when display name changes.
void dirtyChanged(bool isDirty)
Emitted when dirty state changes.

Public Functions inherited from EditorState

Name
EditorState(QObject * parent =[nullptr])
Construct a new EditorState.
~EditorState() override =default
Virtual destructor.
QString getInstanceId() const
Get unique instance ID.
bool isDirty() const
Check if state has unsaved changes.
void markClean()
Mark state as clean (after save).

Protected Functions inherited from EditorState

Name
void markDirty()
Mark state as modified.
void setInstanceId(QString const & id)
Set instance ID (for deserialization).
QString generateInstanceId()
Generate a new unique instance ID.

Detailed Description

class ExportVideoWidgetState;

State class for Export_Video_Widget.

ExportVideoWidgetState is a single-instance widget state that manages the video export configuration.

Usage


// Create state (typically done by EditorCreationController)
auto state = std::make_shared<ExportVideoWidgetState>();
registry->registerState(state);

// Serialize for workspace save
std::string json = state->toJson();

Public Signals Documentation

signal selectedMediaWidgetIdChanged

void selectedMediaWidgetIdChanged(
    QString const & id
)

Emitted when the selected media widget changes.

Parameters:

  • id The new media widget ID

signal outputFilenameChanged

void outputFilenameChanged(
    QString const & filename
)

Emitted when the output filename changes.

Parameters:

  • filename The new filename

signal startFrameChanged

void startFrameChanged(
    int frame
)

Emitted when the start frame changes.

Parameters:

  • frame The new start frame

signal endFrameChanged

void endFrameChanged(
    int frame
)

Emitted when the end frame changes.

Parameters:

  • frame The new end frame

signal frameRateChanged

void frameRateChanged(
    int rate
)

Emitted when the frame rate changes.

Parameters:

  • rate The new frame rate

signal outputDimensionsChanged

void outputDimensionsChanged(
    int width,
    int height
)

Emitted when the output dimensions change.

Parameters:

  • width The new width
  • height The new height

Public Functions Documentation

function ExportVideoWidgetState

explicit ExportVideoWidgetState(
    QObject * parent =nullptr
)

Construct a new ExportVideoWidgetState.

Parameters:

  • parent Parent QObject (typically nullptr, managed by WorkspaceManager)

function ~ExportVideoWidgetState

~ExportVideoWidgetState() override =default

function getTypeName

inline virtual QString getTypeName() const override

Get the type name for this state.

Return: “ExportVideoWidget”

Reimplements: EditorState::getTypeName

function getDisplayName

virtual QString getDisplayName() const override

Get the display name for UI.

Return: User-visible name (default: “Video Export”)

Reimplements: EditorState::getDisplayName

function setDisplayName

virtual void setDisplayName(
    QString const & name
) override

Set the display name.

Parameters:

  • name New display name

Reimplements: EditorState::setDisplayName

function toJson

virtual std::string toJson() const override

Serialize state to JSON.

Return: JSON string representation

Reimplements: EditorState::toJson

function fromJson

virtual bool fromJson(
    std::string const & json
) override

Restore state from JSON.

Parameters:

  • json JSON string to parse

Return: true if parsing succeeded

Reimplements: EditorState::fromJson

function setSelectedMediaWidgetId

void setSelectedMediaWidgetId(
    QString const & id
)

Set the selected media widget ID for export.

Parameters:

  • id Media widget instance ID

function selectedMediaWidgetId

QString selectedMediaWidgetId() const

Get the selected media widget ID.

Return: Currently selected media widget ID, or empty string if none

function setOutputFilename

void setOutputFilename(
    QString const & filename
)

Set the output filename.

Parameters:

  • filename Output filename

function outputFilename

QString outputFilename() const

Get the output filename.

Return: Output filename

function setStartFrame

void setStartFrame(
    int frame
)

Set the start frame.

Parameters:

  • frame Start frame number

function startFrame

int startFrame() const

Get the start frame.

Return: Start frame number

function setEndFrame

void setEndFrame(
    int frame
)

Set the end frame.

Parameters:

  • frame End frame number

function endFrame

int endFrame() const

Get the end frame.

Return: End frame number

function setFrameRate

void setFrameRate(
    int rate
)

Set the frame rate.

Parameters:

  • rate Frame rate (fps)

function frameRate

int frameRate() const

Get the frame rate.

Return: Frame rate (fps)

function setOutputWidth

void setOutputWidth(
    int width
)

Set the output width.

Parameters:

  • width Output video width

function outputWidth

int outputWidth() const

Get the output width.

Return: Output video width

function setOutputHeight

void setOutputHeight(
    int height
)

Set the output height.

Parameters:

  • height Output video height

function outputHeight

int outputHeight() const

Get the output height.

Return: Output video height


Updated on 2026-11-13 at 20:25:40 +0000