Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Track Class Referenceabstract

#include "gui/model/track.hpp"

Description

The model representation of a track.

This is the abstract base class for all types of track that are implemented.

Definition at line 51 of file track.hpp.

Public Member Functions

virtual ~Track ()
 
virtual bool can_host_children () const
 this is an interface More...
 
virtual shared_ptr< ParentTrackfind_descendant_track_parent (shared_ptr< Track > child)
 A utility function that attempts to find the parent of a track by searching through the tree from this track downward. More...
 
virtual const list< shared_ptr
< Track > > & 
get_child_tracks () const
 Gets the list of child tracks. More...
 
const std::string get_name () const
 Gets the name of this track. More...
 
bool getEnabled () const
 Gets the enabled status of this track, i.e. More...
 
bool getLocked () const
 Gets the locked status of this track, i.e. More...
 
std::string print_branch ()
 A debugging helper function that prints this track, and all it's child tracks in a human-readable form. More...
 
virtual std::string print_track ()=0
 A pure-virtual function which is the base of functions that print this track in human readable form. More...
 
void set_name (const std::string &name)
 Sets the name of this track. More...
 
void setEnabled (bool enabled)
 Sets the enabled status of this track, i.e. More...
 
void setLocked (bool locked)
 Gets the locked status of this track, i.e. More...
 
sigc::signal< void, bool > signalEnabledChanged () const
 A signal which fires when the enabled status changes. More...
 
sigc::signal< void, bool > signalLockedChanged () const
 A signal which fires when the locked status changes changes. More...
 
sigc::signal< void, std::string > signalNameChanged () const
 A signal which fires when the name changes. More...
 

Protected Member Functions

 Track ()
 Constructor. More...
 
std::string print_branch_recursive (const unsigned int indentation)
 The internal implementation of print_branch. More...
 

Static Protected Attributes

static const std::list
< shared_ptr< Track > > 
NoChildren
 An object used internally as a return value for when there's no children. More...
 

Private Attributes

bool enabled
 True if this track is enabled, i.e. More...
 
sigc::signal< void, bool > enabledChangedSignal
 A signal which fires when the enabled status changes. More...
 
bool locked
 True if this track is locked, i.e. More...
 
sigc::signal< void, bool > lockedChangedSignal
 A signal which fires when the locked status changes. More...
 
std::string name
 The name of this track. More...
 
sigc::signal< void, std::string > nameChangedSignal
 A signal which fires when the name changes. More...
 

Constructor & Destructor Documentation

Track ( )
protected

Constructor.

Definition at line 50 of file track.cpp.

~Track ( )
virtual

Definition at line 55 of file track.cpp.

Member Function Documentation

bool can_host_children ( ) const
virtual

this is an interface

Returns true if this track can own any child tracks.

Reimplemented in ParentTrack.

Definition at line 104 of file track.cpp.

const list< shared_ptr< Track > > & get_child_tracks ( ) const
virtual

Gets the list of child tracks.

Reimplemented in ParentTrack.

Definition at line 59 of file track.cpp.

References Track::NoChildren.

Referenced by Track::print_branch_recursive().

+ Here is the caller graph for this function:

bool getEnabled ( ) const

Gets the enabled status of this track, i.e.

if the track is to be rendered.

Definition at line 65 of file track.cpp.

References Track::enabled.

bool getLocked ( ) const

Gets the locked status of this track, i.e.

if the track can be edited.

Definition at line 71 of file track.cpp.

References Track::locked.

const string get_name ( ) const

Gets the name of this track.

Definition at line 77 of file track.cpp.

References Track::name.

Referenced by ClipTrack::print_track(), GroupTrack::print_track(), and Sequence::print_track().

+ Here is the caller graph for this function:

void setEnabled ( bool  enabled)

Sets the enabled status of this track, i.e.

if the track is to be rendered.

Parameters
[in]nameThe new enabled status.

Definition at line 83 of file track.cpp.

