Songbook-Client  0.7
This application is a manager of customguitar songbooks
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Slots | Signals | Public Member Functions | Properties
CSongbook Class Reference

CSongbook is the model representing a songbook. More...

#include <songbook.hh>

Inheritance diagram for CSongbook:
Inheritance graph
[legend]
Collaboration diagram for CSongbook:
Collaboration graph
[legend]

List of all members.

Public Slots

void setFilename (const QString &filename)
void setTmpl (const QString &tmpl)
void setSongs (QStringList songs)
void reset ()
void save (const QString &filename)
void load (const QString &filename)
void setModified (bool value)
void changeTemplate (const QString &filename=QString())
void checkAll ()
void uncheckAll ()
void toggleAll ()
void setChecked (const QModelIndex &index, bool value)
void toggle (const QModelIndex &index)

Signals

void wasModified (bool modified)
void songsChanged ()

Public Member Functions

 CSongbook (QObject *parent)
 Constructor.
 ~CSongbook ()
 Destructor.
QString workingPath () const
void setLibrary (CLibrary *library)
CLibrarylibrary () const
QString filename () const
QString tmpl () const
int selectedCount () const
void selectLanguages (const QStringList &languages)
void songsFromSelection ()
void songsToSelection ()
QStringList songs ()
bool isModified ()
void initializeEditor (QtGroupBoxPropertyBrowser *editor)
bool isChecked (const QModelIndex &index)
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
virtual Qt::ItemFlags flags (const QModelIndex &index) const
virtual bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
- Public Member Functions inherited from CIdentityProxyModel
 CIdentityProxyModel (QObject *parent=0)
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
virtual QModelIndex parent (const QModelIndex &index) const
virtual QModelIndex mapFromSource (const QModelIndex &sourceIndex) const
virtual QModelIndex mapToSource (const QModelIndex &proxyIndex) const
virtual void setSourceModel (QAbstractItemModel *sourceModel)

Properties

bool modified
QString filename
QString tmpl
QStringList songs

Detailed Description

CSongbook is the model representing a songbook.

A songbook is a composed of a list of songs and a set of options that defines its PDF output.

A CSongbook class extracts the list of selected songs in CLibraryView, manages all the songbook options through the QtGroupBoxPropertyBrowser framework, and can be saved/loaded as a .sb file.

LaTeX options than can be used within a songbook are defined in a template file (.tmpl) that is located in the songbook application's template/ directory.


Member Function Documentation

void CSongbook::changeTemplate ( const QString &  filename = QString())
slot

Changes the current template (.tmpl file) of the songbook.

See also:
tmpl, setTmpl
void CSongbook::checkAll ( )
slot

Check all songs.

See also:
uncheckAll, toggleAll
QString CSongbook::filename ( ) const

Returns the filename of the songbook file (.sb).

See also:
setFilename
void CSongbook::initializeEditor ( QtGroupBoxPropertyBrowser *  editor)

Initialize the template editor.

bool CSongbook::isChecked ( const QModelIndex &  index)

Returns true if the song at position index is checked; false otherwise.

bool CSongbook::isModified ( )

Returns true if this songbook has unsaved modifications; false otherwise.

See also:
setModified
CLibrary * CSongbook::library ( ) const

Returns the library.

See also:
setLibrary
void CSongbook::load ( const QString &  filename)
slot

Loads a songbook from the file filename (.sb file).

See also:
save
void CSongbook::reset ( )
slot

Resets the model.

void CSongbook::save ( const QString &  filename)
slot

Saves this songbook (.sb file) in the file filename.

See also:
load
int CSongbook::selectedCount ( ) const

Returns the number of selected songs for this songbook.

void CSongbook::setChecked ( const QModelIndex &  index,
bool  value 
)
slot

Sets the song at position index as checked according to value.

See also:
isChecked, checkAll, uncheckAll, toggleAll
void CSongbook::setFilename ( const QString &  filename)
slot

Sets filename the filename of the songbook.

See also:
filename
void CSongbook::setLibrary ( CLibrary library)

Associates the library library with this songbook.

See also:
library
void CSongbook::setModified ( bool  value)
slot

Sets the songbook as modified according to value.

See also:
isModified
void CSongbook::setSongs ( QStringList  songs)
slot

Sets songs as the list of songs of the songbook.

See also:
songs
void CSongbook::setTmpl ( const QString &  tmpl)
slot

Sets tmpl as the template filename of the songbook.

See also:
tmpl
QStringList CSongbook::songs ( )

Returns the list of songs of this songbook.

See also:
songsToSelection
void CSongbook::songsFromSelection ( )

Updates the list of songs of the songbook from current selection.

See also:
songsToSelection
void CSongbook::songsToSelection ( )

Updates the selection from the list of songs of the songbook.

See also:
songsToSelection
QString CSongbook::tmpl ( ) const

Returns the current template for this songbook (.tmpl).

See also:
setTmpl
void CSongbook::toggle ( const QModelIndex &  index)
slot

Toggles the selection of the song at position index.

See also:
isChecked, setChecked, checkAll, uncheckAll, toggleAll
void CSongbook::toggleAll ( )
slot

Toggle selection for all songs.

See also:
checkAll, uncheckAll
void CSongbook::uncheckAll ( )
slot

Uncheck all songs.

See also:
checkAll, toggleAll
QString CSongbook::workingPath ( ) const

Returns the absolute path to the songbook directory.


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