|
Canorus
0.7
|
#include <scoreviewport.h>

Widget for rendering the score.
This class represents the widget capable of rendering the score. It is usually used as a central widget in the main window, but might be used for example, in a list of possible harmonization or improvization solutions, score layout window and more as an independent widget or only as a drawable content on a button.
Score viewport consists of a virtual workspace full of drawable elements which represent the abstract music elements or contexts. Every drawable element has its absolute X, Y, Width and Height geometry properties. Score viewport also shows usually a small part of the whole workspace (depending on scroll bars values and a zoom level). When drawable elements are drawn, their CADrawable::draw() methods are called with the viewports X and Y coordinates, zoom level, pen color and other properties needed to correctly draw an element to the score viewport's canvas.
Note that this widget is only capable of correctly rendering the drawable elements. No Control part of the MVC model is implemented here. The viewport logic is implemented outside of this class (usually main window). Score viewport only provides various signals to communicate with outer world. However, this class provides various modes (eg. drawing the shadow notes when inserting music elements, coloring only one voice, hiding certain staffs, animating the scroll etc.) the controller might use.
This widget also provides horizontal and vertical scrollbars (see _hScrollBar and _vScrollBar).
Different behaviour of the scroll bars:
| CAScoreViewPort::CAScoreViewPort | ( | QWidget * | parent = 0 | ) |
References initScoreViewPort().
Referenced by clone().


| CAScoreViewPort::CAScoreViewPort | ( | CASheet * | sheet, |
| QWidget * | parent = 0 |
||
| ) |
| CAScoreViewPort::~CAScoreViewPort | ( | ) | [virtual] |
References _animationTimer, _drawableCList, _drawableMList, _hScrollBar, _shadowDrawableNote, _shadowNote, _vScrollBar, and CAKDTree< T >::clear().

| void CAScoreViewPort::addCElement | ( | CADrawableContext * | elt, |
| bool | select = false |
||
| ) |
Adds a drawable music element elt to the score viewport and selects it, if select is true.
References _drawableCList, _shadowDrawableNote, _shadowNote, CAKDTree< T >::addElement(), CADrawableContext::context(), CADrawableContext::drawableContextType(), CADrawableContext::DrawableStaff, and setCurrentContext().
Referenced by importCElements(), importElements(), and CAEngraver::reposit().


| void CAScoreViewPort::addMElement | ( | CADrawableMusElement * | elt, |
| bool | select = false |
||
| ) |
Adds a drawable music element elt to the score viewport and selects it, if select is true.
References _drawableMList, _selection, CAKDTree< T >::addElement(), CADrawableContext::addMElement(), addToSelection(), CADrawableMusElement::drawableContext(), and selectionChanged().
Referenced by importElements(), importMElements(), CAEngraver::placeMarks(), and CAEngraver::reposit().


| void CAScoreViewPort::addSelectionRegion | ( | QRect | r | ) | [inline] |
References _selectionRegionList.
Referenced by CAMainWin::scoreViewPortMouseMove(), and CASettingsDialog::setupPages().

| void CAScoreViewPort::addToSelection | ( | CADrawableMusElement * | elt, |
| bool | triggerSignal = true |
||
| ) |
Adds the given drawable music element elt to the current selection.
References _selection, CADrawable::isSelectable(), selectionChanged(), and CADrawable::xPos().
Referenced by addMElement(), addToSelection(), invertSelection(), CAKeybdInput::midiInEventToScore(), CAMainWin::onRepaintTimerTimeout(), CAMainWin::pasteAt(), rebuild(), CAMainWin::scoreViewPortMousePress(), CAMainWin::scoreViewPortMouseRelease(), selectAll(), selectAllCurBar(), selectAllCurContext(), selectMElement(), selectNextMusElement(), selectPrevMusElement(), and CASettingsDialog::setupPages().


| void CAScoreViewPort::addToSelection | ( | const QList< CADrawableMusElement * > | list, |
| bool | selectableOnly = true |
||
| ) |
Adds the given list of drawable music elements list to the current selection.
References addToSelection(), and selectionChanged().

Adds the drawable music element of the given abstract music element elt to the selection. Returns a pointer to its drawable element or 0, if the music element is not part of this score viewport.
References _drawableMList, _selection, addToSelection(), CAKDTree< T >::at(), selectionChanged(), and CAKDTree< T >::size().

| void CAScoreViewPort::addToSelection | ( | const QList< CAMusElement * > | elts | ) |
Adds the given list of abstract music elements to the selection.
References _drawableMList, addToSelection(), CAKDTree< T >::at(), CADrawable::isSelectable(), selectionChanged(), and CAKDTree< T >::size().

| QColor CAScoreViewPort::backgroundColor | ( | ) | [inline] |
References _backgroundColor.
Referenced by initScoreViewPort().

| QPen CAScoreViewPort::border | ( | ) | [inline] |
References _borderPen.
| void CAScoreViewPort::CADoubleClickEvent | ( | QMouseEvent * | e, |
| QPoint | p | ||
| ) | [signal] |
| void CAScoreViewPort::CAKeyPressEvent | ( | QKeyEvent * | e | ) | [signal] |
This signal is emitted when keyPressEvent() is called. Parent class is usually connected to this event. It adds another two arguments to the wheelEvent() function - pointer to this score viewport. This is useful when a parent class wants to know which class the signal was emmitted by.
| e | Wheel event which gets processed. |
| v | Pointer to this viewport (the viewport which emmitted the signal). |
Referenced by keyPressEvent().

| int CAScoreViewPort::calculateTime | ( | double | x, |
| double | y | ||
| ) |
Calculates the logical time at the given coordinates x and y.
References _drawableMList, CAKDTree< T >::findNearestLeft(), CAKDTree< T >::findNearestRight(), CADrawableMusElement::musElement(), CAMusElement::timeLength(), and CAMusElement::timeStart().

| void CAScoreViewPort::CAMouseMoveEvent | ( | QMouseEvent * | e, |
| QPoint | p | ||
| ) | [signal] |
This signal is emitted when mouseMoveEvent() is called. Parent class is usually connected to this event. It adds another two arguments to the mouseMoveEvent() function - pointer to this viewport and coordinates in world coordinates where user used the mouse. This is useful when a parent class wants to know which class the signal was emmitted by.
| e | Mouse event which gets processed. |
| p | Coordinates of the mouse cursor in absolute world values. |
| v | Pointer to this viewport (the viewport which emmitted the signal). |
Referenced by mouseMoveEvent().

| void CAScoreViewPort::CAMousePressEvent | ( | QMouseEvent * | e, |
| QPoint | p | ||
| ) | [signal] |
This signal is emitted when mousePressEvent() is called. Parent class is usually connected to this event. It adds another two arguments to the mousePressEvent() function - pointer to this viewport and coordinates in world coordinates where user used the mouse. This is useful when a parent class wants to know which class the signal was emmitted by.
| e | Mouse event which gets processed. |
| p | Coordinates of the mouse cursor in absolute world values. |
| v | Pointer to this viewport (the viewport which emmitted the signal). |
Referenced by mousePressEvent().

| void CAScoreViewPort::CAMouseReleaseEvent | ( | QMouseEvent * | e, |
| QPoint | p | ||
| ) | [signal] |
This signal is emitted when mouseReleaseEvent() is called. Parent class is usually connected to this event. It adds another two arguments to the mouseReleaseEvent() function - pointer to this score viewport and coordinates in world coordinates where user used the mouse. This is useful when a parent class wants to know which class the signal was emmitted by.
| e | Mouse event which gets processed. |
| p | Coordinates of the mouse cursor in absolute world values. |
| v | Pointer to this viewport (the viewport which emmitted the signal). |
Referenced by mouseReleaseEvent().

| void CAScoreViewPort::CATripleClickEvent | ( | QMouseEvent * | e, |
| QPoint | p | ||
| ) | [signal] |
| void CAScoreViewPort::CAWheelEvent | ( | QWheelEvent * | e, |
| QPoint | p | ||
| ) | [signal] |
This signal is emitted when wheelEvent() is called. Parent class is usually connected to this event. It adds another two arguments to the wheelEvent() function - pointer to this score viewport and coordinates in world coordinates where user used the mouse. This is useful when a parent class wants to know which class the signal was emmitted by.
| e | Wheel event which gets processed. |
| p | Coordinates of the mouse cursor in absolute world values. |
| v | Pointer to this viewport (the viewport which emmitted the signal). |
Referenced by wheelEvent().

