![]()  | 
  
    Songbook-Client
    0.7
    
   This application is a manager of customguitar songbooks 
   | 
 
CSongbook is the model representing a songbook. More...
#include <songbook.hh>


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) | 
| CLibrary * | library () 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 | 
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.
      
  | 
  slot | 
Changes the current template (.tmpl file) of the songbook.
      
  | 
  slot | 
Check all songs.
| QString CSongbook::filename | ( | ) | const | 
Returns the filename of the songbook file (.sb).
| 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.
| CLibrary * CSongbook::library | ( | ) | const | 
Returns the library.
      
  | 
  slot | 
Loads a songbook from the file filename (.sb file).
      
  | 
  slot | 
Resets the model.
      
  | 
  slot | 
Saves this songbook (.sb file) in the file filename.
| int CSongbook::selectedCount | ( | ) | const | 
Returns the number of selected songs for this songbook.
      
  | 
  slot | 
Sets the song at position index as checked according to value.
      
  | 
  slot | 
Sets filename the filename of the songbook.
| void CSongbook::setLibrary | ( | CLibrary * | library | ) | 
Associates the library library with this songbook.
      
  | 
  slot | 
Sets the songbook as modified according to value.
      
  | 
  slot | 
Sets songs as the list of songs of the songbook.
      
  | 
  slot | 
Sets tmpl as the template filename of the songbook.
| QStringList CSongbook::songs | ( | ) | 
Returns the list of songs of this songbook.
| void CSongbook::songsFromSelection | ( | ) | 
Updates the list of songs of the songbook from current selection.
| void CSongbook::songsToSelection | ( | ) | 
Updates the selection from the list of songs of the songbook.
| QString CSongbook::tmpl | ( | ) | const | 
Returns the current template for this songbook (.tmpl).
      
  | 
  slot | 
Toggles the selection of the song at position index.
      
  | 
  slot | 
Toggle selection for all songs.
| QString CSongbook::workingPath | ( | ) | const | 
Returns the absolute path to the songbook directory.
 1.8.1.1