![]()  | 
  
    Songbook-Client
    0.7
    
   This application is a manager of customguitar songbooks 
   | 
 
CChord is an object representing a guitar/ukulele chord. More...
#include <chord.hh>
Public Types | |
| enum | StringCount { GuitarStringCount = 6, UkuleleStringCount = 4 } | 
| enum | Instrument { Guitar, Ukulele } | 
Public Member Functions | |
| CChord (const QString &chord="\\gtab{}{0:}", QObject *parent=0) | |
| Constructor.  | |
| ~CChord () | |
| Destructor.  | |
| bool | isValid () const | 
| QString | toString () | 
| void | fromString (const QString >ab) | 
| QPixmap * | toPixmap () | 
| QString | name () const | 
| void | setName (const QString &name) | 
| QString | fret () const | 
| void | setFret (const QString &fret) | 
| QString | strings () const | 
| void | setStrings (const QString &strings) | 
| Instrument | instrument () const | 
| void | setInstrument (const Instrument &instrument) | 
| bool | isImportant () const | 
| void | setImportant (bool value) | 
| QColor | color () | 
| void | setDrawBorder (bool value) | 
CChord is an object representing a guitar/ukulele chord.
A chord has a text and a graphical representation.
The text representation follows the syntax introduced by the Songs LaTeX Package (http://songs.sourceforge.net):
Regarding its graphical representation, a chord is a grid (diagram) where vertical lines correspond to strings and horizontal lines to frets:
| enum CChord::Instrument | 
| enum CChord::StringCount | 
| QColor CChord::color | ( | ) | 
Returns the chord color. The color is based on the instrument (guitar: blue; ukulele: purple) and whether or not it is important (yes: dark; no: light).
| QString CChord::fret | ( | ) | const | 
Returns the fret number. For example, given a E-flat minor chord
returns 5.
| void CChord::fromString | ( | const QString & | gtab | ) | 
Builds a chord from a string.
| CChord::Instrument CChord::instrument | ( | ) | const | 
Returns the instrument of the chord. For example, given a E-flat minor chord
returns Instrument::Guitar.
| bool CChord::isImportant | ( | ) | const | 
Returns true if the chord is important; false otherwise. Non important chords are well-known fingering for usual chords such as
| bool CChord::isValid | ( | ) | const | 
Returns true if the chord is valid; false otherwise. A valid chord has a non-empty chord name and a number of strings that matches its instrument.
| QString CChord::name | ( | ) | const | 
Returns the chord name. For example, given a E-flat minor chord
returns E&m.
| void CChord::setDrawBorder | ( | bool | value | ) | 
Draws a rounded path around the whole diagram if value is true. Default is false. The rounded path takes the color of the chord.
| void CChord::setFret | ( | const QString & | fret | ) | 
Sets the fret number fret.
| void CChord::setImportant | ( | bool | value | ) | 
Marks a chord as important; default is false.
| void CChord::setInstrument | ( | const Instrument & | instrument | ) | 
Sets the instrument instrument.
| void CChord::setName | ( | const QString & | name | ) | 
Sets the chord name name.
| void CChord::setStrings | ( | const QString & | strings | ) | 
Sets the strings strings.
| QString CChord::strings | ( | ) | const | 
Returns the chord strings. For example, given a E-flat minor chord
returns X02210.
| QPixmap * CChord::toPixmap | ( | ) | 
Returns the graphical representation (diagram) of the chord.
| QString CChord::toString | ( | ) | 
Returns the string representation of the chord.
 1.8.1.1