Canorus 0.0
Public Types | Signals | Public Member Functions | Static Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
CAView Class Referenceabstract

Base class for various views. More...

#include <view.h>

Inheritance diagram for CAView:
Inheritance graph
[legend]

Public Types

enum  CAViewType { ScoreView , SourceView }
 

Signals

void clicked ()
 
void closed (CAView *)
 

Public Member Functions

 CAView (QWidget *parent=0)
 
virtual ~CAView ()
 
CAViewType viewType ()
 
virtual CAViewclone ()=0
 
virtual CAViewclone (QWidget *parent)=0
 
virtual void rebuild ()=0
 

Static Public Attributes

static const int DEFAULT_VIEW_WIDTH = 600
 
static const int DEFAULT_VIEW_HEIGHT = 400
 

Protected Slots

void mousePressEvent (QMouseEvent *e)
 
void closeEvent (QCloseEvent *)
 

Protected Member Functions

void setViewType (CAViewType t)
 

Protected Attributes

CAViewType _viewType
 

Detailed Description

Base class for various views.

CAView is the base widget for different types of views of the document. Viewport can represent a score view, envelope view, score source view etc.

Member Enumeration Documentation

◆ CAViewType

Holds different view types:

  • ScoreView - The main view of the score. All the music elements (staffs, notes, rests) are rendered to this view.
  • SourceView - Score source view in various syntices (LilyPond, CanorusML etc.).
Enumerator
ScoreView 
SourceView 

Constructor & Destructor Documentation

◆ CAView()

CAView::CAView ( QWidget *  p = 0)

The default constructor. Creates a widget with the parent widget p.

◆ ~CAView()

CAView::~CAView ( )
virtual

Destructor.

References CACanorus::removeView().

Here is the call graph for this function:

Member Function Documentation

◆ clicked

void CAView::clicked ( )
signal

This signal is emitted when mousePressEvent() is called. Parent class is usually connected to this event.

Referenced by mousePressEvent(), and CASourceView::setupUI().

Here is the caller graph for this function:

◆ clone() [1/2]

CAView * CAView::clone ( )
pure virtual

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

Implemented in CAScoreView, and CASourceView.

Referenced by CAMainWin::on_uiNewView_triggered(), CAViewContainer::splitHorizontally(), and CAViewContainer::splitVertically().

Here is the caller graph for this function:

◆ clone() [2/2]

CAView * CAView::clone ( QWidget *  parent)
pure virtual

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

Implemented in CAScoreView, and CASourceView.

◆ closed

void CAView::closed ( CAView )
signal

Referenced by closeEvent().

Here is the caller graph for this function:

◆ closeEvent

void CAView::closeEvent ( QCloseEvent *  )
inlineprotectedslot

References closed().

◆ mousePressEvent

void CAView::mousePressEvent ( QMouseEvent *  e)
protectedslot

References clicked().

Referenced by CASourceView::CATextEdit::focusInEvent(), and CAScoreView::mousePressEvent().

Here is the caller graph for this function:

◆ rebuild()

void CAView::rebuild ( )
pure virtual

Synchronizes/Rebuilds the UI part from the abstract one. This function is usually called when a user creates changes to the score or a new view is introduced.

Implemented in CAScoreView.

◆ setViewType()

void CAView::setViewType ( CAViewType  t)
inlineprotected

References _viewType.

Referenced by CASourceView::CASourceView(), and CAScoreView::initScoreView().

Here is the caller graph for this function:

◆ viewType()

CAViewType CAView::viewType ( )
inline

Member Data Documentation

◆ _viewType

CAViewType CAView::_viewType
protected

Referenced by setViewType(), and viewType().

◆ DEFAULT_VIEW_HEIGHT

const int CAView::DEFAULT_VIEW_HEIGHT = 400
static

◆ DEFAULT_VIEW_WIDTH

const int CAView::DEFAULT_VIEW_WIDTH = 600
static

Copyright (c) 2006-2007, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.

Licensed under the GNU GENERAL PUBLIC LICENSE. See COPYING for details.

Referenced by CAMainWin::on_uiNewView_triggered().


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