liblives
2.4.1-svn
|
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) | |
class "set".
Represents a list of clips and/or layouts which are open in LiVES. May be obtained from livesApp::getSet().
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.
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.
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.
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.
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.
unsigned int lives::set::numClips | ( | ) | const |
|
inline |
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.
name | name to save set as, or empty livesString to let the user choose a name. |
force_append | set to true to force appending to another existing set. |
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.
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.
name | the name of the set |