hydrogen 1.1.1
Playlist Class Reference

Drumkit info. More...

#include <Playlist.h>

Inheritance diagram for Playlist:
Object

Data Structures

struct  Entry
 

Public Member Functions

 ~Playlist ()
 
void activateSong (int SongNumber)
 
int size () const
 
Entryget (int idx)
 
void clear ()
 
void add (Entry *entry)
 
void setNextSongByNumber (int SongNumber)
 
int getSelectedSongNr ()
 
void setSelectedSongNr (int songNumber)
 
int getActiveSongNumber ()
 
void setActiveSongNumber (int ActiveSongNumber)
 
bool getSongFilenameByNumber (int songNumber, QString &fileName)
 
const QString & getFilename ()
 
void setFilename (const QString &filename)
 
bool getIsModified ()
 
void setIsModified (bool IsModified)
 
bool save_file (const QString &pl_path, const QString &name, bool overwrite, bool useRelativePaths)
 
- Public Member Functions inherited from Object
 ~Object ()
 destructor More...
 
 Object (const Object &obj)
 copy constructor More...
 
 Object (const char *class_name)
 constructor More...
 
const char * class_name () const
 return the class name More...
 
virtual QString toQString (const QString &sPrefix, bool bShort=true) const
 Formatted string version for debugging purposes. More...
 
void Print (bool bShort=true) const
 Prints content of toQString() via DEBUGLOG. More...
 

Static Public Member Functions

static void create_instance ()
 If __instance equals 0, a new Playlist singleton will be created and stored in it. More...
 
static Playlistget_instance ()
 Returns a pointer to the current Playlist singleton stored in __instance. More...
 
static Playlistload (const QString &filename, bool useRelativePaths)
 
static Playlistload_file (const QString &pl_path, bool useRelativePaths)
 
- Static Public Member Functions inherited from Object
static void set_count (bool flag)
 enable/disable class instances counting More...
 
static bool count_active ()
 return true if class instances counting is enabled More...
 
static unsigned objects_count ()
 return the number of objects More...
 
static void write_objects_map_to (std::ostream &out)
 output the full objects map to a given ostream More...
 
static void write_objects_map_to_cerr ()
 output objects map to stderr More...
 
static int bootstrap (Logger *logger, bool count=false)
 must be called before any Object instantiation ! More...
 
static Loggerlogger ()
 return the logger instance More...
 

Private Member Functions

 Playlist ()
 
void execScript (int index)
 
void save_to (XMLNode *node, bool useRelativePaths)
 

Static Private Member Functions

static Playlistload_from (XMLNode *root, QFileInfo &fileInfo, bool useRelativePaths)
 

Private Attributes

QString __filename
 
std::vector< Entry * > __entries
 
int m_nSelectedSongNumber
 
int m_nActiveSongNumber
 
bool m_bIsModified
 

Static Private Attributes

static Playlist__instance = nullptr
 Object holding the current Playlist singleton. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Object
static QString sPrintIndention = " "
 String used to format the debugging string output of some core classes. More...
 
- Static Protected Attributes inherited from Object
static Logger__logger = nullptr
 logger instance pointer More...
 

Detailed Description

Drumkit info.

Constructor & Destructor Documentation

◆ ~Playlist()

~Playlist ( )

◆ Playlist()

Playlist ( )
private

Member Function Documentation

◆ activateSong()

void activateSong ( int  SongNumber)

◆ add()

void add ( Entry entry)
inline

◆ clear()

void clear ( )

◆ create_instance()

void create_instance ( )
static

If __instance equals 0, a new Playlist singleton will be created and stored in it.

It is called in Hydrogen::audioEngine_init().

◆ execScript()

void execScript ( int  index)
private

◆ get()

Playlist::Entry * get ( int  idx)
inline

◆ get_instance()

static Playlist * get_instance ( )
inlinestatic

Returns a pointer to the current Playlist singleton stored in __instance.

◆ getActiveSongNumber()

int getActiveSongNumber ( )
inline

◆ getFilename()

const QString & getFilename ( )
inline

◆ getIsModified()

bool getIsModified ( )
inline

◆ getSelectedSongNr()

int getSelectedSongNr ( )
inline

◆ getSongFilenameByNumber()

bool getSongFilenameByNumber ( int  songNumber,
QString &  fileName 
)

◆ load()

Playlist * load ( const QString &  filename,
bool  useRelativePaths 
)
static

◆ load_file()

Playlist * load_file ( const QString &  pl_path,
bool  useRelativePaths 
)
static

◆ load_from()

Playlist * load_from ( XMLNode root,
QFileInfo &  fileInfo,
bool  useRelativePaths 
)
staticprivate

◆ save_file()

bool save_file ( const QString &  pl_path,
const QString &  name,
bool  overwrite,
bool  useRelativePaths 
)

◆ save_to()

void save_to ( XMLNode node,
bool  useRelativePaths 
)
private

◆ setActiveSongNumber()

void setActiveSongNumber ( int  ActiveSongNumber)
inline

◆ setFilename()

void setFilename ( const QString &  filename)
inline

◆ setIsModified()

void setIsModified ( bool  IsModified)
inline

◆ setNextSongByNumber()

void setNextSongByNumber ( int  SongNumber)

◆ setSelectedSongNr()

void setSelectedSongNr ( int  songNumber)
inline

◆ size()

int size ( ) const
inline

Field Documentation

◆ __entries

std::vector<Entry*> __entries
private

◆ __filename

QString __filename
private

◆ __instance

Playlist * __instance = nullptr
staticprivate

Object holding the current Playlist singleton.

It is initialized with NULL, set with create_instance(), and accessed with get_instance().

◆ m_bIsModified

bool m_bIsModified
private

◆ m_nActiveSongNumber

int m_nActiveSongNumber
private

◆ m_nSelectedSongNumber

int m_nSelectedSongNumber
private