| void CAScoreViewPort::checkScrollBars | ( | ) |
Checks whether the scrollbars are needed (the whole scene is not rendered) or not. Scrollbars get shown or hidden here. Repaint is done automatically, if needed.
References _checkScrollBarsDeadLock, _drawableCList, _drawableMList, _holdRepaint, _hScrollBar, _vScrollBar, _zoom, drawableHeight(), drawableWidth(), getMaxXExtended(), getMaxYExtended(), isScrollBarVisible(), ScrollBarShowIfNeeded, setWorldHeight(), setWorldWidth(), worldHeight(), and worldWidth().
Referenced by rebuild(), setCenterCoords(), setScrollBarVisible(), setWorldCoords(), setWorldHeight(), setWorldWidth(), setWorldX(), setWorldY(), and setZoom().


| void CAScoreViewPort::clearCElements | ( | ) | [inline, private] |
| void CAScoreViewPort::clearMElements | ( | ) | [inline, private] |
| void CAScoreViewPort::clearRepaintArea | ( | ) | [inline] |
| void CAScoreViewPort::clearSelection | ( | ) | [inline] |
Clears the current selection. Its behaviour is the same as calling clearMSelection() and clearCSelection().
References _selection, and selectionChanged().
Referenced by CAMainWin::deleteSelection(), invertSelection(), CAKeybdInput::midiInEventToScore(), CAMainWin::on_uiPlayFromSelection_toggled(), CAMainWin::on_uiRemoveVoice_triggered(), CAMainWin::onRepaintTimerTimeout(), CAMainWin::pasteAt(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), CAMainWin::scoreViewPortMouseRelease(), selectAll(), selectAllCurBar(), and selectAllCurContext().


| void CAScoreViewPort::clearSelectionRegionList | ( | ) | [inline] |
References _selectionRegionList.
Referenced by CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMousePress(), and CAMainWin::scoreViewPortMouseRelease().

| CAScoreViewPort * CAScoreViewPort::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 _drawableCList, _drawableMList, _sheet, CAScoreViewPort(), and importElements().
Referenced by importElements().


| CAScoreViewPort * CAScoreViewPort::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 _drawableCList, _drawableMList, _sheet, CAScoreViewPort(), and importElements().

| CAContext * CAScoreViewPort::contextCollision | ( | double | x, |
| double | y | ||
| ) |
If the given coordinates hit any of the contexts, returns that context.
References _drawableCList, and CAKDTree< T >::findInRange().

| int CAScoreViewPort::coordsToTime | ( | double | x | ) |
Returns Canorus time for the given X coordinate x.
Returns 0, if no contexts are present.
References _drawableMList, CAKDTree< T >::addElement(), CAKDTree< T >::list(), CADrawableMusElement::musElement(), nearestLeftElement(), nearestRightElement(), selection(), CAMusElement::timeEnd(), CAMusElement::timeStart(), and CADrawable::xPos().
Referenced by CAMainWin::scoreViewPortMouseMove(), and selectAllCurBar().


| CATextEdit * CAScoreViewPort::createTextEdit | ( | CADrawableMusElement * | dMusElt | ) |
Creates a CATextEdit widget over the existing drawable syllable dMusElt. Returns the pointer to the created widget.
References CAMark::BookMark, CADrawableMusElement::drawableContext(), findMElement(), CASyllable::hyphenStart(), CADrawableLyricsContext::lyricsContext(), CAMusElement::Mark, CASyllable::melismaStart(), CADrawableMusElement::musElement(), CAMusElement::musElementType(), CALyricsContext::next(), setTextEditGeometry(), setTextEditVisible(), CAMusElement::Syllable, CAMark::Text, CASyllable::text(), textEdit(), updateHelpers(), CADrawable::xPos(), and CADrawable::yPos().
Referenced by CAMainWin::onTextEditKeyPressEvent(), CAMainWin::scoreViewPortMousePress(), and CAMainWin::setMode().


