Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Slots | Signals | Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
CASourceViewPort Class Reference

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

#include <sourceviewport.h>

Inheritance diagram for CASourceViewPort:
Inheritance graph
[legend]

Classes

class  CATextEdit
 

Public Slots

void rebuild ()
 

Signals

void CACommit (QString documentString)
 
- Signals inherited from CAViewPort
void clicked ()
 
void closed (CAViewPort *)
 

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 ()
 
- Public Member Functions inherited from CAViewPort
 CAViewPort (QWidget *parent=0)
 
virtual ~CAViewPort ()
 
CAViewPortType viewPortType ()
 
virtual void rebuild ()=0
 

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
 

Additional Inherited Members

- Public Types inherited from CAViewPort
enum  CAViewPortType { ScoreViewPort, SourceViewPort }
 
- Static Public Attributes inherited from CAViewPort
static const int DEFAULT_VIEWPORT_WIDTH = 600
 
static const int DEFAULT_VIEWPORT_HEIGHT = 400
 
- Protected Slots inherited from CAViewPort
void mousePressEvent (QMouseEvent *e)
 
void closeEvent (QCloseEvent *)
 
- Protected Member Functions inherited from CAViewPort
void setViewPortType (CAViewPortType t)
 
- Protected Attributes inherited from CAViewPort
CAViewPortType _viewPortType
 

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:

CASourceViewPort::CASourceViewPort ( CALyricsContext lc,
QWidget parent = 0 
)

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:

CASourceViewPort::~CASourceViewPort ( )
virtual

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:

CASourceViewPort * CASourceViewPort::clone ( )
virtual

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:

CASourceViewPort * CASourceViewPort::clone ( QWidget parent)
virtual

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:

CADocument* CASourceViewPort::document ( )
inline

References _document.

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

Here is the caller graph for this function:

CALyricsContext* CASourceViewPort::lyricsContext ( )
inline

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 ( )
privateslot

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 ( )
slot

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

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:

void CASourceViewPort::setLyricsContext ( CALyricsContext c)
inline

References _lyricsContext.

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

Here is the caller graph for this function:

void CASourceViewPort::setSourceViewPortType ( CASourceViewPortType  t)
inline

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:

CASourceViewPortType CASourceViewPort::sourceViewPortType ( )
inline

References _sourceViewPortType.

CAVoice* CASourceViewPort::voice ( )
inline

Friends And Related Function Documentation

friend class CASourceViewPort::CATextEdit
friend

Member Data Documentation

QPushButton* CASourceViewPort::_commit
private

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

CADocument* CASourceViewPort::_document
private
QGridLayout* CASourceViewPort::_layout
private

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

CALyricsContext* CASourceViewPort::_lyricsContext
private
QPushButton* CASourceViewPort::_revert
private

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

CASourceViewPortType CASourceViewPort::_sourceViewPortType
private
QTextEdit* CASourceViewPort::_textEdit
private
CAVoice* CASourceViewPort::_voice
private

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


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