ardour
|
Virtual interface class for element importers. More...
#include <element_importer.h>
Public Member Functions | |
ElementImporter (XMLTree const &source, ARDOUR::Session &session) | |
virtual | ~ElementImporter () |
virtual std::string | get_name () const |
virtual std::string | get_info () const =0 |
virtual ImportStatus * | get_import_status () |
bool | prepare_move () |
void | cancel_move () |
void | move () |
Moves the element to the taget session. More... | |
bool | broken () |
Check if element is broken. Cannot be moved if broken. More... | |
Static Public Attributes | |
static PBD::Signal2< std::pair < bool, std::string > , std::string, std::string > | Rename |
Signal that requests for anew name. More... | |
static PBD::Signal1< bool, std::string > | Prompt |
Signal for ok/cancel prompting. More... | |
Protected Member Functions | |
virtual void | _move ()=0 |
virtual bool | _prepare_move ()=0 |
virtual void | _cancel_move ()=0 |
Cancel move. More... | |
bool | queued () |
Ture if the element has been prepared and queued for importing. More... | |
std::string | timecode_to_string (Timecode::Time &time) const |
Converts timecode time to a string. More... | |
framecnt_t | rate_convert_samples (framecnt_t samples) const |
Converts samples so that times match the sessions sample rate. More... | |
std::string | rate_convert_samples (std::string const &samples) const |
Converts samples so that times match the sessions sample rate (for straight use in XML) More... | |
void | set_broken () |
Set element broken. More... | |
Protected Attributes | |
XMLTree const & | source |
Source XML-tree. More... | |
ARDOUR::Session & | session |
Target session. More... | |
std::string | name |
Name of element. More... | |
framecnt_t | sample_rate |
The sample rate of the session from which we are importing. More... | |
Private Attributes | |
bool | _queued |
bool | _broken |
Virtual interface class for element importers.
Definition at line 38 of file element_importer.h.
ElementImporter::ElementImporter | ( | XMLTree const & | source, |
ARDOUR::Session & | session | ||
) |
Definition at line 38 of file element_importer.cc.
|
virtual |
Definition at line 53 of file element_importer.cc.
|
protectedpure virtual |
Cancel move.
Implemented in ARDOUR::AudioRegionImporter, ARDOUR::AudioPlaylistImporter, ARDOUR::AudioTrackImporter, ARDOUR::LocationImporter, and ARDOUR::TempoMapImporter.
|
protectedpure virtual |
Moves the element to the taget session In addition to actually adding the element to the session changing ids, renaming files etc. should be taken care of.
Implemented in ARDOUR::AudioRegionImporter, ARDOUR::AudioPlaylistImporter, ARDOUR::AudioTrackImporter, ARDOUR::LocationImporter, and ARDOUR::TempoMapImporter.
|
protectedpure virtual |
Should take care of all tasks that need to be done before moving the element. This includes prompting the user for more information if necessary.
Implemented in ARDOUR::AudioRegionImporter, ARDOUR::AudioPlaylistImporter, ARDOUR::AudioTrackImporter, ARDOUR::LocationImporter, and ARDOUR::TempoMapImporter.
|
inline |
Check if element is broken. Cannot be moved if broken.
Definition at line 73 of file element_importer.h.
void ElementImporter::cancel_move | ( | ) |
Cancels moving of element If the element has been set to be moved, this cancels the move.
Definition at line 75 of file element_importer.cc.
|
inlinevirtual |
Gets import status, if applicable.
Reimplemented in ARDOUR::AudioRegionImporter.
Definition at line 56 of file element_importer.h.
|
pure virtual |
Gets a textual representation of the element
Implemented in ARDOUR::AudioRegionImporter, ARDOUR::AudioPlaylistImporter, ARDOUR::AudioTrackImporter, ARDOUR::LocationImporter, and ARDOUR::TempoMapImporter.
|
inlinevirtual |
Returns the element name
Definition at line 48 of file element_importer.h.
void ElementImporter::move | ( | ) |
Moves the element to the taget session.
Definition at line 58 of file element_importer.cc.
bool ElementImporter::prepare_move | ( | ) |
Prepares to move element
Definition at line 65 of file element_importer.cc.
|
inlineprotected |
Ture if the element has been prepared and queued for importing.
Definition at line 107 of file element_importer.h.
|
protected |
Converts samples so that times match the sessions sample rate.
Definition at line 99 of file element_importer.cc.
|
protected |
Converts samples so that times match the sessions sample rate (for straight use in XML)
|
inlineprotected |
Set element broken.
Definition at line 125 of file element_importer.h.
|
protected |
Converts timecode time to a string.
Definition at line 82 of file element_importer.cc.
|
private |
Definition at line 129 of file element_importer.h.
|
private |
Definition at line 128 of file element_importer.h.
|
protected |
Name of element.
Definition at line 110 of file element_importer.h.
|
static |
Signal for ok/cancel prompting.
Definition at line 79 of file element_importer.h.
|
static |
Signal that requests for anew name.
Definition at line 76 of file element_importer.h.
|
protected |
The sample rate of the session from which we are importing.
Definition at line 113 of file element_importer.h.
|
protected |
Target session.
Definition at line 104 of file element_importer.h.
|
protected |
Source XML-tree.
Definition at line 101 of file element_importer.h.