Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::backend::FileImporter Class Reference
Inheritance diagram for zrythm::gui::backend::FileImporter:
Collaboration diagram for zrythm::gui::backend::FileImporter:

Public Types

enum class  FileType { Audio , Midi , Unsupported }
 Enumeration for supported file types. More...

Public Member Functions

 FileImporter (undo::UndoStack &undo_stack, ::zrythm::actions::ArrangerObjectCreator &arranger_object_creator, ::zrythm::actions::TrackCreator &track_creator, QObject *parent=nullptr)
Q_INVOKABLE void importFiles (const QStringList &filePaths, double startTicks, structure::tracks::Track *track) const
 Imports the given file.
Q_INVOKABLE void importFileToClipSlot (const QString &filePath, structure::tracks::Track *track, structure::scenes::Scene *scene, structure::scenes::ClipSlot *clipSlot) const
Q_INVOKABLE FileType getFileType (const QString &filePath) const
 Determines the type of a file.
Q_INVOKABLE bool isAudioFile (const QString &filePath) const
 Checks if a file is an audio file.
Q_INVOKABLE bool isMidiFile (const QString &filePath) const
 Checks if a file is a MIDI file.

Detailed Description

Definition at line 15 of file file_importer.h.

Member Enumeration Documentation

◆ FileType

Enumeration for supported file types.

Definition at line 31 of file file_importer.h.

Member Function Documentation

◆ getFileType()

Q_INVOKABLE FileType zrythm::gui::backend::FileImporter::getFileType ( const QString & filePath) const

Determines the type of a file.

Parameters
filePathPath to the file to check.
Returns
FileType indicating whether the file is audio, MIDI, or unsupported.

◆ importFiles()

Q_INVOKABLE void zrythm::gui::backend::FileImporter::importFiles ( const QStringList & filePaths,
double startTicks,
structure::tracks::Track * track ) const

Imports the given file.

Parameters
pathFile to import.
startTicksStart ticks to place file contents at, or 0.
trackTrack to import in (optional).

◆ isAudioFile()

Q_INVOKABLE bool zrythm::gui::backend::FileImporter::isAudioFile ( const QString & filePath) const

Checks if a file is an audio file.

Parameters
filePathPath to the file to check.
Returns
true if the file is a supported audio format, false otherwise.

◆ isMidiFile()

Q_INVOKABLE bool zrythm::gui::backend::FileImporter::isMidiFile ( const QString & filePath) const

Checks if a file is a MIDI file.

Parameters
filePathPath to the file to check.
Returns
true if the file is a valid MIDI file, false otherwise.

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