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

CSongHeaderEditor is a widget that manages a Song metadata in a CSongEditor. More...

#include <song-header-editor.hh>

List of all members.

Public Types

enum  ViewMode { FullViewMode, MiniViewMode }

Public Slots

void update ()
void toggleView ()

Signals

void contentsChanged ()
void languageChanged (const QLocale &)

Public Member Functions

 CSongHeaderEditor (QWidget *parent=0)
 Constructor.
 ~CSongHeaderEditor ()
 Destructor.
Songsong ()
CSongEditorsongEditor () const
void setSongEditor (CSongEditor *songEditor)
const QImage & cover ()
void setLibrary (CLibrary *library)
LineEdit * titleLineEdit () const
LineEdit * artistLineEdit () const
QSize sizeHint () const

Detailed Description

CSongHeaderEditor is a widget that manages a Song metadata in a CSongEditor.

A Song is composed of a header (metadata) and a body (lyrics). The CSongHeaderEditor hides the plain text of the song's header to present them in a more user-friendly way through appropriated QWidgets that allow to fill the fields such as artist name, album, cover, capo etc.

Two different views can be toggled:


Member Enumeration Documentation

This enum describes available view modes for CSongHeaderEditor objects.

Enumerator:
FullViewMode 

full view: displays cover, song options and chords (editable).

MiniViewMode 

mini view: displays mini cover, artist and title (read-only).


Member Function Documentation

LineEdit * CSongHeaderEditor::artistLineEdit ( ) const

Returns the artist line edit widget.

void CSongHeaderEditor::contentsChanged ( )
signal

This signal is emitted when any of the contents in the header is changed.

const QImage & CSongHeaderEditor::cover ( )

Getter on the song's cover

Returns:
the cover
void CSongHeaderEditor::languageChanged ( const QLocale &  )
signal

This signal is emitted when the language of the song is changed.

void CSongHeaderEditor::setLibrary ( CLibrary library)

Sets the library library. The library is used to provide completion models for title and artist line edits.

void CSongHeaderEditor::setSongEditor ( CSongEditor songEditor)

Setter on the embedding SongEditor

Parameters:
songEditorthe embedding song editor
QSize CSongHeaderEditor::sizeHint ( ) const

Returns the preferred size of the widget.

Song & CSongHeaderEditor::song ( )

Getter on the song from whose metadata is used to build this instance of CSongHeaderEditor.

Returns:
the Song
CSongEditor * CSongHeaderEditor::songEditor ( ) const

Getter on the embedding SongEditor

Returns:
the embedding song editor
LineEdit * CSongHeaderEditor::titleLineEdit ( ) const

Returns the title line edit widget.

void CSongHeaderEditor::toggleView ( )
slot

Toggles between full-view mode and mini-view mode.

void CSongHeaderEditor::update ( )
slot

Updates the elements of the header from the song contents.


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