Songbook-Client  0.7
This application is a manager of customguitar songbooks
 All Classes Files Functions Variables Enumerations Enumerator Pages
Static Public Member Functions | Public Attributes | Static Public Attributes
Song Struct Reference

Song is the internal representation of a song. More...

#include "song.hh"

List of all members.

Static Public Member Functions

static Song fromFile (const QString &path)
static Song fromString (const QString &text, const QString &path=QString())
static QString toString (const Song &song)
static QLocale::Language languageFromString (const QString &languageName=QString())
static QString languageToString (const QLocale::Language language)
static QString latexToUtf8 (const QString &str)
static QString utf8ToLatex (const QString &str)

Public Attributes

QString title
QString artist
QString album
QString originalSong
QString url
QString coverName
QString coverPath
QString path
QLocale locale
bool isLilypond
int columnCount
int capo
int transpose
QStringList gtabs
QStringList utabs
QStringList lyrics
QStringList scripture

Static Public Attributes

static QRegExp reSgFile
static QRegExp reArtist
static QRegExp reAlbum
static QRegExp reOriginalSong
static QRegExp reUrl
static QRegExp reCoverName
static QRegExp reLilypond
static QRegExp reLanguage
static QRegExp reColumnCount
static QRegExp reCapo
static QRegExp reTranspose
static QRegExp reCover
static QRegExp reBlankLine
static QRegExp reGtab
static QRegExp reUtab
static QRegExp reBegin
static QRegExp reEnd
static QRegExp reBeginVerse
static QRegExp reEndVerse
static QRegExp reBeginBridge
static QRegExp reEndBridge
static QRegExp reBeginChorus
static QRegExp reEndChorus
static QRegExp reBeginScripture
static QRegExp reEndScripture

Detailed Description

Song is the internal representation of a song.

Provides the internal representation of a song from a songbook library.


Member Function Documentation

Song Song::fromFile ( const QString &  path)
static

Constructs a Song object from a file whose absolute path is path.

See also:
fromString, toString
Song Song::fromString ( const QString &  text,
const QString &  path = QString() 
)
static

Constructs a Song object whose content is text.

See also:
fromString, toString
QLocale::Language Song::languageFromString ( const QString &  languageName = QString())
static

Converts a language string languageName to a QLocale object. Language strings are usually strings used by babel (LaTeX module). For example: english, french etc.

See also:
languageToString
QString Song::languageToString ( const QLocale::Language  language)
static

Converts a QLocale object language as a plain string (ie english, french) that can be used by babel (LaTeX module).

See also:
languageFromString
QString Song::latexToUtf8 ( const QString &  str)
static

Converts LaTeX special sequences to utf8 characters. For example: \'e -> é.

See also:
utf8ToLatex
QString Song::toString ( const Song song)
static

Returns the contents of the song song.

See also:
fromString, fromFile
QString Song::utf8ToLatex ( const QString &  str)
static

Converts some utf8 characters to LaTeX sequences. For example: & -> &.

See also:
latexToUtf8

Member Data Documentation

QString Song::album

the album of the song.

QString Song::artist

the artist of the song.

int Song::capo

the capo of the song.

int Song::columnCount

the number of columns of the song in the PDF.

QString Song::coverName

the cover file name (relative, without extension).

QString Song::coverPath

the cover file name (absolute).

QStringList Song::gtabs

the list of guitar chords.

bool Song::isLilypond

true if the song contains lilypond sheets.

QLocale Song::locale

the locale of the song.

QStringList Song::lyrics

the song contents.

QString Song::originalSong

the original song.

QString Song::path

the path of the .sg file (absolute).

QRegExp Song::reAlbum
static

Extracts the album of the song from a .sg file.

QRegExp Song::reArtist
static

Extracts the artist of the song from a .sg file.

QRegExp Song::reBegin
static

Finds starting LaTeX environments.

QRegExp Song::reBeginBridge
static

Finds starting bridge environments.

QRegExp Song::reBeginChorus
static

Finds starting chorus environments.

QRegExp Song::reBeginScripture
static

Finds starting scripture environments.

QRegExp Song::reBeginVerse
static

Finds starting verse environments.

QRegExp Song::reBlankLine
static

Finds blank lines.

QRegExp Song::reCapo
static

Extracts the capo of the song from a .sg file.

QRegExp Song::reColumnCount
static

Extracts the number of columns of the song from a .sg file.

QRegExp Song::reCover
static

Extracts the cover filename associated with the song from a .sg file.

QRegExp Song::reCoverName
static

Extracts the cover of the song from a .sg file.

QRegExp Song::reEnd
static

Finds ending LaTeX environments.

QRegExp Song::reEndBridge
static

Finds ending bridge environments.

QRegExp Song::reEndChorus
static

Finds ending chorus environments.

QRegExp Song::reEndScripture
static

Finds ending scripture environments.

QRegExp Song::reEndVerse
static

Finds ending verse environments.

QRegExp Song::reGtab
static

Extracts gtab macros (guitar diagrams) that are used for CChord objects.

QRegExp Song::reLanguage
static

Extracts the language of the song from a .sg file.

QRegExp Song::reLilypond
static

Looks for lilypond macros within a .sg file.

QRegExp Song::reOriginalSong
static

Extracts the original song of the song from a .sg file.

QRegExp Song::reSgFile
static

Extracts the contents of a .sg file. This regular expression captures 5 fields:

  • everything before \beginsong (prefix)
  • the song title
  • the song options (such as artist name, album, cover etc) (options)
  • the song contents
  • everything after \endsong (post)
QRegExp Song::reTranspose
static

Extracts the transposition information of the song from a .sg file.

QRegExp Song::reUrl
static

Extracts the artist website of the song from a .sg file.

QRegExp Song::reUtab
static

Extracts utab macros (ukulele diagrams) that are used for CChord objects.

QStringList Song::scripture

the song scriptures (comments/notes at the end in the PDF).

QString Song::title

the title of the song.

int Song::transpose

the transposition information.

QString Song::url

the website of the artist.

QStringList Song::utabs

the list of ukulele chords.


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