Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Slots | Signals | Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | Friends
CASourceViewPort Class Reference

Widget that shows the current score source in various syntax. More...

#include <sourceviewport.h>

Inheritance diagram for CASourceViewPort:
Inheritance graph
[legend]

List of all members.

Classes

class  CATextEdit

Public Slots

void rebuild ()

Signals

void CACommit (QString documentString)

Public Member Functions

 CASourceViewPort (CADocument *doc, QWidget *parent=0)
 CASourceViewPort (CAVoice *voice, QWidget *parent=0)
 CASourceViewPort (CALyricsContext *lc, QWidget *parent=0)
virtual ~CASourceViewPort ()
CASourceViewPortclone ()
CASourceViewPortclone (QWidget *parent)
CASourceViewPortType sourceViewPortType ()
void setSourceViewPortType (CASourceViewPortType t)
CADocumentdocument ()
CAVoicevoice ()
CALyricsContextlyricsContext ()
void setDocument (CADocument *doc)
void setVoice (CAVoice *voice)
void setLyricsContext (CALyricsContext *c)
void selectAll ()

Private Types

enum  CASourceViewPortType { LilyPond, CanorusML }

Private Slots

void on_commit_clicked ()

Private Member Functions

void setupUI ()

Private Attributes

QTextEdit_textEdit
QPushButton * _commit
QPushButton * _revert
QGridLayout * _layout
CASourceViewPortType _sourceViewPortType
CADocument_document
CAVoice_voice
CALyricsContext_lyricsContext

Friends

class CASourceViewPort::CATextEdit

Detailed Description

Widget that shows the current score source in various syntax.

This widget is a viewport which shows in the main text area the syntax of the current score (or voice, staff). It includes 2 buttons for committing the changes to the score and reverting any changes back from the score.

See also:
CAScoreViewPort

Member Enumeration Documentation

Enumerator:
LilyPond 
CanorusML 

Constructor & Destructor Documentation

CASourceViewPort::CASourceViewPort ( CADocument doc,
QWidget parent = 0 
)
    Constructor for CanorusML syntax - requires the whole document.
Todo:
This should be merged in the future with other formats.

References _document, _lyricsContext, _voice, CanorusML, setSourceViewPortType(), setupUI(), CAViewPort::setViewPortType(), and CAViewPort::SourceViewPort.

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:

CASourceViewPort::CASourceViewPort ( CAVoice voice,
QWidget parent = 0 
)
    Constructor for LilyPond syntax - requires the current voice.
Todo:
This should be merged in the future with other formats.

References _document, _lyricsContext, _voice, LilyPond, setSourceViewPortType(), setupUI(), CAViewPort::setViewPortType(), CAViewPort::SourceViewPort, and voice().

Here is the call graph for this function:

    Constructor for LilyPond syntax - requires the current lyrics context to show the lyrics.
Todo:
This should be merged in the future with other formats.

References _document, _lyricsContext, _voice, LilyPond, setSourceViewPortType(), setupUI(), CAViewPort::setViewPortType(), and CAViewPort::SourceViewPort.

Here is the call graph for this function:

References _commit, _layout, _revert, and _textEdit.


Member Function Documentation

void CASourceViewPort::CACommit ( QString  documentString) [signal]

Referenced by on_commit_clicked().

Here is the caller graph for this function:

Returns a pointer to the new cloned viewport with the same parent. This function is usually called when a user creates a new docked view.

Implements CAViewPort.

References CASourceViewPort(), document(), lyricsContext(), and voice().

Here is the call graph for this function:

Returns a pointer to the new cloned viewport with the parent parent. This function is usually called when a user creates a new undocked view.

Implements CAViewPort.

References CASourceViewPort(), document(), lyricsContext(), and voice().

Here is the call graph for this function:

References _document.

Referenced by clone(), rebuild(), CAMainWin::sourceViewPortCommit(), and CAUndoCommand::undoDocument().

Here is the caller graph for this function:

References _lyricsContext.

Referenced by clone(), rebuild(), CAMainWin::removeSheet(), CAMainWin::sourceViewPortCommit(), and CAUndoCommand::undoDocument().

Here is the caller graph for this function:

void CASourceViewPort::on_commit_clicked ( ) [private, slot]

References _textEdit, and CACommit().

Referenced by setupUI().

Here is the call graph for this function:

Here is the caller graph for this function:

void CASourceViewPort::rebuild ( ) [virtual, slot]

Generates the score source from the current score and fill the text area with it.

Implements CAViewPort.

References _textEdit, document(), CAExport::exportDocument(), CAExport::exportLyricsContext(), CAExport::exportVoice(), lyricsContext(), voice(), and CAExport::wait().

Referenced by setupUI().

Here is the call graph for this function:

Here is the caller graph for this function:

void CASourceViewPort::selectAll ( ) [inline]

References _textEdit.

void CASourceViewPort::setDocument ( CADocument doc) [inline]

References _document.

Referenced by CAUndoCommand::undoDocument().

Here is the caller graph for this function:

References _lyricsContext.

Referenced by CAMainWin::sourceViewPortCommit(), and CAUndoCommand::undoDocument().

Here is the caller graph for this function:

References _sourceViewPortType.

Referenced by CASourceViewPort().

Here is the caller graph for this function:

void CASourceViewPort::setupUI ( ) [private]

References _commit, _layout, _revert, _textEdit, CAViewPort::clicked(), on_commit_clicked(), and rebuild().

Referenced by CASourceViewPort().

Here is the call graph for this function:

Here is the caller graph for this function:

void CASourceViewPort::setVoice ( CAVoice voice) [inline]

References _voice, and voice().

Referenced by CAMainWin::sourceViewPortCommit(), and CAUndoCommand::undoDocument().

Here is the call graph for this function:

Here is the caller graph for this function:

References _sourceViewPortType.


Friends And Related Function Documentation

friend class CASourceViewPort::CATextEdit [friend]

Member Data Documentation

QPushButton* CASourceViewPort::_commit [private]

Referenced by setupUI(), and ~CASourceViewPort().

QGridLayout* CASourceViewPort::_layout [private]

Referenced by setupUI(), and ~CASourceViewPort().

QPushButton* CASourceViewPort::_revert [private]

Referenced by setupUI(), and ~CASourceViewPort().

Referenced by CASourceViewPort(), setVoice(), and voice().


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