Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Signals | Public Member Functions | Static Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
CAViewPort Class Referenceabstract

Base class for various viewports. More...

#include <viewport.h>

Inheritance diagram for CAViewPort:
Inheritance graph
[legend]

Public Types

enum  CAViewPortType { ScoreViewPort, SourceViewPort }
 

Signals

void clicked ()
 
void closed (CAViewPort *)
 

Public Member Functions

 CAViewPort (QWidget *parent=0)
 
virtual ~CAViewPort ()
 
CAViewPortType viewPortType ()
 
virtual CAViewPortclone ()=0
 
virtual CAViewPortclone (QWidget *parent)=0
 
virtual void rebuild ()=0
 

Static Public Attributes

static const int DEFAULT_VIEWPORT_WIDTH = 600
 
static const int DEFAULT_VIEWPORT_HEIGHT = 400
 

Protected Slots

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

Protected Member Functions

void setViewPortType (CAViewPortType t)
 

Protected Attributes

CAViewPortType _viewPortType
 

Detailed Description

Base class for various viewports.

CAViewPort 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

Holds different viewport types:

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

Constructor & Destructor Documentation

CAViewPort::CAViewPort ( QWidget p = 0)

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

CAViewPort::~CAViewPort ( )
virtual

Destructor.

References CACanorus::removeViewPort().

Here is the call graph for this function:

Member Function Documentation

void CAViewPort::clicked ( )
signal

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

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

Here is the caller graph for this function:

CAViewPort * CAViewPort::clone ( )
pure 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.

Implemented in CAScoreViewPort, and CASourceViewPort.

Referenced by CAMainWin::on_uiNewViewport_triggered(), CAViewPortContainer::splitHorizontally(), and CAViewPortContainer::splitVertically().

Here is the caller graph for this function:

CAViewPort * CAViewPort::clone ( QWidget parent)
pure 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.

Implemented in CAScoreViewPort, and CASourceViewPort.

void CAViewPort::closed ( CAViewPort )
signal

Referenced by closeEvent().

Here is the caller graph for this function:

void CAViewPort::closeEvent ( QCloseEvent *  )
inlineprotectedslot

References closed().

Here is the call graph for this function:

void CAViewPort::mousePressEvent ( QMouseEvent *  e)
protectedslot

References clicked().

Referenced by CASourceViewPort::CATextEdit::focusInEvent(), and CAScoreViewPort::mousePressEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAViewPort::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 viewport is introduced.

Implemented in CAScoreViewPort.

void CAViewPort::setViewPortType ( CAViewPortType  t)
inlineprotected

References _viewPortType.

Referenced by CASourceViewPort::CASourceViewPort(), and CAScoreViewPort::initScoreViewPort().

Here is the caller graph for this function:

CAViewPortType CAViewPort::viewPortType ( )
inline

Member Data Documentation

CAViewPortType CAViewPort::_viewPortType
protected

Referenced by setViewPortType(), and viewPortType().

const int CAViewPort::DEFAULT_VIEWPORT_HEIGHT = 400
static
const int CAViewPort::DEFAULT_VIEWPORT_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_uiNewViewport_triggered().


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