References Track::enabled, and Track::enabledChangedSignal.

void setLocked ( bool  locked)

Gets the locked status of this track, i.e.

if the track can be edited.

Parameters
[in]nameThe new locked status.

Definition at line 90 of file track.cpp.

References Track::locked, and Track::lockedChangedSignal.

void set_name ( const std::string &  name)

Sets the name of this track.

Parameters
[in]nameThe new name to set this track to.

Definition at line 97 of file track.cpp.

References Track::name, and Track::nameChangedSignal.

shared_ptr< ParentTrack > find_descendant_track_parent ( shared_ptr< Track child)
virtual

A utility function that attempts to find the parent of a track by searching through the tree from this track downward.

Parameters
childThe child track to find the parent of.
Returns
Returns the parent track if one was found, or an empty shared_ptr if none was found.

Reimplemented in ParentTrack.

Definition at line 116 of file track.cpp.

sigc::signal< void, bool > signalEnabledChanged ( ) const

A signal which fires when the enabled status changes.

Returns
Returns the signal. The signal sends the new name for the track.

Definition at line 122 of file track.cpp.

References Track::enabledChangedSignal.

sigc::signal< void, bool > signalLockedChanged ( ) const

A signal which fires when the locked status changes changes.

Returns
Returns the signal. The signal sends the new name for the track.

Definition at line 128 of file track.cpp.

References Track::lockedChangedSignal.

sigc::signal< void, std::string > signalNameChanged ( ) const

A signal which fires when the name changes.

Returns
Returns the signal. The signal sends the new name for the track.

Definition at line 134 of file track.cpp.

References Track::nameChangedSignal.

string print_branch ( )

A debugging helper function that prints this track, and all it's child tracks in a human-readable form.

Returns
Returns the human readable string.

Definition at line 110 of file track.cpp.

References Track::print_branch_recursive().

Referenced by Sequence::populateDummySequence().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual std::string print_track ( )
pure virtual

A pure-virtual function which is the base of functions that print this track in human readable form.

Returns
Returns the human readable string.

Implemented in Sequence, GroupTrack, and ClipTrack.

Referenced by Track::print_branch_recursive().

+ Here is the caller graph for this function:

string print_branch_recursive ( const unsigned int  indentation)
protected

The internal implementation of print_branch.

Parameters
indentationThe level of recursion into the tree. This value is used to specify the width of indentation to print with.
Returns
Returns the human readable string.

Definition at line 140 of file track.cpp.

References Track::get_child_tracks(), and Track::print_track().

Referenced by Track::print_branch().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

const list< shared_ptr< Track > > NoChildren
staticprotected

An object used internally as a return value for when there's no children.

Definition at line 168 of file track.hpp.

Referenced by Track::get_child_tracks().

std::string name
private

The name of this track.

Definition at line 183 of file track.hpp.

Referenced by Track::get_name(), and Track::set_name().

bool enabled
private

True if this track is enabled, i.e.

will not be rendered.

Definition at line 188 of file track.hpp.

Referenced by Track::getEnabled(), and Track::setEnabled().

bool locked
private

True if this track is locked, i.e.

cannot be edited.

Definition at line 193 of file track.hpp.

Referenced by Track::getLocked(), and Track::setLocked().

sigc::signal<void, bool> enabledChangedSignal
private

A signal which fires when the enabled status changes.

Definition at line 198 of file track.hpp.

Referenced by Track::setEnabled(), and Track::signalEnabledChanged().

sigc::signal<void, bool> lockedChangedSignal
private

A signal which fires when the locked status changes.

Definition at line 203 of file track.hpp.

Referenced by Track::setLocked(), and Track::signalLockedChanged().

sigc::signal<void, std::string> nameChangedSignal
private

A signal which fires when the name changes.

Definition at line 208 of file track.hpp.

Referenced by Track::set_name(), and Track::signalNameChanged().

+ Inheritance diagram for Track:
+ Collaboration diagram for Track:

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