| CADrawableContext* CAScoreViewPort::currentContext | ( | ) | [inline] |
References _currentContext.
Referenced by CAMainWin::insertMusElementAt(), CAKeybdInput::midiInEventToScore(), CATransposeView::on_uiApply_clicked(), CAMainWin::onTextEditKeyPressEvent(), paintEvent(), CAMainWin::pasteAt(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMousePress(), selectAllCurBar(), selectAllCurContext(), selectCElement(), updateHelpers(), and CAMainWin::updateSheetToolBar().

| QColor CAScoreViewPort::disabledElementsColor | ( | ) | [inline] |
References _disabledElementsColor.
Referenced by initScoreViewPort(), and paintEvent().

| const int CAScoreViewPort::drawableHeight | ( | ) | [inline] |
References _canvas.
Referenced by checkScrollBars(), on_animationTimer_timeout(), paintEvent(), resizeEvent(), setWorldCoords(), setWorldHeight(), and setZoom().

| const int CAScoreViewPort::drawableWidth | ( | ) | [inline] |
References _canvas.
Referenced by checkScrollBars(), on_animationTimer_timeout(), paintEvent(), resizeEvent(), setWorldCoords(), setWorldWidth(), and setZoom().

| void CAScoreViewPort::drawSelectionRegion | ( | QPainter * | p, |
| CADrawSettings | s | ||
| ) | [private] |
References CADrawSettings::color, CADrawSettings::h, CADrawSettings::w, CADrawSettings::x, and CADrawSettings::y.
Referenced by paintEvent().

| bool CAScoreViewPort::drawShadowNoteAccs | ( | ) | [inline] |
References _drawShadowNoteAccs.
| void CAScoreViewPort::enterEvent | ( | QEvent * | e | ) | [private, slot] |
References _shadowNoteVisible, and _shadowNoteVisibleOnLeave.
| CADrawableContext * CAScoreViewPort::findCElement | ( | CAContext * | context | ) |
Finds the drawable instance of the given abstract context.
References _drawableCList, CAKDTree< T >::at(), and CAKDTree< T >::size().
Referenced by CASettingsDialog::setupPages().


| QList< CADrawableContext * > CAScoreViewPort::findContextsInRegion | ( | QRect & | region | ) |
Returns a list of drawable contexts the current score viewport includes between the vertical coordinates y1 and y2. The context is in a list already if only part of the context is touched by the region. That is the first returned context's top border is smaller than y1 and the last returned context's bottom border is larger than x2.
References _drawableCList, and CAKDTree< T >::findInRange().
Referenced by CAMainWin::scoreViewPortMouseMove(), and CAMainWin::scoreViewPortMouseRelease().


Finds the drawable instance of the given abstract music element.
References _drawableMList, CAKDTree< T >::at(), and CAKDTree< T >::size().
Referenced by createTextEdit(), and CAEngraver::reposit().


| QColor CAScoreViewPort::foregroundColor | ( | ) | [inline] |
References _foregroundColor.
Referenced by initScoreViewPort(), and paintEvent().

| int CAScoreViewPort::getMaxXExtended | ( | CAKDTree< T > & | v | ) | [private] |
Returns the maximum X of the viewable World a little bigger to make insertion at the end easy.
References CAKDTree< T >::getMaxX(), and RIGHT_EXTRA_SPACE.
Referenced by checkScrollBars(), setWorldWidth(), setWorldX(), and zoomToWidth().


| int CAScoreViewPort::getMaxYExtended | ( | CAKDTree< T > & | v | ) | [private] |
Returns the maximum Y of the viewable World a little bigger to make insertion at the end easy.
References BOTTOM_EXTRA_SPACE, and CAKDTree< T >::getMaxY().
Referenced by checkScrollBars(), setWorldHeight(), setWorldY(), and zoomToHeight().


| QColor CAScoreViewPort::hiddenElementsColor | ( | ) | [inline] |
References _hiddenElementsColor.
Referenced by initScoreViewPort(), and paintEvent().

| void CAScoreViewPort::HScrollBarEvent | ( | int | val | ) | [private, slot] |
Processes the Horizontal scroll bar event. This method is called when the horizontal scrollbar changes its value, let it be internally or due to user interaction.
References _allowManualScroll, _hScrollBarDeadLock, and setWorldX().
Referenced by initScoreViewPort().


| void CAScoreViewPort::importCElements | ( | CAKDTree< CADrawableContext * > * | elts | ) |
References addCElement(), CAKDTree< T >::at(), CADrawableContext::clone(), and CAKDTree< T >::size().

| void CAScoreViewPort::importElements | ( | CAKDTree< CADrawableMusElement * > * | drawableMList, |
| CAKDTree< CADrawableContext * > * | drawableCList | ||
| ) |
References _drawableCList, addCElement(), addMElement(), CAKDTree< T >::at(), clone(), CAKDTree< T >::list(), and CAKDTree< T >::size().
Referenced by clone().


| void CAScoreViewPort::importMElements | ( | CAKDTree< CADrawableMusElement * > * | elts | ) |
References addMElement(), CAKDTree< T >::at(), CADrawableMusElement::clone(), and CAKDTree< T >::size().

| void CAScoreViewPort::initScoreViewPort | ( | CASheet * | s | ) | [private] |
References _allowManualScroll, _animationTimer, _canvas, _checkScrollBarsDeadLock, _clickTimer, _currentContext, _drawBorder, _holdRepaint, _hScrollBar, _hScrollBarDeadLock, _layout, _oldWorldH, _oldWorldW, _playing, _repaintArea, _scrollBarVisible, _vScrollBar, _vScrollBarDeadLock, _worldH, _worldW, _worldX, _worldY, _xCursor, _yCursor, _zoom, backgroundColor(), disabledElementsColor(), foregroundColor(), hiddenElementsColor(), HScrollBarEvent(), on_animationTimer_timeout(), on_clickTimer_timeout(), CAViewPort::ScoreViewPort, ScrollBarShowIfNeeded, selectedContextColor(), selectionAreaColor(), selectionColor(), setBackgroundColor(), setDisabledElementsColor(), setDrawShadowNoteAccs(), setForegroundColor(), setHiddenElementsColor(), setNoteNameVisible(), setResizeDirection(), setSelectedContextColor(), setSelectedVoice(), setSelectionAreaColor(), setSelectionColor(), setShadowNoteAccs(), setShadowNoteVisible(), setShadowNoteVisibleOnLeave(), setSheet(), setTextEdit(), setTextEditVisible(), CACanorus::settings(), CAViewPort::setViewPortType(), CADrawable::Undefined, and VScrollBarEvent().
Referenced by CAScoreViewPort().


| void CAScoreViewPort::invertSelection | ( | ) |
Inverts the current selection.
References _drawableMList, addToSelection(), CAKDTree< T >::at(), clearSelection(), selection(), selectionChanged(), and CAKDTree< T >::size().

| CAScrollBarVisibility CAScoreViewPort::isScrollBarVisible | ( | ) | [inline] |
References _scrollBarVisible.
Referenced by checkScrollBars().

| bool CAScoreViewPort::isSelected | ( | CADrawableMusElement * | elt | ) | [inline, private] |
References _selection.
| void CAScoreViewPort::keyPressEvent | ( | QKeyEvent * | e | ) | [private, slot] |
Processes the keyPressEvent(). A new signal is emitted: CAKeyPressEvent(), which usually gets processed by the parent class then.
References CAKeyPressEvent().

| QPoint CAScoreViewPort::lastMousePressCoords | ( | ) | [inline] |
References _lastMousePressCoords.
Referenced by mousePressEvent(), CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMouseRelease(), and setLastMousePressCoordsAfter().

| void CAScoreViewPort::leaveEvent | ( | QEvent * | e | ) | [private, slot] |
References _shadowNoteVisible, and _shadowNoteVisibleOnLeave.
| bool CAScoreViewPort::manualScroll | ( | ) | [inline] |
References _allowManualScroll.
| void CAScoreViewPort::mouseMoveEvent | ( | QMouseEvent * | e | ) | [private, slot] |
Processes the mouseMoveEvent(). A new signal is emitted: CAMouseMoveEvent(), which usually gets processed by the parent class then.
References _worldX, _worldY, _xCursor, _yCursor, _zoom, CAMouseMoveEvent(), and selection().

| void CAScoreViewPort::mousePressEvent | ( | QMouseEvent * | e | ) | [private, slot] |
Processes the mousePressEvent(). A new signal is emitted: CAMousePressEvent(), which usually gets processed by the parent class then.
Reimplemented from CAViewPort.
References _clickTimer, _numberOfClicks, _worldX, _worldY, _zoom, CADrawable::Bottom, CADoubleClickEvent(), CAMousePressEvent(), CATripleClickEvent(), lastMousePressCoords(), CADrawable::Left, CADrawable::Right, selection(), setLastMousePressCoords(), setResizeDirection(), and CADrawable::Top.

| void CAScoreViewPort::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [private, slot] |
Processes the mouseReleaseEvent(). A new signal is emitted: CAMouseReleaseEvent(), which usually gets processed by the parent class then.
References _worldX, _worldY, _zoom, CAMouseReleaseEvent(), setResizeDirection(), and CADrawable::Undefined.

| QList< CADrawableMusElement * > CAScoreViewPort::musElementsAt | ( | double | x, |
| double | y | ||
| ) |
Returns a list of pointers to the drawable music elements at the given coordinates.
Multiple elements can exist at the same coordinates.
If there is a currently selected voice, only elements belonging to this voice are selected.
References _drawableMList, CAKDTree< T >::findInRange(), and selectedVoice().
Referenced by CAMainWin::insertMusElementAt(), and CAMainWin::scoreViewPortMousePress().


| QList< CAMusElement * > CAScoreViewPort::musElementSelection | ( | ) |
Returns a list of currently selected music elements. Does the same as selection(), but doesn't return their Drawable instances.
References _selection.
Referenced by CAPlugin::callAction(), and rebuild().

| CADrawableContext * CAScoreViewPort::nearestDownContext | ( | double | x, |
| double | y | ||
| ) |
Returns a pointer to the nearest upper drawable context from the given coordinates.
References _drawableCList, and CAKDTree< T >::findNearestDown().

| CADrawableMusElement * CAScoreViewPort::nearestLeftElement | ( | double | x, |
| double | y, | ||
| CADrawableContext * | context = 0 |
||
| ) |
Returns a pointer to the nearest drawable music element left of the current coordinates with the largest startTime. Drawable elements left borders are taken into account. If context is non-zero, returns the nearest element in the given context only.
References _drawableMList, and CAKDTree< T >::findNearestLeft().
Referenced by coordsToTime(), and CAMainWin::insertMusElementAt().


| CADrawableMusElement * CAScoreViewPort::nearestLeftElement | ( | double | x, |
| double | y, | ||
| CAVoice * | voice | ||
| ) |
Returns a pointer to the nearest drawable music element left of the current coordinates with the largest startTime in the given voice. Drawable elements left borders are taken into account.
References _drawableMList, and CAKDTree< T >::findNearestLeft().

| CADrawableMusElement * CAScoreViewPort::nearestRightElement | ( | double | x, |
| double | y, | ||
| CADrawableContext * | context = 0 |
||
| ) |
Returns a pointer to the nearest drawable music element right of the current coordinates with the largest startTime. Drawable elements left borders are taken into account. If context is non-zero, returns the nearest element in the given context only.
References _drawableMList, and CAKDTree< T >::findNearestRight().
Referenced by coordsToTime(), CAMainWin::insertMusElementAt(), and CAMainWin::pasteAt().


| CADrawableMusElement * CAScoreViewPort::nearestRightElement | ( | double | x, |
| double | y, | ||
| CAVoice * | voice | ||
| ) |
Returns a pointer to the nearest drawable music element right of the current coordinates with the largest startTime in the given voice. Drawable elements left borders are taken into account.
References _drawableMList, and CAKDTree< T >::findNearestRight().

| CADrawableContext * CAScoreViewPort::nearestUpContext | ( | double | x, |
| double | y | ||
| ) |
Returns a pointer to the nearest upper drawable context from the given coordinates.
References _drawableCList, and CAKDTree< T >::findNearestUp().
Referenced by CAMainWin::scoreViewPortMousePress().


| QString CAScoreViewPort::noteName | ( | ) | [inline] |
| bool CAScoreViewPort::noteNameVisible | ( | ) | [inline] |
References _noteNameVisible.
| void CAScoreViewPort::on_animationTimer_timeout | ( | ) | [private, slot] |
References _animationStep, _animationTimer, _targetWorldX, _targetWorldY, _targetZoom, _worldX, _worldY, _zoom, ANIMATION_STEPS, drawableHeight(), drawableWidth(), and setWorldCoords().
Referenced by initScoreViewPort(), and startAnimationTimer().


| void CAScoreViewPort::on_clickTimer_timeout | ( | ) | [private, slot] |
Clears number of clicks done so far inside one interval. This function is usually click timer's slot.
References _numberOfClicks.
Referenced by initScoreViewPort().

| void CAScoreViewPort::paintEvent | ( | QPaintEvent * | e | ) | [private, slot] |
General Qt's paint event. All the music elements get actually rendered in this method.
References _backgroundColor, _borderPen, _canvas, _currentContext, _drawableCList, _drawableMList, _drawBorder, _drawShadowNoteAccs, _holdRepaint, _oldWorldH, _oldWorldW, _oldWorldX, _oldWorldY, _repaintArea, _selection, _shadowDrawableNote, _shadowNote, _shadowNoteAccs, _shadowNoteVisible, _worldH, _worldW, _worldX, _worldY, _xCursor, _yCursor, _zoom, CADrawSettings::color, CAMusElement::color(), CAMusElement::context(), currentContext(), disabledElementsColor(), CADrawableAccidental::draw(), drawableHeight(), drawableWidth(), drawSelectionRegion(), CAKDTree< T >::findInRange(), foregroundColor(), CANote::generateNoteName(), CARest::Hidden, hiddenElementsColor(), CAMusElement::isPlayable(), CAMusElement::isVisible(), CAMusElement::musElementType(), noteName(), CAMusElement::Rest, selectedContextColor(), selectedVoice(), selectionAreaColor(), selectionColor(), selectionRegionList(), CACanorus::settings(), CASettings::shadowNotesInOtherStaffs(), CAKDTree< T >::size(), CAVoice::staff(), CADrawable::width(), CADrawSettings::x, CADrawSettings::y, and CADrawable::yPos().

| bool CAScoreViewPort::playing | ( | ) | [inline] |
References _playing.
Referenced by CAMainWin::setMode(), and setPlaying().

| void CAScoreViewPort::rebuild | ( | ) | [virtual] |
Calls the engraver to reposition the music elements on the canvas. Also updates scrollbars.
Implements CAViewPort.
References _currentContext, _drawableCList, _drawableMList, _selection, _shadowDrawableNote, _shadowNote, addToSelection(), checkScrollBars(), CAKDTree< T >::clear(), CAKDTree< T >::list(), musElementSelection(), CAPlayableLength::Quarter, CAEngraver::reposit(), setCurrentContext(), setWorldCoords(), CAKDTree< T >::size(), updateHelpers(), and worldCoords().
Referenced by CAMainWin::on_uiScoreView_triggered(), and CASettingsDialog::setupPages().


| bool CAScoreViewPort::removeFromSelection | ( | CADrawableMusElement * | elt | ) | [inline] |
Removes the given drawable music element elt from the selection, if it exists. Returns True, if element existed in the selection and was removed, false otherwise.
References _selection, and selectionChanged().
Referenced by CAMainWin::scoreViewPortMousePress().


| CAMusElement * CAScoreViewPort::removeMElement | ( | double | x, |
| double | y | ||
| ) |
Removes a drawable music element at the given coordinates x and y, if it exists. Returns the pointer of the abstract music element, if the element was found and deleted.
References _drawableMList, CADrawableMusElement::DrawableClef, CADrawableMusElement::drawableContext(), CADrawableMusElement::DrawableKeySignature, CADrawableMusElement::drawableMusElementType(), CADrawableMusElement::DrawableTimeSignature, CADrawableMusElement::musElement(), CAKDTree< T >::removeElement(), and CADrawableContext::removeMElement().

| void CAScoreViewPort::removeSelectionRegion | ( | QRect | r | ) | [inline] |
References _selectionRegionList.
| void CAScoreViewPort::removeTextEdit | ( | ) |
Removes and deletes the text edit when quitting text editing mode.
References setTextEditVisible(), textEdit(), and updateHelpers().
Referenced by CAMainWin::onTextEditKeyPressEvent(), CAMainWin::scoreViewPortMousePress(), and CAMainWin::setMode().


| CADrawable::CADirection CAScoreViewPort::resizeDirection | ( | ) | [inline] |
References _resizeDirection.
Referenced by CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMousePress(), and CAMainWin::scoreViewPortMouseRelease().

| void CAScoreViewPort::resizeEvent | ( | QResizeEvent * | e | ) | [private, slot] |
Called when the user resizes the widget. Note that repaint() event is also triggered when the internal drawable canvas changes its size (for eg. when scrollbars are shown/hidden) and the size of the viewport does not change.
References _worldX, _worldY, _zoom, drawableHeight(), drawableWidth(), and setWorldCoords().

| void CAScoreViewPort::selectAll | ( | ) |
Select all elements in the viewport. This function is usually associated with CTRL+A key.
References _drawableMList, addToSelection(), CAKDTree< T >::at(), clearSelection(), selectionChanged(), and CAKDTree< T >::size().

| void CAScoreViewPort::selectAllCurBar | ( | ) |
Selects all elements in the current bar. This function is usually called when double clicking on the bar.
References _lastMousePressCoords, addToSelection(), clearSelection(), CADrawableContext::context(), coordsToTime(), currentContext(), CADrawableContext::DrawableStaff, selectedVoice(), and selectionChanged().

| void CAScoreViewPort::selectAllCurContext | ( | ) |
Selects all elements in the current context (line). This function is usually called when triple clicking on the context.
References addToSelection(), clearSelection(), currentContext(), and selectionChanged().

| CADrawableContext * CAScoreViewPort::selectCElement | ( | double | x, |
| double | y | ||
| ) |
Selects a drawable context element at the given coordinates, if it exists. Returns a pointer to its abstract context element. If multiple elements exist at the same coordinates, they are selected one by another if you click at the same coordinates multiple times. If no elements are present at the coordinates, clear the selection.
References _drawableCList, currentContext(), CAKDTree< T >::findInRange(), and setCurrentContext().
Referenced by CAMainWin::scoreViewPortMousePress().


| CADrawableContext * CAScoreViewPort::selectContext | ( | CAContext * | context | ) |
Selects the drawable context of the given abstract context. If there are multiple drawable elements representing a single abstract element, selects the first one.
Returns a pointer to the drawable instance of the given context or 0 if the context was not found.
References _drawableCList, CAKDTree< T >::at(), setCurrentContext(), and CAKDTree< T >::size().
Referenced by CAMainWin::newDocument(), CAMainWin::on_uiImportDocument_triggered(), CAMainWin::openDocument(), and CAMainWin::scoreViewPortMousePress().


Selects the lower music element in the current context.
Returns a pointer to the newly selected drawable music element or 0, if such an element doesn't exist or the selection is empty.
This method is usually called when using the up arrow key.
References _selection.
| QColor CAScoreViewPort::selectedContextColor | ( | ) | [inline] |
References _selectedContextColor.
Referenced by initScoreViewPort(), and paintEvent().

| CAVoice* CAScoreViewPort::selectedVoice | ( | ) | [inline] |
References _selectedVoice.
Referenced by musElementsAt(), paintEvent(), CAMainWin::scoreViewPortMouseRelease(), selectAllCurBar(), selectNextMusElement(), selectPrevMusElement(), and setSelectedVoice().

| QList< CAMusElement * > CAScoreViewPort::selection | ( | ) | [inline] |
Returns a list of the currently selected drawable music elements.
References _selection.
Referenced by CAPlugin::callAction(), coordsToTime(), CAMainWin::copySelection(), CAMainWin::deleteSelection(), CAMainWin::insertMusElementAt(), invertSelection(), mouseMoveEvent(), mousePressEvent(), CATransposeView::on_uiApply_clicked(), CAMainWin::on_uiClefOffset_valueChanged(), CAMainWin::on_uiDynamicCustomText_returnPressed(), CAMainWin::on_uiDynamicText_toggled(), CAMainWin::on_uiDynamicVolume_valueChanged(), CAMainWin::on_uiFermataType_toggled(), CAMainWin::on_uiFinger_toggled(), CAMainWin::on_uiFingeringOriginal_toggled(), CAMainWin::on_uiFMChordArea_toggled(), CAMainWin::on_uiFMEllipse_toggled(), CAMainWin::on_uiFMFunction_toggled(), CAMainWin::on_uiFMTonicDegree_toggled(), CAMainWin::on_uiHiddenRest_toggled(), CAMainWin::on_uiInstrumentChange_activated(), CAMainWin::on_uiKeySig_activated(), CAMainWin::on_uiNoteStemDirection_toggled(), CAMainWin::on_uiPlayableLength_toggled(), CAMainWin::on_uiPlayFromSelection_toggled(), CAMainWin::on_uiRepeatMarkType_toggled(), CAMainWin::on_uiTempoBeat_toggled(), CAMainWin::on_uiTempoBpm_returnPressed(), CAMainWin::on_uiTimeSigBeat_valueChanged(), CAMainWin::on_uiTimeSigBeats_valueChanged(), CAMainWin::on_uiTupletType_toggled(), CAMainWin::onTextEditKeyPressEvent(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMousePress(), selectMElement(), CAMainWin::setMode(), CATransposeView::show(), timeToCoords(), CAMainWin::updateClefToolBar(), CAMainWin::updateDynamicToolBar(), CAMainWin::updateFermataToolBar(), CAMainWin::updateFingeringToolBar(), CAMainWin::updateFMToolBar(), CAMainWin::updateInstrumentToolBar(), CAMainWin::updateKeySigToolBar(), CAMainWin::updatePlayableToolBar(), CAMainWin::updateRepeatMarkToolBar(), CAMainWin::updateSheetToolBar(), CAMainWin::updateTempoToolBar(), and CAMainWin::updateTimeSigToolBar().
| QColor CAScoreViewPort::selectionAreaColor | ( | ) | [inline] |
References _selectionAreaColor.
Referenced by initScoreViewPort(), and paintEvent().

| void CAScoreViewPort::selectionChanged | ( | ) | [signal] |
Referenced by addMElement(), addToSelection(), clearSelection(), invertSelection(), removeFromSelection(), selectAll(), selectAllCurBar(), selectAllCurContext(), and selectMElement().

| QColor CAScoreViewPort::selectionColor | ( | ) | [inline] |
References _selectionColor.
Referenced by initScoreViewPort(), and paintEvent().

| const QList<QRect>& CAScoreViewPort::selectionRegionList | ( | ) | const [inline] |
References _selectionRegionList.
Referenced by paintEvent().

Selects the drawable music element of the given abstract music element. If there are multiple drawable elements representing a single abstract element, selects the first one.
Returns a pointer to the drawable instance of the given music element or 0 if the music element was not found.
References _drawableMList, _selection, addToSelection(), CAKDTree< T >::at(), CADrawable::isSelectable(), CADrawableMusElement::musElement(), selection(), selectionChanged(), and CAKDTree< T >::size().
Referenced by CAMainWin::insertMusElementAt(), CAMainWin::onTextEditKeyPressEvent(), CAMainWin::scoreViewPortKeyPress(), selectNextMusElement(), and selectPrevMusElement().


| CADrawableMusElement * CAScoreViewPort::selectNextMusElement | ( | bool | append = false | ) |
Selects the next music element in the current context (voice, if selectedVoice is set) or appends the next music element to the selection, if append is True. Returns a pointer to the newly selected drawable music element or 0, if such an element doesn't exist or the selection is empty.
This method is usually called when using the right arrow key.
References _selection, addToSelection(), CAMusElement::context(), CAContext::next(), CAVoice::next(), selectedVoice(), and selectMElement().
Referenced by CAMainWin::scoreViewPortKeyPress().


| CADrawableMusElement * CAScoreViewPort::selectPrevMusElement | ( | bool | append = false | ) |
Selects the next music element in the current context (voice, if selectedVoice is set) or appends the next music element to the selection, if append is True. Returns a pointer to the newly selected drawable music element or 0, if such an element doesn't exist or the selection is empty.
This method is usually called when using the left arrow key.
References _selection, addToSelection(), CAMusElement::context(), CAContext::previous(), CAVoice::previous(), selectedVoice(), and selectMElement().
Referenced by CAMainWin::scoreViewPortKeyPress().


Selects the upper music element in the current context.
Returns a pointer to the newly selected drawable music element or 0, if such an element doesn't exist or the selection is empty.
This method is usually called when using the up arrow key.
References _selection.
Referenced by CAMainWin::scoreViewPortKeyPress().

| void CAScoreViewPort::setBackgroundColor | ( | const QColor | c | ) | [inline] |
References _backgroundColor.
Referenced by initScoreViewPort(), CASettingsDialog::on_uiBackgroundColor_clicked(), and CASettingsDialog::on_uiBackgroundRevert_clicked().

| void CAScoreViewPort::setBorder | ( | const QPen | pen | ) |
Draws the border with the given pen style, color, width and other pen settings. Enables border.
References _borderPen, and _drawBorder.
Referenced by CAMainWin::on_uiPlayFromSelection_toggled(), and CAMainWin::setMode().

| void CAScoreViewPort::setCenterCoords | ( | double | x, |
| double | y, | ||
| bool | animate = false, |
||
| bool | force = false |
||
| ) |
Sets the world coordinates of the viewport, so the given coordinates are the center of the new viewport area. If the area has for eg. negative top-left coordinates, the area is moved to the (0,0) coordinates if force is False. ViewPort's width and height stay intact.
References _checkScrollBarsDeadLock, _worldH, _worldW, checkScrollBars(), setWorldX(), and setWorldY().
Referenced by setZoom().


| void CAScoreViewPort::setCurrentContext | ( | CADrawableContext * | c | ) | [inline] |
References _currentContext.
Referenced by addCElement(), rebuild(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), selectCElement(), selectContext(), and CASettingsDialog::setupPages().

| void CAScoreViewPort::setDisabledElementsColor | ( | const QColor | c | ) | [inline] |
References _disabledElementsColor.
Referenced by initScoreViewPort(), CASettingsDialog::on_uiDisabledElementsColor_clicked(), and CASettingsDialog::on_uiDisabledElementsRevert_clicked().

| void CAScoreViewPort::setDrawShadowNoteAccs | ( | bool | draw | ) | [inline] |
References _drawShadowNoteAccs.
Referenced by initScoreViewPort(), CAMainWin::insertMusElementAt(), and CAMainWin::scoreViewPortKeyPress().

| void CAScoreViewPort::setForegroundColor | ( | const QColor | c | ) | [inline] |
References _foregroundColor.
Referenced by initScoreViewPort(), CASettingsDialog::on_uiForegroundColor_clicked(), and CASettingsDialog::on_uiForegroundRevert_clicked().

| void CAScoreViewPort::setHiddenElementsColor | ( | const QColor | c | ) | [inline] |
References _hiddenElementsColor.
Referenced by initScoreViewPort(), CASettingsDialog::on_uiHiddenElementsColor_clicked(), and CASettingsDialog::on_uiHiddenElementsRevert_clicked().

| void CAScoreViewPort::setLastMousePressCoords | ( | QPoint | p | ) | [inline, private] |
References _lastMousePressCoords.
Referenced by mousePressEvent(), and setLastMousePressCoordsAfter().

| void CAScoreViewPort::setLastMousePressCoordsAfter | ( | const QList< CAMusElement * > | list | ) |
Change the x-coord of the last mouse press coords to after the right most element on the given list.
References _drawableMList, CAKDTree< T >::at(), lastMousePressCoords(), CADrawableMusElement::musElement(), setLastMousePressCoords(), CAKDTree< T >::size(), CADrawable::width(), and CADrawable::xPos().
Referenced by CAMainWin::pasteAt().


| void CAScoreViewPort::setManualScroll | ( | bool | scroll | ) | [inline] |
References _allowManualScroll.
| void CAScoreViewPort::setNoteName | ( | QString | n | ) | [inline] |
References _noteName.
| void CAScoreViewPort::setNoteNameVisible | ( | bool | v | ) | [inline] |
References _noteNameVisible.
Referenced by initScoreViewPort().

| void CAScoreViewPort::setPlaying | ( | bool | playing | ) | [inline] |
References _playing, and playing().
Referenced by CAMainWin::on_uiPlayFromSelection_toggled().


| void CAScoreViewPort::setRepaintArea | ( | QRect * | area | ) | [inline] |
Sets the area to be repainted, not the whole widget.
References _repaintArea.
| void CAScoreViewPort::setResizeDirection | ( | CADrawable::CADirection | r | ) | [inline, private] |
References _resizeDirection.
Referenced by initScoreViewPort(), mousePressEvent(), and mouseReleaseEvent().

| void CAScoreViewPort::setScrollBarVisible | ( | CAScrollBarVisibility | status | ) |
References _hScrollBar, _scrollBarVisible, _vScrollBar, checkScrollBars(), ScrollBarAlwaysHidden, and ScrollBarAlwaysVisible.
Referenced by CASettingsDialog::setupPages().


| void CAScoreViewPort::setSelectedContextColor | ( | const QColor | c | ) | [inline] |
References _selectedContextColor.
Referenced by initScoreViewPort(), CASettingsDialog::on_uiSelectedContextColor_clicked(), and CASettingsDialog::on_uiSelectedContextRevert_clicked().

| void CAScoreViewPort::setSelectedVoice | ( | CAVoice * | selectedVoice | ) | [inline] |
References _selectedVoice, and selectedVoice().
Referenced by initScoreViewPort(), CAMainWin::on_uiVoiceNum_valChanged(), and CAMainWin::sourceViewPortCommit().


| void CAScoreViewPort::setSelectionAreaColor | ( | const QColor | c | ) | [inline] |
References _selectionAreaColor.
Referenced by initScoreViewPort(), CASettingsDialog::on_uiSelectionAreaColor_clicked(), and CASettingsDialog::on_uiSelectionAreaRevert_clicked().

| void CAScoreViewPort::setSelectionColor | ( | const QColor | c | ) | [inline] |
References _selectionColor.
Referenced by initScoreViewPort(), CASettingsDialog::on_uiSelectionColor_clicked(), and CASettingsDialog::on_uiSelectionRevert_clicked().

| void CAScoreViewPort::setShadowNoteAccs | ( | int | accs | ) | [inline] |
References _shadowNoteAccs.
Referenced by initScoreViewPort(), CAMainWin::scoreViewPortKeyPress(), and CAMainWin::scoreViewPortMouseMove().

References _shadowNote, and updateHelpers().
Referenced by CAMainWin::insertMusElementAt(), CAMainWin::on_uiPlayableLength_toggled(), CAMainWin::scoreViewPortKeyPress(), and CAMainWin::scoreViewPortMousePress().


| void CAScoreViewPort::setShadowNoteVisible | ( | bool | visible | ) | [inline] |
References _shadowNoteVisible, and setShadowNoteVisibleOnLeave().
Referenced by initScoreViewPort(), CAMainWin::scoreViewPortMouseMove(), and CAMainWin::setMode().


| void CAScoreViewPort::setShadowNoteVisibleOnLeave | ( | bool | v | ) | [inline, private] |
References _shadowNoteVisibleOnLeave.
Referenced by initScoreViewPort(), and setShadowNoteVisible().

| void CAScoreViewPort::setSheet | ( | CASheet * | sheet | ) | [inline] |
References _sheet, and sheet().
Referenced by initScoreViewPort(), CASettingsDialog::setupPages(), and CAUndoCommand::undoDocument().


| void CAScoreViewPort::setTextEdit | ( | CATextEdit * | e | ) | [inline, private] |
References _textEdit.
Referenced by initScoreViewPort().

| void CAScoreViewPort::setTextEditGeometry | ( | const QRect | r | ) | [inline, private] |
References _textEditGeometry.
Referenced by createTextEdit().

| void CAScoreViewPort::setTextEditVisible | ( | bool | v | ) | [inline, private] |
References _textEditVisible.
Referenced by createTextEdit(), initScoreViewPort(), and removeTextEdit().

| void CAScoreViewPort::setWorldCoords | ( | const QRect | r, |
| bool | animate = false, |
||
| bool | force = false |
||
| ) |
Sets the world coordinates of the viewport to the given rectangle coords. This is an overloaded member function, provided for convenience.
References _checkScrollBarsDeadLock, checkScrollBars(), drawableHeight(), drawableWidth(), setWorldHeight(), setWorldWidth(), setWorldX(), and setWorldY().
Referenced by CAKeybdInput::midiInEventToScore(), on_animationTimer_timeout(), rebuild(), resizeEvent(), zoomToFit(), zoomToHeight(), zoomToSelection(), and zoomToWidth().


| void CAScoreViewPort::setWorldCoords | ( | double | x, |
| double | y, | ||
| double | w, | ||
| double | h, | ||
| bool | animate = false, |
||
| bool | force = false |
||
| ) | [inline] |
References setWorldCoords().
Referenced by setWorldCoords().


| void CAScoreViewPort::setWorldHeight | ( | int | h, |
| bool | force = false |
||
| ) |
Sets the world height of the viewport. If force is True, sets the value despite the potential illegal value (like negative coordinates).
References _drawableCList, _drawableMList, _oldWorldH, _vScrollBar, _vScrollBarDeadLock, _worldH, _worldY, _zoom, checkScrollBars(), drawableHeight(), getMaxYExtended(), and setWorldY().
Referenced by checkScrollBars(), setWorldCoords(), and setZoom().


| void CAScoreViewPort::setWorldWidth | ( | int | w, |
| bool | force = false |
||
| ) |
Sets the world width of the viewport. If force is True, sets the value despite the potential illegal value (like negative coordinates).
References _drawableCList, _drawableMList, _hScrollBar, _hScrollBarDeadLock, _oldWorldW, _worldW, _worldX, _zoom, checkScrollBars(), drawableWidth(), getMaxXExtended(), and setWorldX().
Referenced by checkScrollBars(), setWorldCoords(), and setZoom().


| void CAScoreViewPort::setWorldX | ( | int | x, |
| bool | animate = false, |
||
| bool | force = false |
||
| ) |
Sets the world Top-Left X coordinate of the viewport. Animates the scroll, if animate is True. If force is True, sets the value despite the potential illegal value (like negative coordinates).
References _drawableCList, _drawableMList, _hScrollBar, _hScrollBarDeadLock, _oldWorldX, _targetWorldX, _targetWorldY, _targetZoom, _worldW, _worldX, _worldY, _zoom, checkScrollBars(), getMaxXExtended(), startAnimationTimer(), and updateHelpers().
Referenced by HScrollBarEvent(), CAMainWin::scoreViewPortWheel(), setCenterCoords(), setWorldCoords(), and setWorldWidth().


| void CAScoreViewPort::setWorldY | ( | int | y, |
| bool | animate = false, |
||
| bool | force = false |
||
| ) |
Sets the world Top-Left Y coordinate of the viewport. Animates the scroll, if animate is True. If force is True, sets the value despite the potential illegal value (like negative coordinates).
References _drawableCList, _drawableMList, _oldWorldY, _targetWorldX, _targetWorldY, _targetZoom, _vScrollBar, _vScrollBarDeadLock, _worldH, _worldX, _worldY, _zoom, checkScrollBars(), getMaxYExtended(), startAnimationTimer(), and updateHelpers().
Referenced by CAMainWin::scoreViewPortWheel(), setCenterCoords(), setWorldCoords(), setWorldHeight(), and VScrollBarEvent().


| void CAScoreViewPort::setZoom | ( | float | z, |
| double | x = 0, |
||
| double | y = 0, |
||
| bool | animate = false, |
||
| bool | force = false |
||
| ) |
Zooms to the given level to given direction.
| z | Zoom level. (1.0 = 100%, 1.5 = 150% etc.) |
| x | X coordinate of the point of the zoom direction. |
| y | Y coordinate of the point of the zoom direction. |
| animate | Use smooth animated zoom. |
| force | Use the given world units despite their illegal values (like negative coordinates etc.). |
References _targetWorldX, _targetWorldY, _targetZoom, _worldH, _worldW, _worldX, _worldY, _zoom, checkScrollBars(), drawableHeight(), drawableWidth(), setCenterCoords(), setWorldHeight(), setWorldWidth(), startAnimationTimer(), and updateHelpers().
Referenced by CAMainWin::scoreViewPortWheel(), and CASettingsDialog::setupPages().


| void CAScoreViewPort::setZoom | ( | float | z, |
| QPoint | p, | ||
| bool | animate = false, |
||
| bool | force = false |
||
| ) | [inline] |
Zooms to the given level to given direction. This is an overloaded member function, provided for convenience.
| z | Zoom level. (1.0 = 100%, 1.5 = 150% etc.) |
| p | QPoint of the zoom direction. |
| animate | Use smooth animated zoom. |
| force | Use the given world units despite their illegal values (like negative coordinates etc.). |
References setZoom().
Referenced by setZoom().


| int CAScoreViewPort::shadowNoteAccs | ( | ) | [inline] |
References _shadowNoteAccs.
| bool CAScoreViewPort::shadowNoteVisible | ( | ) | [inline] |
References _shadowNoteVisible.
| bool CAScoreViewPort::shadowNoteVisibleOnLeave | ( | ) | [inline, private] |
References _shadowNoteVisibleOnLeave.
| CASheet * CAScoreViewPort::sheet | ( | ) | [inline] |
Returns the pointer to the viewport's sheet it represents.
References _sheet.
Referenced by CAMainWin::copySelection(), CAMainWin::currentSheet(), CAMainWin::deleteSelection(), CAMainWin::insertMusElementAt(), CATransposeView::on_uiApply_clicked(), CAMainWin::pasteAt(), CAEngraver::reposit(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), CAMainWin::scoreViewPortMouseRelease(), setSheet(), CATransposeView::show(), CAUndoCommand::undoDocument(), and CAMainWin::updateSheetToolBar().

| void CAScoreViewPort::startAnimationTimer | ( | ) | [private] |
References _animationStep, _animationTimer, and on_animationTimer_timeout().
Referenced by setWorldX(), setWorldY(), and setZoom().


| CATextEdit* CAScoreViewPort::textEdit | ( | ) | [inline] |
References _textEdit.
Referenced by createTextEdit(), CAMainWin::onTextEditKeyPressEvent(), removeTextEdit(), and updateHelpers().

| QRect CAScoreViewPort::textEditGeometry | ( | ) | [inline, private] |
References _textEditGeometry.
Referenced by updateHelpers().

| bool CAScoreViewPort::textEditVisible | ( | ) | [inline] |
References _textEditVisible.
Referenced by CAMainWin::setMode(), and updateHelpers().

| double CAScoreViewPort::timeToCoords | ( | int | time | ) |
Returns the X coordinate for the given Canorus time. Returns -1, if such a time doesn't exist in the score.
References _drawableMList, CAKDTree< T >::at(), CADrawableMusElement::musElement(), selection(), CAKDTree< T >::size(), CAMusElement::timeStart(), and CADrawable::xPos().
Referenced by CAEngraver::reposit(), and CAMainWin::scoreViewPortMouseMove().


| double CAScoreViewPort::timeToCoordsSimpleVersion | ( | int | time | ) |
Simple Version of
References _drawableMList, CAKDTree< T >::at(), CADrawableMusElement::musElement(), CAKDTree< T >::size(), CAMusElement::timeStart(), and CADrawable::xPos().
Referenced by CAKeybdInput::midiInEventToScore().


| void CAScoreViewPort::unsetBorder | ( | ) |
Disables the border.
References _drawBorder.
Referenced by CAMainWin::setMode().

| void CAScoreViewPort::updateHelpers | ( | ) |
References _shadowDrawableNote, _shadowNote, _xCursor, _yCursor, currentContext(), CADrawableContext::DrawableStaff, textEdit(), textEditGeometry(), textEditVisible(), worldX(), worldY(), and zoom().
Referenced by createTextEdit(), CAMainWin::insertMusElementAt(), CAKeybdInput::midiInEventToScore(), CAMainWin::on_uiPlayableLength_toggled(), rebuild(), removeTextEdit(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMousePress(), setShadowNoteLength(), setWorldX(), setWorldY(), and setZoom().


| void CAScoreViewPort::VScrollBarEvent | ( | int | val | ) | [private, slot] |
Processes the Vertical scroll bar event. This method is called when the horizontal scrollbar changes its value, let it be internally or due to user interaction.
References _allowManualScroll, _vScrollBarDeadLock, and setWorldY().
Referenced by initScoreViewPort().


| void CAScoreViewPort::wheelEvent | ( | QWheelEvent * | e | ) | [private, slot] |
Processes the wheelEvent(). A new signal is emitted: CAWheelEvent(), which usually gets processed by the parent class then.
References _worldX, _worldY, _xCursor, _yCursor, _zoom, and CAWheelEvent().

| const QRect CAScoreViewPort::worldCoords | ( | ) | [inline] |
References worldHeight(), worldWidth(), worldX(), and worldY().
Referenced by CAKeybdInput::midiInEventToScore(), and rebuild().


| const int CAScoreViewPort::worldHeight | ( | ) | [inline] |
References _worldH.
Referenced by checkScrollBars(), and worldCoords().

| const int CAScoreViewPort::worldWidth | ( | ) | [inline] |
References _worldW.
Referenced by checkScrollBars(), and worldCoords().

| const int CAScoreViewPort::worldX | ( | ) | [inline] |
References _worldX.
Referenced by CAMainWin::scoreViewPortWheel(), updateHelpers(), and worldCoords().

| const int CAScoreViewPort::worldY | ( | ) | [inline] |
References _worldY.
Referenced by CAMainWin::scoreViewPortWheel(), updateHelpers(), and worldCoords().

| float CAScoreViewPort::zoom | ( | ) | [inline] |
Returns the zoom level of the viewport (1.0 = 100%, 1.5 = 150% etc.).
References _zoom.
Referenced by CAMainWin::scoreViewPortWheel(), and updateHelpers().

| void CAScoreViewPort::zoomToFit | ( | bool | animate = false, |
| bool | force = false |
||
| ) |
References _drawableCList, _drawableMList, CAKDTree< T >::getMaxX(), CAKDTree< T >::getMaxY(), and setWorldCoords().

| void CAScoreViewPort::zoomToHeight | ( | bool | animate = false, |
| bool | force = false |
||
| ) |
References _drawableCList, _drawableMList, getMaxYExtended(), and setWorldCoords().

| void CAScoreViewPort::zoomToSelection | ( | bool | animate = false, |
| bool | force = false |
||
| ) |
| void CAScoreViewPort::zoomToWidth | ( | bool | animate = false, |
| bool | force = false |
||
| ) |
References _drawableCList, _drawableMList, getMaxXExtended(), and setWorldCoords().

bool CAScoreViewPort::_allowManualScroll [private] |
This property holds whether a user interaction with the scrollbars actually triggers the scroll of the viewport.
Referenced by HScrollBarEvent(), initScoreViewPort(), manualScroll(), setManualScroll(), and VScrollBarEvent().
int CAScoreViewPort::_animationStep [private] |
Referenced by on_animationTimer_timeout(), and startAnimationTimer().
QTimer* CAScoreViewPort::_animationTimer [private] |
Referenced by initScoreViewPort(), on_animationTimer_timeout(), startAnimationTimer(), and ~CAScoreViewPort().
QColor CAScoreViewPort::_backgroundColor [private] |
Referenced by backgroundColor(), paintEvent(), and setBackgroundColor().
QPen CAScoreViewPort::_borderPen [private] |
Referenced by border(), paintEvent(), and setBorder().
QWidget* CAScoreViewPort::_canvas [private] |
Referenced by drawableHeight(), drawableWidth(), initScoreViewPort(), and paintEvent().
bool CAScoreViewPort::_checkScrollBarsDeadLock [private] |
Referenced by checkScrollBars(), initScoreViewPort(), setCenterCoords(), and setWorldCoords().
QTimer* CAScoreViewPort::_clickTimer [private] |
Referenced by initScoreViewPort(), and mousePressEvent().
Referenced by currentContext(), initScoreViewPort(), paintEvent(), rebuild(), and setCurrentContext().
QColor CAScoreViewPort::_disabledElementsColor [private] |
Referenced by disabledElementsColor(), and setDisabledElementsColor().
CAKDTree<CADrawableContext*> CAScoreViewPort::_drawableCList [private] |
Referenced by addCElement(), checkScrollBars(), clearCElements(), clone(), contextCollision(), findCElement(), findContextsInRegion(), importElements(), nearestDownContext(), nearestUpContext(), paintEvent(), rebuild(), selectCElement(), selectContext(), setWorldHeight(), setWorldWidth(), setWorldX(), setWorldY(), zoomToFit(), zoomToHeight(), zoomToWidth(), and ~CAScoreViewPort().
Referenced by addMElement(), addToSelection(), calculateTime(), checkScrollBars(), clearMElements(), clone(), coordsToTime(), findMElement(), invertSelection(), musElementsAt(), nearestLeftElement(), nearestRightElement(), paintEvent(), rebuild(), removeMElement(), selectAll(), selectMElement(), setLastMousePressCoordsAfter(), setWorldHeight(), setWorldWidth(), setWorldX(), setWorldY(), timeToCoords(), timeToCoordsSimpleVersion(), zoomToFit(), zoomToHeight(), zoomToWidth(), and ~CAScoreViewPort().
bool CAScoreViewPort::_drawBorder [private] |
Referenced by initScoreViewPort(), paintEvent(), setBorder(), and unsetBorder().
bool CAScoreViewPort::_drawShadowNoteAccs [private] |
Referenced by drawShadowNoteAccs(), paintEvent(), and setDrawShadowNoteAccs().
QColor CAScoreViewPort::_foregroundColor [private] |
Referenced by foregroundColor(), and setForegroundColor().
QColor CAScoreViewPort::_hiddenElementsColor [private] |
Referenced by hiddenElementsColor(), and setHiddenElementsColor().
bool CAScoreViewPort::_holdRepaint [private] |
Referenced by checkScrollBars(), initScoreViewPort(), and paintEvent().
QScrollBar* CAScoreViewPort::_hScrollBar [private] |
Referenced by checkScrollBars(), initScoreViewPort(), setScrollBarVisible(), setWorldWidth(), setWorldX(), and ~CAScoreViewPort().
bool CAScoreViewPort::_hScrollBarDeadLock [private] |
Referenced by HScrollBarEvent(), initScoreViewPort(), setWorldWidth(), and setWorldX().
QPoint CAScoreViewPort::_lastMousePressCoords [private] |
Referenced by lastMousePressCoords(), selectAllCurBar(), and setLastMousePressCoords().
QGridLayout* CAScoreViewPort::_layout [private] |
Referenced by initScoreViewPort().
QString CAScoreViewPort::_noteName [private] |
Referenced by noteName(), and setNoteName().
bool CAScoreViewPort::_noteNameVisible [private] |
Referenced by noteNameVisible(), and setNoteNameVisible().
int CAScoreViewPort::_numberOfClicks [private] |
Referenced by mousePressEvent(), and on_clickTimer_timeout().
double CAScoreViewPort::_oldWorldH [private] |
Referenced by initScoreViewPort(), paintEvent(), and setWorldHeight().
double CAScoreViewPort::_oldWorldW [private] |
Referenced by initScoreViewPort(), paintEvent(), and setWorldWidth().
double CAScoreViewPort::_oldWorldX [private] |
Referenced by paintEvent(), and setWorldX().
double CAScoreViewPort::_oldWorldY [private] |
Referenced by paintEvent(), and setWorldY().
bool CAScoreViewPort::_playing [private] |
Referenced by initScoreViewPort(), playing(), and setPlaying().
QRect* CAScoreViewPort::_repaintArea [private] |
Referenced by clearRepaintArea(), initScoreViewPort(), paintEvent(), and setRepaintArea().
Referenced by resizeDirection(), and setResizeDirection().
Referenced by initScoreViewPort(), isScrollBarVisible(), and setScrollBarVisible().
QColor CAScoreViewPort::_selectedContextColor [private] |
Referenced by selectedContextColor(), and setSelectedContextColor().
CAVoice* CAScoreViewPort::_selectedVoice [private] |
Referenced by selectedVoice(), and setSelectedVoice().
QList<CADrawableMusElement *> CAScoreViewPort::_selection [private] |
QColor CAScoreViewPort::_selectionAreaColor [private] |
Referenced by selectionAreaColor(), and setSelectionAreaColor().
QColor CAScoreViewPort::_selectionColor [private] |
Referenced by selectionColor(), and setSelectionColor().
QList<QRect> CAScoreViewPort::_selectionRegionList [private] |
Referenced by addSelectionRegion(), clearSelectionRegionList(), removeSelectionRegion(), and selectionRegionList().
QList<CADrawableNote*> CAScoreViewPort::_shadowDrawableNote [private] |
Referenced by addCElement(), paintEvent(), rebuild(), updateHelpers(), and ~CAScoreViewPort().
QList<CANote*> CAScoreViewPort::_shadowNote [private] |
Referenced by addCElement(), paintEvent(), rebuild(), setShadowNoteLength(), updateHelpers(), and ~CAScoreViewPort().
int CAScoreViewPort::_shadowNoteAccs [private] |
Referenced by paintEvent(), setShadowNoteAccs(), and shadowNoteAccs().
bool CAScoreViewPort::_shadowNoteVisible [private] |
Referenced by enterEvent(), leaveEvent(), paintEvent(), setShadowNoteVisible(), and shadowNoteVisible().
bool CAScoreViewPort::_shadowNoteVisibleOnLeave [private] |
Referenced by enterEvent(), leaveEvent(), setShadowNoteVisibleOnLeave(), and shadowNoteVisibleOnLeave().
CASheet* CAScoreViewPort::_sheet [private] |
Referenced by clone(), setSheet(), and sheet().
double CAScoreViewPort::_targetWorldH [private] |
double CAScoreViewPort::_targetWorldW [private] |
double CAScoreViewPort::_targetWorldX [private] |
Referenced by on_animationTimer_timeout(), setWorldX(), setWorldY(), and setZoom().
double CAScoreViewPort::_targetWorldY [private] |
Referenced by on_animationTimer_timeout(), setWorldX(), setWorldY(), and setZoom().
float CAScoreViewPort::_targetZoom [private] |
Referenced by on_animationTimer_timeout(), setWorldX(), setWorldY(), and setZoom().
CATextEdit* CAScoreViewPort::_textEdit [private] |
Referenced by setTextEdit(), and textEdit().
QRect CAScoreViewPort::_textEditGeometry [private] |
Referenced by setTextEditGeometry(), and textEditGeometry().
bool CAScoreViewPort::_textEditVisible [private] |
Referenced by setTextEditVisible(), and textEditVisible().
QScrollBar * CAScoreViewPort::_vScrollBar [private] |
Referenced by checkScrollBars(), initScoreViewPort(), setScrollBarVisible(), setWorldHeight(), setWorldY(), and ~CAScoreViewPort().
bool CAScoreViewPort::_vScrollBarDeadLock [private] |
Referenced by initScoreViewPort(), setWorldHeight(), setWorldY(), and VScrollBarEvent().
double CAScoreViewPort::_worldH [private] |
Referenced by initScoreViewPort(), paintEvent(), setCenterCoords(), setWorldHeight(), setWorldY(), setZoom(), and worldHeight().
double CAScoreViewPort::_worldW [private] |
Referenced by initScoreViewPort(), paintEvent(), setCenterCoords(), setWorldWidth(), setWorldX(), setZoom(), and worldWidth().
double CAScoreViewPort::_worldX [private] |
double CAScoreViewPort::_worldY [private] |
double CAScoreViewPort::_xCursor [private] |
Referenced by initScoreViewPort(), mouseMoveEvent(), paintEvent(), updateHelpers(), and wheelEvent().
double CAScoreViewPort::_yCursor [private] |
Referenced by initScoreViewPort(), mouseMoveEvent(), paintEvent(), updateHelpers(), and wheelEvent().
float CAScoreViewPort::_zoom [private] |
const int CAScoreViewPort::ANIMATION_STEPS = 7 [static, private] |
Referenced by on_animationTimer_timeout().
const int CAScoreViewPort::BOTTOM_EXTRA_SPACE = 30 [static, private] |
Referenced by getMaxYExtended().
const int CAScoreViewPort::RIGHT_EXTRA_SPACE = 100 [static, private] |
Copyright (c) 2006-2009, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.GPL for details.
Referenced by getMaxXExtended().
1.8.0