|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
Represents a file-based resource that is used in a project. More...
#include "tracktion_ProjectItem.h"
Public Types | |
| enum class | Category { none , edit , recorded , exports , archives , imported , rendered , frozen , video } |
| enum class | RenameMode { always , local , never } |
| enum class | SetNameMode { doDefault , forceRename , forceNoRename } |
| enum class | FileMode { absolute , relative , relativeIfWithinProject } |
| using | Ptr = juce::ReferenceCountedObjectPtr< ProjectItem > |
| using | Array = juce::ReferenceCountedArray< ProjectItem > |
Public Types inherited from tracktion::engine::Selectable | |
| using | WeakRef = juce::WeakReference< Selectable > |
Public Member Functions | |
| ProjectItem (Engine &, ProjectItemID, juce::InputStream *) | |
| Loads a ProjectItem from a stream that was saved using writeToStream(). | |
| ProjectItem (Engine &, const juce::String &name, const juce::String &type, const juce::String &desc, const juce::String &file, Category, double length, ProjectItemID) | |
| Creates a ProjectItem with some settings. | |
| juce::String | getSelectableDescription () override |
| Subclasses must return a description of what they are. | |
| void | selectionStatusChanged (bool isNowSelected) override |
| Can be overridden to tell this object that it has just been selected or deselected. | |
| ProjectItemID | getID () const noexcept |
| juce::ReferenceCountedObjectPtr< Project > | getProject () const |
| bool | hasBeenDeleted () const |
| const juce::String & | getType () const |
| bool | isWave () const noexcept |
| bool | isMidi () const noexcept |
| bool | isEdit () const noexcept |
| bool | isVideo () const noexcept |
| const juce::String & | getName () const |
| void | setName (const juce::String &name, SetNameMode mode) |
| Category | getCategory () const |
| void | setCategory (Category cat) |
| juce::String | getNamedProperty (const juce::String &name) const |
| void | setNamedProperty (const juce::String &name, const juce::String &value) |
| juce::String | getDescription () const |
| void | setDescription (const juce::String &newDesc) |
| juce::Array< TimePosition > | getMarkedPoints () const |
| optional set of interesting time markers, for wave files | |
| void | setMarkedPoints (const juce::Array< TimePosition > &points) |
| void | copyAllPropertiesFrom (const ProjectItem &other) |
| copies the full description, categories, properties, etc. | |
| bool | convertEditFile () |
| double | getLength () const |
| void | setLength (double length) |
| juce::String | getProjectName () const |
| name of the project it's inside. | |
| juce::File | getEditPreviewFile () const |
| Returns the file that should be used as a preview for this Edit. | |
| juce::File | getEditThumbnailFile () const |
| Returns the file that should be used as a visual preview for this Edit. | |
| juce::File | getSourceFile () |
| juce::String | getRawFileName () const |
| juce::String | getFileName () const |
| void | setSourceFile (const juce::File &, FileMode mode=FileMode::relativeIfWithinProject) |
| bool | isForFile (const juce::File &) |
| bool | isAbsolutePath () const |
| void | convertToRelativePath () |
| void | convertToAbsolutePath () |
| void | renameSourceFile () |
| lets the user rename the file. | |
| Ptr | createCopy () |
| Creates a copy of this object and returns the copy. | |
| void | sendChange () |
| bool | copySectionToNewFile (const juce::File &destFile, juce::File &actualFileCreated, double startTime, double length) |
| the actual file created may differ, e.g. | |
| bool | deleteSourceFile () |
| void | verifyLength () |
| Updates the stored length value in this object. | |
| void | changeProjectId (int oldID, int newID) |
| used when moving to another project. | |
| void | writeToStream (juce::OutputStream &) const |
| juce::StringArray | getSearchTokens () const |
| Returns a list of search strings for this object, by chopping up the name and description into words. | |
Public Member Functions inherited from tracktion::engine::Selectable | |
| virtual void | changed () |
| This should be called to send a change notification to any SelectableListeners that are registered with this object. | |
| virtual void | selectableAboutToBeDeleted () |
| Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. | |
| void | addListener (SelectableListener *) |
| void | removeListener (SelectableListener *) |
| void | addSelectableListener (SelectableListener *) |
| void | removeSelectableListener (SelectableListener *) |
| void | cancelAnyPendingUpdates () |
| If changed() has been called, this will cancel any pending async change notificaions. | |
| void | deselect () |
| void | propertiesChanged () |
| void | notifyListenersOfDeletion () |
| WeakRef | getWeakRef () |
Public Member Functions inherited from juce::ReferenceCountedObject | |
| void | incReferenceCount () noexcept |
| void | decReferenceCount () noexcept |
| bool | decReferenceCountWithoutDeleting () noexcept |
| int | getReferenceCount () const noexcept |
Static Public Member Functions | |
| static const char * | waveItemType () noexcept |
| static const char * | editItemType () noexcept |
| static const char * | midiItemType () noexcept |
| static const char * | videoItemType () noexcept |
Static Public Member Functions inherited from tracktion::engine::Selectable | |
| static void | initialise () |
| static bool | isSelectableValid (const Selectable *) noexcept |
| checks whether this object has been deleted. | |
Public Attributes | |
| Engine & | engine |
| The Engine instance this belongs to. | |
Public Attributes inherited from tracktion::engine::Selectable | |
| WeakRef::Master | masterReference |
Friends | |
| class | ProjectManager |
| class | Project |
Additional Inherited Members | |
Protected Member Functions inherited from juce::ReferenceCountedObject | |
| ReferenceCountedObject (const ReferenceCountedObject &) noexcept | |
| ReferenceCountedObject (ReferenceCountedObject &&) noexcept | |
| ReferenceCountedObject & | operator= (const ReferenceCountedObject &) noexcept |
| ReferenceCountedObject & | operator= (ReferenceCountedObject &&) noexcept |
| void | resetReferenceCount () noexcept |
Represents a file-based resource that is used in a project.
This might be an edit, audio file, midi file, etc.
Definition at line 18 of file tracktion_ProjectItem.h.
Definition at line 53 of file tracktion_ProjectItem.h.
Definition at line 52 of file tracktion_ProjectItem.h.
|
strong |
Definition at line 25 of file tracktion_ProjectItem.h.
|
strong |
Definition at line 135 of file tracktion_ProjectItem.h.
|
strong |
Definition at line 38 of file tracktion_ProjectItem.h.
|
strong |
Definition at line 45 of file tracktion_ProjectItem.h.
| tracktion::engine::ProjectItem::ProjectItem | ( | Engine & | e, |
| ProjectItemID | id, | ||
| juce::InputStream * | in | ||
| ) |
Loads a ProjectItem from a stream that was saved using writeToStream().
Definition at line 238 of file tracktion_ProjectItem.cpp.
| tracktion::engine::ProjectItem::ProjectItem | ( | Engine & | e, |
| const juce::String & | name, | ||
| const juce::String & | type, | ||
| const juce::String & | desc, | ||
| const juce::String & | file, | ||
| ProjectItem::Category | category_, | ||
| double | length, | ||
| ProjectItemID | id | ||
| ) |
Creates a ProjectItem with some settings.
Definition at line 210 of file tracktion_ProjectItem.cpp.
|
override |
Definition at line 248 of file tracktion_ProjectItem.cpp.
used when moving to another project.
Definition at line 809 of file tracktion_ProjectItem.cpp.
| bool tracktion::engine::ProjectItem::convertEditFile | ( | ) |
Definition at line 644 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::convertToAbsolutePath | ( | ) |
Definition at line 386 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::convertToRelativePath | ( | ) |
Definition at line 378 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::copyAllPropertiesFrom | ( | const ProjectItem & | other | ) |
copies the full description, categories, properties, etc.
Definition at line 569 of file tracktion_ProjectItem.cpp.
| bool tracktion::engine::ProjectItem::copySectionToNewFile | ( | const juce::File & | destFile, |
| juce::File & | actualFileCreated, | ||
| double | startTime, | ||
| double | length | ||
| ) |
the actual file created may differ, e.g.
if an ogg file is chopped up and has to become a wav.
Definition at line 742 of file tracktion_ProjectItem.cpp.
| ProjectItem::Ptr tracktion::engine::ProjectItem::createCopy | ( | ) |
Creates a copy of this object and returns the copy.
Definition at line 829 of file tracktion_ProjectItem.cpp.
| bool tracktion::engine::ProjectItem::deleteSourceFile | ( | ) |
Definition at line 762 of file tracktion_ProjectItem.cpp.
|
staticnoexcept |
Definition at line 85 of file tracktion_ProjectItem.h.
| ProjectItem::Category tracktion::engine::ProjectItem::getCategory | ( | ) | const |
Definition at line 529 of file tracktion_ProjectItem.cpp.
| juce::String tracktion::engine::ProjectItem::getDescription | ( | ) | const |
Definition at line 550 of file tracktion_ProjectItem.cpp.
| juce::File tracktion::engine::ProjectItem::getEditPreviewFile | ( | ) | const |
Returns the file that should be used as a preview for this Edit.
Definition at line 417 of file tracktion_ProjectItem.cpp.
| juce::File tracktion::engine::ProjectItem::getEditThumbnailFile | ( | ) | const |
Returns the file that should be used as a visual preview for this Edit.
Definition at line 432 of file tracktion_ProjectItem.cpp.
| juce::String tracktion::engine::ProjectItem::getFileName | ( | ) | const |
Definition at line 404 of file tracktion_ProjectItem.cpp.
|
noexcept |
Definition at line 77 of file tracktion_ProjectItem.h.
| double tracktion::engine::ProjectItem::getLength | ( | ) | const |
Definition at line 686 of file tracktion_ProjectItem.cpp.
| juce::Array< TimePosition > tracktion::engine::ProjectItem::getMarkedPoints | ( | ) | const |
optional set of interesting time markers, for wave files
Definition at line 608 of file tracktion_ProjectItem.cpp.
| const juce::String & tracktion::engine::ProjectItem::getName | ( | ) | const |
Definition at line 461 of file tracktion_ProjectItem.cpp.
| juce::String tracktion::engine::ProjectItem::getNamedProperty | ( | const juce::String & | name | ) | const |
Definition at line 575 of file tracktion_ProjectItem.cpp.
| Project::Ptr tracktion::engine::ProjectItem::getProject | ( | ) | const |
Definition at line 448 of file tracktion_ProjectItem.cpp.
| juce::String tracktion::engine::ProjectItem::getProjectName | ( | ) | const |
name of the project it's inside.
Definition at line 700 of file tracktion_ProjectItem.cpp.
| juce::String tracktion::engine::ProjectItem::getRawFileName | ( | ) | const |
Definition at line 132 of file tracktion_ProjectItem.h.
| juce::StringArray tracktion::engine::ProjectItem::getSearchTokens | ( | ) | const |
Returns a list of search strings for this object, by chopping up the name and description into words.
Definition at line 916 of file tracktion_ProjectItem.cpp.
|
overridevirtual |
Subclasses must return a description of what they are.
Implements tracktion::engine::Selectable.
Definition at line 270 of file tracktion_ProjectItem.cpp.
| juce::File tracktion::engine::ProjectItem::getSourceFile | ( | ) |
Definition at line 313 of file tracktion_ProjectItem.cpp.
| const juce::String & tracktion::engine::ProjectItem::getType | ( | ) | const |
Definition at line 545 of file tracktion_ProjectItem.cpp.
| bool tracktion::engine::ProjectItem::hasBeenDeleted | ( | ) | const |
Definition at line 453 of file tracktion_ProjectItem.cpp.
| bool tracktion::engine::ProjectItem::isAbsolutePath | ( | ) | const |
Definition at line 373 of file tracktion_ProjectItem.cpp.
|
noexcept |
Definition at line 93 of file tracktion_ProjectItem.h.
| bool tracktion::engine::ProjectItem::isForFile | ( | const juce::File & | f | ) |
Definition at line 339 of file tracktion_ProjectItem.cpp.
|
noexcept |
Definition at line 92 of file tracktion_ProjectItem.h.
|
noexcept |
Definition at line 94 of file tracktion_ProjectItem.h.
|
noexcept |
Definition at line 91 of file tracktion_ProjectItem.h.
|
staticnoexcept |
Definition at line 86 of file tracktion_ProjectItem.h.
|
overridevirtual |
Can be overridden to tell this object that it has just been selected or deselected.
Reimplemented from tracktion::engine::Selectable.
Definition at line 279 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::sendChange | ( | ) |
Definition at line 262 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::setCategory | ( | ProjectItem::Category | cat | ) |
Definition at line 539 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::setDescription | ( | const juce::String & | newDesc | ) |
Definition at line 555 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::setLength | ( | double | length | ) |
Definition at line 691 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::setMarkedPoints | ( | const juce::Array< TimePosition > & | points | ) |
Definition at line 625 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::setName | ( | const juce::String & | name, |
| SetNameMode | mode | ||
| ) |
Definition at line 466 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::setNamedProperty | ( | const juce::String & | name, |
| const juce::String & | value | ||
| ) |
Definition at line 587 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::setSourceFile | ( | const juce::File & | f, |
| FileMode | mode = FileMode::relativeIfWithinProject |
||
| ) |
Definition at line 347 of file tracktion_ProjectItem.cpp.
| void tracktion::engine::ProjectItem::verifyLength | ( | ) |
Updates the stored length value in this object.
Definition at line 709 of file tracktion_ProjectItem.cpp.
|
staticnoexcept |
Definition at line 87 of file tracktion_ProjectItem.h.
|
staticnoexcept |
Definition at line 84 of file tracktion_ProjectItem.h.
| void tracktion::engine::ProjectItem::writeToStream | ( | juce::OutputStream & | out | ) | const |
Definition at line 253 of file tracktion_ProjectItem.cpp.
|
friend |
Definition at line 185 of file tracktion_ProjectItem.h.
|
friend |
Definition at line 184 of file tracktion_ProjectItem.h.
| Engine& tracktion::engine::ProjectItem::engine |
The Engine instance this belongs to.
Definition at line 181 of file tracktion_ProjectItem.h.