liblives  2.4.1-svn
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Protected Member Functions | List of all members
lives::set Class Reference

class "set". More...

#include <liblives.hpp>

Public Member Functions

bool isValid () const
 Returns whether the set is valid or not. More...
 
livesString name () const
 Returns the current name of the set. More...
 
bool setName (livesString name=livesString()) const
 Set the name of the current set. More...
 
bool save (livesString name, bool force_append=false) const
 Save the set, and close all open clips and layouts. More...
 
bool save () const
 Save the set, and close all open clips and layouts. More...
 
unsigned int numClips () const
 Returns the number of clips in the set. More...
 
clip nthClip (unsigned int n) const
 Returns the nth clip in the set. More...
 
int indexOf (clip c) const
 Returns the index of a clip in the currentSet. More...
 
livesStringList layoutNames (unsigned int n) const
 Returns a list of layout names for this set. More...
 
bool operator== (const set &other) const
 

Protected Member Functions

 set (livesApp *lives=NULL)
 

Detailed Description

class "set".

Represents a list of clips and/or layouts which are open in LiVES. May be obtained from livesApp::getSet().

See Also
livesApp::getSet()

Member Function Documentation

int lives::set::indexOf ( clip  c) const

Returns the index of a clip in the currentSet.

If the clip is not in the current set, then -1 is returned. If the set is invalid or the clip is invalid, returns -1.

Returns
the index of the clip in the set.
See Also
nthClip().
numClips().
bool lives::set::isValid ( ) const

Returns whether the set is valid or not.

The set is valid if belongs to a valid livesApp, and the livesApp::status() is not LIVES_STATUS_NOTREADY.

Returns
true if the set is valid (associated with a valid livesApp instance).
livesStringList lives::set::layoutNames ( unsigned int  n) const

Returns a list of layout names for this set.

If the set is invalid, returns an empty livesStringList.

Returns
a list of layout names for this set.
See Also
livesApp::reloadLayout().
livesString lives::set::name ( ) const

Returns the current name of the set.

If it has not been defined, an empty livesString is returned. If the set is invalid, an empty livesString is returned.

Returns
livesString name.
clip lives::set::nthClip ( unsigned int  n) const

Returns the nth clip in the set.

If n >= numClips(), returns an invalid clip. If the set is invalid, returns an invalid clip.

Returns
the nth clip in the set.
See Also
indexOf().
numClips().
unsigned int lives::set::numClips ( ) const

Returns the number of clips in the set.

If the set is invalid, returns 0.

Returns
number of clips.
See Also
indexOf().
nthClip().
bool lives::set::operator== ( const set other) const
inline
Returns
true if the two sets belong to the same livesApp.
bool lives::set::save ( livesString  name,
bool  force_append = false 
) const

Save the set, and close all open clips and layouts.

If the set name is empty, the user can choose the name via the GUI. If livesApp::interactive() is false, the user may not cancel. If the name is defined, and it points to a different, existing set, the set will not be saved and false will be returned, unless force_append is set to true, in which case the current clips and layouts will be appended to the other set. Saving a set with a new name is an expensive operation as it requires moving files in the underlying filesystem. See setName() for the rules on valid set names.

Parameters
namename to save set as, or empty livesString to let the user choose a name.
force_appendset to true to force appending to another existing set.
Returns
true if the set was saved.
bool lives::set::save ( ) const

Save the set, and close all open clips and layouts.

The current set name() is used. If the set name is not defined, the user will be prompted to enter it at runtime.

Returns
true if the set was saved.
bool lives::set::setName ( livesString  name = livesString()) const

Set the name of the current set.

Only works if there are clips loaded, and the livesApp::status() is LIVES_STATUS_READY. Can only be done if the current set has no name. You need to do this before saving a layout if the current set has no name. If name is an empty string, the user can choose the name at runtime. If livesApp::interactive() is false, the user can cancel. Valid set names may not be empty, begin with a "." or contain spaces or the characters / \ * or ". The set name must not be in use by another copy of LiVES. The maximum length of a set name is 128 characters.

Parameters
namethe name of the set
Returns
true if the name was set.
See Also
name().

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