#include <scoreviewport.h>

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).
Definition at line 51 of file scoreviewport.h.
Different behaviour of the scroll bars:
Definition at line 55 of file scoreviewport.h.
| CAScoreViewPort::CAScoreViewPort | ( | QWidget * | parent = 0 |
) |
Definition at line 107 of file scoreviewport.cpp.
References initScoreViewPort().
Referenced by clone().


Definition at line 102 of file scoreviewport.cpp.
References initScoreViewPort().

| CAScoreViewPort::~CAScoreViewPort | ( | ) | [virtual] |
Definition at line 185 of file scoreviewport.cpp.
References _animationTimer, _drawableCList, _drawableMList, _hScrollBar, _shadowDrawableNote, _shadowNote, _vScrollBar, and CAKDTree< T >::clear().

| 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.
Definition at line 220 of file scoreviewport.cpp.
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.
Definition at line 228 of file scoreviewport.cpp.
References _drawableCList, _drawableMList, _sheet, CAScoreViewPort(), and importElements().

| CASheet * CAScoreViewPort::sheet | ( | ) | [inline] |
Returns the pointer to the viewport's sheet it represents.
Definition at line 69 of file scoreviewport.h.
References _sheet.
Referenced by CAMainWin::currentSheet(), CAMainWin::deleteSelection(), CAMainWin::insertMusElementAt(), CAEngraver::reposit(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), CAMainWin::scoreViewPortMouseRelease(), CAUndoCommand::undoDocument(), and CAMainWin::updateSheetToolBar().

| void CAScoreViewPort::setSheet | ( | CASheet * | sheet | ) | [inline] |
Definition at line 70 of file scoreviewport.h.
References _sheet.
Referenced by initScoreViewPort(), and CAUndoCommand::undoDocument().

| 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.
Definition at line 240 of file scoreviewport.cpp.
References _drawableMList, _selection, CAKDTree< T >::addElement(), CADrawableContext::addMElement(), addToSelection(), CADrawableMusElement::drawableContext(), and selectionChanged().
Referenced by importElements(), importMElements(), CAEngraver::placeMarks(), and CAEngraver::reposit().


| 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.
Definition at line 254 of file scoreviewport.cpp.
References _drawableCList, _shadowDrawableNote, _shadowNote, CAKDTree< T >::addElement(), CADrawableContext::drawableContextType(), CADrawableContext::DrawableStaff, setCurrentContext(), and CAPlayable::Whole.
Referenced by importCElements(), importElements(), and CAEngraver::reposit().


| CAMusElement * CAScoreViewPort::removeMElement | ( | int | x, | |
| int | 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.
Definition at line 356 of file scoreviewport.cpp.
References _drawableMList, CADrawableMusElement::DrawableClef, CADrawableMusElement::drawableContext(), CADrawableMusElement::DrawableKeySignature, CADrawableMusElement::drawableMusElementType(), CADrawableMusElement::DrawableTimeSignature, CADrawableMusElement::musElement(), CAKDTree< T >::removeElement(), and CADrawableContext::removeMElement().

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


| void CAScoreViewPort::importMElements | ( | CAKDTree< CADrawableMusElement * > * | elts | ) |
Definition at line 394 of file scoreviewport.cpp.
References addMElement(), CAKDTree< T >::at(), CADrawableMusElement::clone(), and CAKDTree< T >::size().

| void CAScoreViewPort::importCElements | ( | CAKDTree< CADrawableContext * > * | elts | ) |
Definition at line 399 of file scoreviewport.cpp.
References addCElement(), CAKDTree< T >::at(), CADrawableContext::clone(), and CAKDTree< T >::size().

| QList< CAMusElement * > CAScoreViewPort::selection | ( | ) | [inline] |
Returns a list of the currently selected drawable music elements.
Definition at line 86 of file scoreviewport.h.
References _selection.
Referenced by CAPlugin::callAction(), coordsToTime(), CAMainWin::copySelection(), CAMainWin::deleteSelection(), CAMainWin::insertMusElementAt(), mouseMoveEvent(), mousePressEvent(), 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::onTextEditKeyPressEvent(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMousePress(), selectMElement(), CAMainWin::setMode(), 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().

| QList< CADrawableMusElement * > CAScoreViewPort::musElementsAt | ( | int | x, | |
| int | 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.
Definition at line 317 of file scoreviewport.cpp.
References _drawableMList, CAKDTree< T >::findInRange(), and selectedVoice().
Referenced by CAMainWin::insertMusElementAt(), and CAMainWin::scoreViewPortMousePress().


| CADrawableContext * CAScoreViewPort::selectCElement | ( | int | x, | |
| int | 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.
Definition at line 299 of file scoreviewport.cpp.
References _drawableCList, currentContext(), CAKDTree< T >::findInRange(), and setCurrentContext().
Referenced by CAMainWin::scoreViewPortMousePress().

| CADrawableMusElement * CAScoreViewPort::selectMElement | ( | CAMusElement * | elt | ) |
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.
Definition at line 334 of file scoreviewport.cpp.
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().


| 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.
Definition at line 276 of file scoreviewport.cpp.
References _drawableCList, CAKDTree< T >::at(), setCurrentContext(), and CAKDTree< T >::size().
Referenced by CAMainWin::newDocument(), CAMainWin::on_uiImportDocument_triggered(), CAMainWin::openDocument(), and CAMainWin::scoreViewPortMousePress().


| QPoint CAScoreViewPort::lastMousePressCoords | ( | ) | [inline] |
Definition at line 91 of file scoreviewport.h.
References _lastMousePressCoords.
Referenced by CAMainWin::scoreViewPortMouseMove(), and CAMainWin::scoreViewPortMouseRelease().
| CADrawableContext* CAScoreViewPort::currentContext | ( | ) | [inline] |
Definition at line 93 of file scoreviewport.h.
References _currentContext.
Referenced by CAMainWin::insertMusElementAt(), CAMainWin::onTextEditKeyPressEvent(), CAMainWin::pasteAt(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMousePress(), selectCElement(), updateHelpers(), and CAMainWin::updateSheetToolBar().

| void CAScoreViewPort::setCurrentContext | ( | CADrawableContext * | c | ) | [inline] |
Definition at line 94 of file scoreviewport.h.
References _currentContext.
Referenced by addCElement(), rebuild(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), selectCElement(), and selectContext().

| void CAScoreViewPort::clearSelection | ( | ) | [inline] |
Clears the current selection. Its behaviour is the same as calling clearMSelection() and clearCSelection().
Definition at line 96 of file scoreviewport.h.
References _selection, and selectionChanged().
Referenced by CAMainWin::deleteSelection(), CAMainWin::on_uiPlayFromSelection_toggled(), CAMainWin::on_uiRemoveVoice_triggered(), CAMainWin::onRepaintTimerTimeout(), CAMainWin::pasteAt(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), and CAMainWin::scoreViewPortMouseRelease().

| 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.
Definition at line 97 of file scoreviewport.h.
References _selection, and selectionChanged().
Referenced by CAMainWin::scoreViewPortMousePress().
| void CAScoreViewPort::addToSelection | ( | CADrawableMusElement * | elt, | |
| bool | triggerSignal = true | |||
| ) |
Adds the given drawable music element elt to the current selection.
Definition at line 1308 of file scoreviewport.cpp.
References _selection, CADrawable::isSelectable(), selectionChanged(), and CADrawable::xPos().
Referenced by addMElement(), addToSelection(), CAMainWin::onRepaintTimerTimeout(), CAMainWin::pasteAt(), rebuild(), CAMainWin::scoreViewPortMousePress(), CAMainWin::scoreViewPortMouseRelease(), selectMElement(), selectNextMusElement(), and selectPrevMusElement().


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

| CADrawableMusElement * CAScoreViewPort::addToSelection | ( | CAMusElement * | elt | ) |
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.
Definition at line 1335 of file scoreviewport.cpp.
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.
Definition at line 1348 of file scoreviewport.cpp.
References _drawableMList, addToSelection(), CAKDTree< T >::at(), CADrawable::isSelectable(), selectionChanged(), and CAKDTree< T >::size().

| 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.
Definition at line 1232 of file scoreviewport.cpp.
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.
Definition at line 1258 of file scoreviewport.cpp.
References _selection, addToSelection(), CAMusElement::context(), CAContext::previous(), CAVoice::previous(), selectedVoice(), and selectMElement().
Referenced by CAMainWin::scoreViewPortKeyPress().

| CADrawableMusElement * CAScoreViewPort::selectUpMusElement | ( | ) |
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.
Definition at line 1284 of file scoreviewport.cpp.
References _selection.
Referenced by CAMainWin::scoreViewPortKeyPress().
| CADrawableMusElement * CAScoreViewPort::selectDownMusElement | ( | ) |
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.
Definition at line 1298 of file scoreviewport.cpp.
References _selection.
| const QList<QRect>& CAScoreViewPort::selectionRegionList | ( | ) | const [inline] |
Definition at line 109 of file scoreviewport.h.
References _selectionRegionList.
Referenced by paintEvent().
| void CAScoreViewPort::addSelectionRegion | ( | QRect | r | ) | [inline] |
Definition at line 110 of file scoreviewport.h.
References _selectionRegionList.
Referenced by CAMainWin::scoreViewPortMouseMove().
| void CAScoreViewPort::removeSelectionRegion | ( | QRect | r | ) | [inline] |
| void CAScoreViewPort::clearSelectionRegionList | ( | ) | [inline] |
Definition at line 112 of file scoreviewport.h.
References _selectionRegionList.
Referenced by CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMousePress(), and CAMainWin::scoreViewPortMouseRelease().
| CADrawable::CADirection CAScoreViewPort::resizeDirection | ( | ) | [inline] |
Definition at line 113 of file scoreviewport.h.
References _resizeDirection.
Referenced by CAMainWin::scoreViewPortMouseMove(), CAMainWin::scoreViewPortMousePress(), and CAMainWin::scoreViewPortMouseRelease().
| CADrawableMusElement * CAScoreViewPort::findMElement | ( | CAMusElement * | elt | ) |
Finds the drawable instance of the given abstract music element.
Definition at line 1366 of file scoreviewport.cpp.
References _drawableMList, CAKDTree< T >::at(), and CAKDTree< T >::size().
Referenced by createTextEdit(), and CAEngraver::reposit().


| CADrawableContext * CAScoreViewPort::findCElement | ( | CAContext * | context | ) |
Finds the drawable instance of the given abstract context.
Definition at line 1377 of file scoreviewport.cpp.
References _drawableCList, CAKDTree< T >::at(), and CAKDTree< T >::size().

| 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.
Definition at line 1459 of file scoreviewport.cpp.
References _drawableCList, and CAKDTree< T >::findInRange().
Referenced by CAMainWin::scoreViewPortMouseMove(), and CAMainWin::scoreViewPortMouseRelease().

| CADrawableMusElement * CAScoreViewPort::nearestLeftElement | ( | int | x, | |
| int | y, | |||
| bool | currentContext = true | |||
| ) |
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. Returns the nearest element in the current context only, if currentContext is true (default).
Definition at line 409 of file scoreviewport.cpp.
References _currentContext, _drawableMList, and CAKDTree< T >::findNearestLeft().
Referenced by coordsToTime(), and CAMainWin::insertMusElementAt().


| CADrawableMusElement * CAScoreViewPort::nearestLeftElement | ( | int | x, | |
| int | 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.
Definition at line 418 of file scoreviewport.cpp.
References _drawableMList, and CAKDTree< T >::findNearestLeft().

| CADrawableMusElement * CAScoreViewPort::nearestRightElement | ( | int | x, | |
| int | y, | |||
| bool | currentContext = true | |||
| ) |
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. Returns the nearest element in the current context only, if currentContext is true (default).
Definition at line 427 of file scoreviewport.cpp.
References _currentContext, _drawableMList, and CAKDTree< T >::findNearestRight().
Referenced by coordsToTime(), CAMainWin::insertMusElementAt(), and CAMainWin::pasteAt().


| CADrawableMusElement * CAScoreViewPort::nearestRightElement | ( | int | x, | |
| int | 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.
Definition at line 436 of file scoreviewport.cpp.
References _drawableMList, and CAKDTree< T >::findNearestRight().

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

| int 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.
Definition at line 1499 of file scoreviewport.cpp.
References _drawableMList, CAKDTree< T >::at(), CADrawableMusElement::musElement(), selection(), CAKDTree< T >::size(), CAMusElement::timeStart(), and CADrawable::xPos().
Referenced by CAEngraver::reposit(), and CAMainWin::scoreViewPortMouseMove().


| CADrawableContext * CAScoreViewPort::nearestUpContext | ( | int | x, | |
| int | y | |||
| ) |
Returns a pointer to the nearest upper drawable context from the given coordinates.
Definition at line 444 of file scoreviewport.cpp.
References _drawableCList, and CAKDTree< T >::findNearestUp().
Referenced by CAMainWin::scoreViewPortMousePress().

| CADrawableContext * CAScoreViewPort::nearestDownContext | ( | int | x, | |
| int | y | |||
| ) |
Returns a pointer to the nearest upper drawable context from the given coordinates.
Definition at line 452 of file scoreviewport.cpp.
References _drawableCList, and CAKDTree< T >::findNearestDown().

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

| CAContext * CAScoreViewPort::contextCollision | ( | int | x, | |
| int | y | |||
| ) |
If the given coordinates hit any of the contexts, returns that context.
Definition at line 474 of file scoreviewport.cpp.
References _drawableCList, and CAKDTree< T >::findInRange().

| void CAScoreViewPort::setManualScroll | ( | bool | scroll | ) | [inline] |
| bool CAScoreViewPort::manualScroll | ( | ) | [inline] |
| 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.
Definition at line 1035 of file scoreviewport.cpp.
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().


| CAScrollBarVisibility CAScoreViewPort::isScrollBarVisible | ( | ) | [inline] |
Definition at line 143 of file scoreviewport.h.
References _scrollBarVisible.
Referenced by checkScrollBars().

| void CAScoreViewPort::setScrollBarVisible | ( | CAScrollBarVisibility | status | ) |
Definition at line 1167 of file scoreviewport.cpp.
References _hScrollBar, _scrollBarVisible, _vScrollBar, checkScrollBars(), ScrollBarAlwaysHidden, and ScrollBarAlwaysVisible.

| void CAScoreViewPort::rebuild | ( | ) | [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.
Implements CAViewPort.
Definition at line 484 of file scoreviewport.cpp.
References _currentContext, _drawableCList, _drawableMList, _selection, _shadowDrawableNote, _shadowNote, addToSelection(), checkScrollBars(), CAKDTree< T >::clear(), CAKDTree< T >::list(), CAEngraver::reposit(), setCurrentContext(), CAKDTree< T >::size(), and updateHelpers().
Referenced by CAMainWin::on_uiScoreView_triggered().

| const int CAScoreViewPort::drawableWidth | ( | ) | [inline] |
Definition at line 150 of file scoreviewport.h.
References _canvas.
Referenced by checkScrollBars(), on__animationTimer_timeout(), paintEvent(), resizeEvent(), setWorldCoords(), setWorldWidth(), and setZoom().

| const int CAScoreViewPort::drawableHeight | ( | ) | [inline] |
Definition at line 151 of file scoreviewport.h.
References _canvas.
Referenced by checkScrollBars(), on__animationTimer_timeout(), paintEvent(), resizeEvent(), setWorldCoords(), setWorldHeight(), 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).
Definition at line 524 of file scoreviewport.cpp.
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).
Definition at line 557 of file scoreviewport.cpp.
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::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).
Definition at line 590 of file scoreviewport.cpp.
References _drawableCList, _drawableMList, _hScrollBar, _hScrollBarDeadLock, _oldWorldW, _worldW, _worldX, _zoom, checkScrollBars(), drawableWidth(), getMaxXExtended(), and setWorldX().
Referenced by checkScrollBars(), setWorldCoords(), and setZoom().


| 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).
Definition at line 620 of file scoreviewport.cpp.
References _drawableCList, _drawableMList, _oldWorldH, _vScrollBar, _vScrollBarDeadLock, _worldH, _worldY, _zoom, checkScrollBars(), drawableHeight(), getMaxYExtended(), and setWorldY().
Referenced by checkScrollBars(), setWorldCoords(), and setZoom().


| const int CAScoreViewPort::worldX | ( | ) | [inline] |
Definition at line 158 of file scoreviewport.h.
References _worldX.
Referenced by CAMainWin::scoreViewPortWheel(), updateHelpers(), and worldCoords().

| const int CAScoreViewPort::worldY | ( | ) | [inline] |
Definition at line 159 of file scoreviewport.h.
References _worldY.
Referenced by CAMainWin::scoreViewPortWheel(), updateHelpers(), and worldCoords().

| const int CAScoreViewPort::worldWidth | ( | ) | [inline] |
Definition at line 160 of file scoreviewport.h.
References _worldW.
Referenced by checkScrollBars(), and worldCoords().

| const int CAScoreViewPort::worldHeight | ( | ) | [inline] |
Definition at line 161 of file scoreviewport.h.
References _worldH.
Referenced by checkScrollBars(), and worldCoords().

| const QRect CAScoreViewPort::worldCoords | ( | ) | [inline] |
Definition at line 162 of file scoreviewport.h.
References worldHeight(), worldWidth(), worldX(), and worldY().

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

| 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.
Definition at line 650 of file scoreviewport.cpp.
References _checkScrollBarsDeadLock, checkScrollBars(), drawableHeight(), drawableWidth(), setWorldHeight(), setWorldWidth(), setWorldX(), and setWorldY().
Referenced by on__animationTimer_timeout(), resizeEvent(), setWorldCoords(), zoomToFit(), zoomToHeight(), zoomToSelection(), and zoomToWidth().


| void CAScoreViewPort::setWorldCoords | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h, | |||
| bool | animate = false, |
|||
| bool | force = false | |||
| ) | [inline] |
Sets the world coordinates of the viewport. This is an overloaded member function, provided for convenience.
| x | Top-left X coordinate of the new viewport area in absolute world units. | |
| y | Top-left Y coordinate of the new viewport area in absolute world units. | |
| w | Width of the new viewport area in absolute world units. | |
| h | Height of the new viewport area in absolute world units. | |
| animate | Use animated scroll. | |
| force | Use the given world units despite their illegal values (like negative coordinates etc.). |
Definition at line 167 of file scoreviewport.h.
References setWorldCoords().

| void CAScoreViewPort::setCenterCoords | ( | int | x, | |
| int | 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.
Definition at line 735 of file scoreviewport.cpp.
References _checkScrollBarsDeadLock, _worldH, _worldW, checkScrollBars(), setWorldX(), and setWorldY().
Referenced by setZoom().


| void CAScoreViewPort::setZoom | ( | float | z, | |
| int | x = 0, |
|||
| int | 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.). |
Definition at line 754 of file scoreviewport.cpp.
References _targetWorldX, _targetWorldY, _targetZoom, _worldH, _worldW, _worldX, _worldY, _zoom, checkScrollBars(), drawableHeight(), drawableWidth(), setCenterCoords(), setWorldHeight(), setWorldWidth(), startAnimationTimer(), and updateHelpers().
Referenced by CAMainWin::scoreViewPortWheel(), and setZoom().


| 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.). |
Definition at line 172 of file scoreviewport.h.
References setZoom().

| void CAScoreViewPort::zoomToSelection | ( | bool | animate = false, |
|
| bool | force = false | |||
| ) |
Definition at line 690 of file scoreviewport.cpp.
References _selection, and setWorldCoords().

| void CAScoreViewPort::zoomToWidth | ( | bool | animate = false, |
|
| bool | force = false | |||
| ) |
Definition at line 712 of file scoreviewport.cpp.
References _drawableCList, _drawableMList, getMaxXExtended(), and setWorldCoords().

| void CAScoreViewPort::zoomToHeight | ( | bool | animate = false, |
|
| bool | force = false | |||
| ) |
Definition at line 717 of file scoreviewport.cpp.
References _drawableCList, _drawableMList, getMaxYExtended(), and setWorldCoords().

| void CAScoreViewPort::zoomToFit | ( | bool | animate = false, |
|
| bool | force = false | |||
| ) |
Definition at line 722 of file scoreviewport.cpp.
References _drawableCList, _drawableMList, CAKDTree< T >::getMaxX(), CAKDTree< T >::getMaxY(), and setWorldCoords().

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

| void CAScoreViewPort::unsetBorder | ( | ) |
Disables the border.
Definition at line 1017 of file scoreviewport.cpp.
References _drawBorder.
Referenced by CAMainWin::setMode().

| QPen CAScoreViewPort::border | ( | ) | [inline] |
| QColor CAScoreViewPort::backgroundColor | ( | ) | [inline] |
Definition at line 182 of file scoreviewport.h.
References _backgroundColor.
Referenced by initScoreViewPort().

| void CAScoreViewPort::setBackgroundColor | ( | const QColor | c | ) | [inline] |
Definition at line 183 of file scoreviewport.h.
References _backgroundColor.
Referenced by initScoreViewPort().

| QColor CAScoreViewPort::foregroundColor | ( | ) | [inline] |
Definition at line 184 of file scoreviewport.h.
References _foregroundColor.
Referenced by initScoreViewPort(), and paintEvent().

| void CAScoreViewPort::setForegroundColor | ( | const QColor | c | ) | [inline] |
Definition at line 185 of file scoreviewport.h.
References _foregroundColor.
Referenced by initScoreViewPort().

| QColor CAScoreViewPort::selectionColor | ( | ) | [inline] |
Definition at line 186 of file scoreviewport.h.
References _selectionColor.
Referenced by initScoreViewPort(), and paintEvent().

| void CAScoreViewPort::setSelectionColor | ( | const QColor | c | ) | [inline] |
Definition at line 187 of file scoreviewport.h.
References _selectionColor.
Referenced by initScoreViewPort().

| QColor CAScoreViewPort::selectionAreaColor | ( | ) | [inline] |
Definition at line 188 of file scoreviewport.h.
References _selectionAreaColor.
Referenced by initScoreViewPort(), and paintEvent().

| void CAScoreViewPort::setSelectionAreaColor | ( | const QColor | c | ) | [inline] |
Definition at line 189 of file scoreviewport.h.
References _selectionAreaColor.
Referenced by initScoreViewPort().

| QColor CAScoreViewPort::selectedContextColor | ( | ) | [inline] |
Definition at line 190 of file scoreviewport.h.
References _selectedContextColor.
Referenced by initScoreViewPort(), and paintEvent().

| void CAScoreViewPort::setSelectedContextColor | ( | const QColor | c | ) | [inline] |
Definition at line 191 of file scoreviewport.h.
References _selectedContextColor.
Referenced by initScoreViewPort().

| QColor CAScoreViewPort::hiddenElementsColor | ( | ) | [inline] |
Definition at line 192 of file scoreviewport.h.
References _hiddenElementsColor.
Referenced by initScoreViewPort(), and paintEvent().

| void CAScoreViewPort::setHiddenElementsColor | ( | const QColor | c | ) | [inline] |
Definition at line 193 of file scoreviewport.h.
References _hiddenElementsColor.
Referenced by initScoreViewPort().

| QColor CAScoreViewPort::disabledElementsColor | ( | ) | [inline] |
Definition at line 194 of file scoreviewport.h.
References _disabledElementsColor.
Referenced by initScoreViewPort(), and paintEvent().

| void CAScoreViewPort::setDisabledElementsColor | ( | const QColor | c | ) | [inline] |
Definition at line 195 of file scoreviewport.h.
References _disabledElementsColor.
Referenced by initScoreViewPort().

| bool CAScoreViewPort::playing | ( | ) | [inline] |
Definition at line 197 of file scoreviewport.h.
References _playing.
Referenced by CAMainWin::setMode().

| void CAScoreViewPort::setPlaying | ( | bool | playing | ) | [inline] |
Definition at line 198 of file scoreviewport.h.
References _playing.
Referenced by CAMainWin::on_uiPlayFromSelection_toggled().
| void CAScoreViewPort::setRepaintArea | ( | QRect * | area | ) | [inline] |
Sets the area to be repainted, not the whole widget.
Definition at line 200 of file scoreviewport.h.
References _repaintArea.
| void CAScoreViewPort::clearRepaintArea | ( | ) | [inline] |
Disables and deletes the area to be repainted.
Definition at line 201 of file scoreviewport.h.
References _repaintArea.
| CAVoice* CAScoreViewPort::selectedVoice | ( | ) | [inline] |
Definition at line 203 of file scoreviewport.h.
References _selectedVoice.
Referenced by musElementsAt(), paintEvent(), CAMainWin::scoreViewPortMouseRelease(), selectNextMusElement(), and selectPrevMusElement().

| void CAScoreViewPort::setSelectedVoice | ( | CAVoice * | selectedVoice | ) | [inline] |
Definition at line 204 of file scoreviewport.h.
References _selectedVoice.
Referenced by initScoreViewPort(), and CAMainWin::on_uiVoiceNum_valChanged().

| bool CAScoreViewPort::shadowNoteVisible | ( | ) | [inline] |
| void CAScoreViewPort::setShadowNoteVisible | ( | bool | visible | ) | [inline] |
Definition at line 207 of file scoreviewport.h.
References _shadowNoteVisible, and setShadowNoteVisibleOnLeave().
Referenced by initScoreViewPort(), CAMainWin::scoreViewPortMouseMove(), and CAMainWin::setMode().


| bool CAScoreViewPort::drawShadowNoteAccs | ( | ) | [inline] |
| void CAScoreViewPort::setDrawShadowNoteAccs | ( | bool | draw | ) | [inline] |
Definition at line 210 of file scoreviewport.h.
References _drawShadowNoteAccs.
Referenced by initScoreViewPort(), CAMainWin::insertMusElementAt(), and CAMainWin::scoreViewPortKeyPress().

| int CAScoreViewPort::shadowNoteAccs | ( | ) | [inline] |
| void CAScoreViewPort::setShadowNoteAccs | ( | int | accs | ) | [inline] |
Definition at line 213 of file scoreviewport.h.
References _shadowNoteAccs.
Referenced by initScoreViewPort(), CAMainWin::scoreViewPortKeyPress(), and CAMainWin::scoreViewPortMouseMove().

| void CAScoreViewPort::setShadowNoteDotted | ( | int | dotted | ) | [inline] |
Definition at line 215 of file scoreviewport.h.
References _shadowNote.
Referenced by CAMainWin::insertMusElementAt(), CAMainWin::scoreViewPortKeyPress(), and CAMainWin::scoreViewPortMousePress().

| CATextEdit * CAScoreViewPort::createTextEdit | ( | CADrawableMusElement * | dMusElt | ) |
Creates a CATextEdit widget over the existing drawable syllable dMusElt. Returns the pointer to the created widget.
Definition at line 1389 of file scoreviewport.cpp.
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().


| CATextEdit* CAScoreViewPort::textEdit | ( | ) | [inline] |
Definition at line 218 of file scoreviewport.h.
References _textEdit.
Referenced by createTextEdit(), CAMainWin::onTextEditKeyPressEvent(), removeTextEdit(), and updateHelpers().

| void CAScoreViewPort::removeTextEdit | ( | ) |
Removes and deletes the text edit when quitting text editing mode.
Definition at line 1429 of file scoreviewport.cpp.
References setTextEditVisible(), textEdit(), and updateHelpers().
Referenced by CAMainWin::onTextEditKeyPressEvent(), CAMainWin::scoreViewPortMousePress(), and CAMainWin::setMode().


| bool CAScoreViewPort::textEditVisible | ( | ) | [inline] |
Definition at line 220 of file scoreviewport.h.
References _textEditVisible.
Referenced by CAMainWin::setMode(), and updateHelpers().

| void CAScoreViewPort::updateHelpers | ( | ) |
Definition at line 971 of file scoreviewport.cpp.
References _shadowDrawableNote, _shadowNote, _xCursor, _yCursor, CAClef::c1(), currentContext(), CADrawableContext::DrawableStaff, textEdit(), textEditGeometry(), textEditVisible(), worldX(), worldY(), and zoom().
Referenced by createTextEdit(), mouseMoveEvent(), rebuild(), removeTextEdit(), setWorldX(), setWorldY(), and setZoom().


| void CAScoreViewPort::mousePressEvent | ( | QMouseEvent * | e | ) | [private, virtual, slot] |
Processes the mousePressEvent(). A new signal is emitted: CAMousePressEvent(), which usually gets processed by the parent class then.
Reimplemented from CAViewPort.
Definition at line 1077 of file scoreviewport.cpp.
References _worldX, _worldY, _zoom, CADrawable::Bottom, CAMousePressEvent(), CADrawable::Left, CADrawable::Right, selection(), setLastMousePressCoords(), setResizeDirection(), and CADrawable::Top.
| void CAScoreViewPort::mouseMoveEvent | ( | QMouseEvent * | e | ) | [private, virtual, slot] |
Processes the mouseMoveEvent(). A new signal is emitted: CAMouseMoveEvent(), which usually gets processed by the parent class then.
Reimplemented from CAViewPort.
Definition at line 1110 of file scoreviewport.cpp.
References _shadowNoteVisible, _worldX, _worldY, _xCursor, _yCursor, _zoom, CAMouseMoveEvent(), selection(), and updateHelpers().
| void CAScoreViewPort::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [private, virtual, slot] |
Processes the mouseReleaseEvent(). A new signal is emitted: CAMouseReleaseEvent(), which usually gets processed by the parent class then.
Reimplemented from CAViewPort.
Definition at line 1101 of file scoreviewport.cpp.
References _worldX, _worldY, _zoom, CAMouseReleaseEvent(), setResizeDirection(), and CADrawable::Undefined.
| void CAScoreViewPort::wheelEvent | ( | QWheelEvent * | e | ) | [private, virtual, slot] |
Processes the wheelEvent(). A new signal is emitted: CAWheelEvent(), which usually gets processed by the parent class then.
Reimplemented from CAViewPort.
Definition at line 1150 of file scoreviewport.cpp.
References _worldX, _worldY, _xCursor, _yCursor, _zoom, and CAWheelEvent().
| void CAScoreViewPort::keyPressEvent | ( | QKeyEvent * | e | ) | [private, virtual, slot] |
Processes the keyPressEvent(). A new signal is emitted: CAKeyPressEvent(), which usually gets processed by the parent class then.
Reimplemented from CAViewPort.
Definition at line 1163 of file scoreviewport.cpp.
References CAKeyPressEvent().
| 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.
Definition at line 1189 of file scoreviewport.cpp.
References _allowManualScroll, _hScrollBarDeadLock, and setWorldX().
Referenced by initScoreViewPort().
| 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.
Definition at line 1200 of file scoreviewport.cpp.
References _allowManualScroll, _vScrollBarDeadLock, and setWorldY().
Referenced by initScoreViewPort().
| 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.
Definition at line 1025 of file scoreviewport.cpp.
References _worldX, _worldY, _zoom, drawableHeight(), drawableWidth(), and setWorldCoords().
| void CAScoreViewPort::paintEvent | ( | QPaintEvent * | e | ) | [private, slot] |
General Qt's paint event. All the music elements get actually rendered in this method.
Definition at line 812 of file scoreviewport.cpp.
References _backgroundColor, _borderPen, _canvas, _currentContext, _drawableCList, _drawableMList, _drawBorder, _drawShadowNoteAccs, _holdRepaint, _oldWorldH, _oldWorldW, _oldWorldX, _oldWorldY, _repaintArea, _selection, _shadowDrawableNote, _shadowNoteAccs, _shadowNoteVisible, _worldH, _worldW, _worldX, _worldY, _zoom, CADrawSettings::color, CAMusElement::context(), disabledElementsColor(), CADrawableAccidental::draw(), drawableHeight(), drawableWidth(), drawSelectionRegion(), CAKDTree< T >::findInRange(), foregroundColor(), CARest::Hidden, hiddenElementsColor(), CAMusElement::isPlayable(), CAMusElement::musElementType(), CAMusElement::Rest, selectedContextColor(), selectedVoice(), selectionAreaColor(), selectionColor(), selectionRegionList(), CAKDTree< T >::size(), CAVoice::staff(), CADrawable::width(), CADrawSettings::x, CADrawSettings::y, and CADrawable::yPos().
| void CAScoreViewPort::leaveEvent | ( | QEvent * | e | ) | [private, slot] |
Definition at line 1207 of file scoreviewport.cpp.
References _shadowNoteVisible, and _shadowNoteVisibleOnLeave.
| void CAScoreViewPort::enterEvent | ( | QEvent * | e | ) | [private, slot] |
Definition at line 1213 of file scoreviewport.cpp.
References _shadowNoteVisible, and _shadowNoteVisibleOnLeave.
| void CAScoreViewPort::on__animationTimer_timeout | ( | ) | [private, slot] |
Definition at line 203 of file scoreviewport.cpp.
References _animationStep, _animationTimer, _targetWorldX, _targetWorldY, _targetZoom, _worldX, _worldY, _zoom, ANIMATION_STEPS, drawableHeight(), drawableWidth(), and setWorldCoords().
Referenced by initScoreViewPort(), and startAnimationTimer().
| void CAScoreViewPort::CAMousePressEvent | ( | QMouseEvent * | e, | |
| QPoint | p, | |||
| CAScoreViewPort * | v | |||
| ) | [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, | |||
| CAScoreViewPort * | v | |||
| ) | [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::CAMouseMoveEvent | ( | QMouseEvent * | e, | |
| QPoint | p, | |||
| CAScoreViewPort * | v | |||
| ) | [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::CAWheelEvent | ( | QWheelEvent * | e, | |
| QPoint | p, | |||
| CAScoreViewPort * | v | |||
| ) | [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::CAKeyPressEvent | ( | QKeyEvent * | e, | |
| CAScoreViewPort * | v | |||
| ) | [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().
| void CAScoreViewPort::selectionChanged | ( | ) | [signal] |
Referenced by addMElement(), addToSelection(), clearSelection(), removeFromSelection(), and selectMElement().
| void CAScoreViewPort::initScoreViewPort | ( | CASheet * | s | ) | [private] |
Definition at line 112 of file scoreviewport.cpp.
References _allowManualScroll, _animationTimer, _canvas, _checkScrollBarsDeadLock, _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(), CAViewPort::ScoreViewPort, ScrollBarShowIfNeeded, selectedContextColor(), selectionAreaColor(), selectionColor(), setBackgroundColor(), setDisabledElementsColor(), setDrawShadowNoteAccs(), setForegroundColor(), setHiddenElementsColor(), setResizeDirection(), setSelectedContextColor(), setSelectedVoice(), setSelectionAreaColor(), setSelectionColor(), setShadowNoteAccs(), setShadowNoteVisible(), setShadowNoteVisibleOnLeave(), setSheet(), setTextEdit(), setTextEditVisible(), CACanorus::settings(), CAViewPort::setViewPortType(), CADrawable::Undefined, and VScrollBarEvent().
Referenced by CAScoreViewPort().


| void CAScoreViewPort::clearMElements | ( | ) | [inline, private] |
Definition at line 250 of file scoreviewport.h.
References _drawableMList, and CAKDTree< T >::clear().

| void CAScoreViewPort::clearCElements | ( | ) | [inline, private] |
Definition at line 251 of file scoreviewport.h.
References _drawableCList, and CAKDTree< T >::clear().

| bool CAScoreViewPort::isSelected | ( | CADrawableMusElement * | elt | ) | [inline, private] |
| int CAScoreViewPort::getMaxXExtended | ( | CAKDTree< T > & | v | ) | [inline, private] |
Returns the maximum X of the viewable World a little bigger to make insertion at the end easy.
Definition at line 1440 of file scoreviewport.cpp.
References CAKDTree< T >::getMaxX(), and RIGHT_EXTRA_SPACE.
Referenced by checkScrollBars(), setWorldWidth(), setWorldX(), and zoomToWidth().


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


| void CAScoreViewPort::setLastMousePressCoords | ( | QPoint | p | ) | [inline, private] |
Definition at line 278 of file scoreviewport.h.
References _lastMousePressCoords.
Referenced by mousePressEvent().
| bool CAScoreViewPort::shadowNoteVisibleOnLeave | ( | ) | [inline, private] |
| void CAScoreViewPort::setShadowNoteVisibleOnLeave | ( | bool | v | ) | [inline, private] |
Definition at line 291 of file scoreviewport.h.
References _shadowNoteVisibleOnLeave.
Referenced by initScoreViewPort(), and setShadowNoteVisible().

| void CAScoreViewPort::setTextEdit | ( | CATextEdit * | e | ) | [inline, private] |
Definition at line 300 of file scoreviewport.h.
References _textEdit.
Referenced by initScoreViewPort().

| QRect CAScoreViewPort::textEditGeometry | ( | ) | [inline, private] |
Definition at line 302 of file scoreviewport.h.
References _textEditGeometry.
Referenced by updateHelpers().

| void CAScoreViewPort::setTextEditGeometry | ( | const QRect | r | ) | [inline, private] |
Definition at line 303 of file scoreviewport.h.
References _textEditGeometry.
Referenced by createTextEdit().

| void CAScoreViewPort::setTextEditVisible | ( | bool | v | ) | [inline, private] |
Definition at line 305 of file scoreviewport.h.
References _textEditVisible.
Referenced by createTextEdit(), initScoreViewPort(), and removeTextEdit().

| void CAScoreViewPort::setResizeDirection | ( | CADrawable::CADirection | r | ) | [inline, private] |
Definition at line 306 of file scoreviewport.h.
References _resizeDirection.
Referenced by initScoreViewPort(), mousePressEvent(), and mouseReleaseEvent().

| void CAScoreViewPort::drawSelectionRegion | ( | QPainter * | p, | |
| CADrawSettings | s | |||
| ) | [private] |
Definition at line 1001 of file scoreviewport.cpp.
References CADrawSettings::color, CADrawSettings::h, CADrawSettings::w, CADrawSettings::x, and CADrawSettings::y.
Referenced by paintEvent().
| void CAScoreViewPort::startAnimationTimer | ( | ) | [private] |
Definition at line 1218 of file scoreviewport.cpp.
References _animationStep, _animationTimer, and on__animationTimer_timeout().
Referenced by setWorldX(), setWorldY(), and setZoom().

QGridLayout* CAScoreViewPort::_layout [private] |
QWidget* CAScoreViewPort::_canvas [private] |
Definition at line 258 of file scoreviewport.h.
Referenced by drawableHeight(), drawableWidth(), initScoreViewPort(), and paintEvent().
QScrollBar* CAScoreViewPort::_hScrollBar [private] |
Definition at line 259 of file scoreviewport.h.
Referenced by checkScrollBars(), initScoreViewPort(), setScrollBarVisible(), setWorldWidth(), setWorldX(), and ~CAScoreViewPort().
QScrollBar * CAScoreViewPort::_vScrollBar [private] |
Definition at line 259 of file scoreviewport.h.
Referenced by checkScrollBars(), initScoreViewPort(), setScrollBarVisible(), setWorldHeight(), setWorldY(), and ~CAScoreViewPort().
Definition at line 264 of file scoreviewport.h.
Referenced by addMElement(), addToSelection(), calculateTime(), checkScrollBars(), clearMElements(), clone(), coordsToTime(), findMElement(), musElementsAt(), nearestLeftElement(), nearestRightElement(), paintEvent(), rebuild(), removeMElement(), selectMElement(), setWorldHeight(), setWorldWidth(), setWorldX(), setWorldY(), timeToCoords(), zoomToFit(), zoomToHeight(), zoomToWidth(), and ~CAScoreViewPort().
CAKDTree<CADrawableContext*> CAScoreViewPort::_drawableCList [private] |
Definition at line 265 of file scoreviewport.h.
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().
CASheet* CAScoreViewPort::_sheet [private] |
QList<CADrawableMusElement *> CAScoreViewPort::_selection [private] |
Definition at line 268 of file scoreviewport.h.
Referenced by addMElement(), addToSelection(), clearSelection(), isSelected(), paintEvent(), rebuild(), removeFromSelection(), selectDownMusElement(), selection(), selectMElement(), selectNextMusElement(), selectPrevMusElement(), selectUpMusElement(), and zoomToSelection().
Definition at line 269 of file scoreviewport.h.
Referenced by currentContext(), initScoreViewPort(), nearestLeftElement(), nearestRightElement(), paintEvent(), rebuild(), and setCurrentContext().
const int CAScoreViewPort::RIGHT_EXTRA_SPACE = 100 [static, private] |
Copyright (c) 2006-2008, 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.
Definition at line 271 of file scoreviewport.h.
Referenced by getMaxXExtended().
const int CAScoreViewPort::BOTTOM_EXTRA_SPACE = 30 [static, private] |
int CAScoreViewPort::_worldX [private] |
Definition at line 276 of file scoreviewport.h.
Referenced by initScoreViewPort(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), on__animationTimer_timeout(), paintEvent(), resizeEvent(), setWorldWidth(), setWorldX(), setWorldY(), setZoom(), wheelEvent(), and worldX().
int CAScoreViewPort::_worldY [private] |
Definition at line 276 of file scoreviewport.h.
Referenced by initScoreViewPort(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), on__animationTimer_timeout(), paintEvent(), resizeEvent(), setWorldHeight(), setWorldX(), setWorldY(), setZoom(), wheelEvent(), and worldY().
int CAScoreViewPort::_worldW [private] |
Definition at line 276 of file scoreviewport.h.
Referenced by initScoreViewPort(), paintEvent(), setCenterCoords(), setWorldWidth(), setWorldX(), setZoom(), and worldWidth().
int CAScoreViewPort::_worldH [private] |
Definition at line 276 of file scoreviewport.h.
Referenced by initScoreViewPort(), paintEvent(), setCenterCoords(), setWorldHeight(), setWorldY(), setZoom(), and worldHeight().
QPoint CAScoreViewPort::_lastMousePressCoords [private] |
Definition at line 277 of file scoreviewport.h.
Referenced by lastMousePressCoords(), and setLastMousePressCoords().
float CAScoreViewPort::_zoom [private] |
Definition at line 279 of file scoreviewport.h.
Referenced by checkScrollBars(), initScoreViewPort(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), on__animationTimer_timeout(), paintEvent(), resizeEvent(), setWorldHeight(), setWorldWidth(), setWorldX(), setWorldY(), setZoom(), wheelEvent(), and zoom().
CAVoice* CAScoreViewPort::_selectedVoice [private] |
Definition at line 281 of file scoreviewport.h.
Referenced by selectedVoice(), and setSelectedVoice().
bool CAScoreViewPort::_shadowNoteVisible [private] |
Definition at line 287 of file scoreviewport.h.
Referenced by enterEvent(), leaveEvent(), mouseMoveEvent(), paintEvent(), setShadowNoteVisible(), and shadowNoteVisible().
bool CAScoreViewPort::_shadowNoteVisibleOnLeave [private] |
Definition at line 289 of file scoreviewport.h.
Referenced by enterEvent(), leaveEvent(), setShadowNoteVisibleOnLeave(), and shadowNoteVisibleOnLeave().
int CAScoreViewPort::_shadowNoteAccs [private] |
Definition at line 293 of file scoreviewport.h.
Referenced by paintEvent(), setShadowNoteAccs(), and shadowNoteAccs().
bool CAScoreViewPort::_drawShadowNoteAccs [private] |
Definition at line 294 of file scoreviewport.h.
Referenced by drawShadowNoteAccs(), paintEvent(), and setDrawShadowNoteAccs().
QList<CANote*> CAScoreViewPort::_shadowNote [private] |
Definition at line 295 of file scoreviewport.h.
Referenced by addCElement(), rebuild(), setShadowNoteDotted(), updateHelpers(), and ~CAScoreViewPort().
QList<CADrawableNote*> CAScoreViewPort::_shadowDrawableNote [private] |
Definition at line 296 of file scoreviewport.h.
Referenced by addCElement(), paintEvent(), rebuild(), updateHelpers(), and ~CAScoreViewPort().
CATextEdit* CAScoreViewPort::_textEdit [private] |
QRect CAScoreViewPort::_textEditGeometry [private] |
Definition at line 301 of file scoreviewport.h.
Referenced by setTextEditGeometry(), and textEditGeometry().
bool CAScoreViewPort::_textEditVisible [private] |
Definition at line 304 of file scoreviewport.h.
Referenced by setTextEditVisible(), and textEditVisible().
Definition at line 307 of file scoreviewport.h.
Referenced by resizeDirection(), and setResizeDirection().
QList<QRect> CAScoreViewPort::_selectionRegionList [private] |
Definition at line 310 of file scoreviewport.h.
Referenced by addSelectionRegion(), clearSelectionRegionList(), removeSelectionRegion(), and selectionRegionList().
bool CAScoreViewPort::_drawBorder [private] |
Definition at line 316 of file scoreviewport.h.
Referenced by initScoreViewPort(), paintEvent(), setBorder(), and unsetBorder().
QRect* CAScoreViewPort::_repaintArea [private] |
Definition at line 317 of file scoreviewport.h.
Referenced by clearRepaintArea(), initScoreViewPort(), paintEvent(), and setRepaintArea().
QPen CAScoreViewPort::_borderPen [private] |
Definition at line 318 of file scoreviewport.h.
Referenced by border(), paintEvent(), and setBorder().
QColor CAScoreViewPort::_backgroundColor [private] |
Definition at line 319 of file scoreviewport.h.
Referenced by backgroundColor(), paintEvent(), and setBackgroundColor().
QColor CAScoreViewPort::_foregroundColor [private] |
Definition at line 320 of file scoreviewport.h.
Referenced by foregroundColor(), and setForegroundColor().
QColor CAScoreViewPort::_selectionColor [private] |
Definition at line 321 of file scoreviewport.h.
Referenced by selectionColor(), and setSelectionColor().
QColor CAScoreViewPort::_selectionAreaColor [private] |
Definition at line 322 of file scoreviewport.h.
Referenced by selectionAreaColor(), and setSelectionAreaColor().
QColor CAScoreViewPort::_selectedContextColor [private] |
Definition at line 323 of file scoreviewport.h.
Referenced by selectedContextColor(), and setSelectedContextColor().
QColor CAScoreViewPort::_disabledElementsColor [private] |
Definition at line 324 of file scoreviewport.h.
Referenced by disabledElementsColor(), and setDisabledElementsColor().
QColor CAScoreViewPort::_hiddenElementsColor [private] |
Definition at line 325 of file scoreviewport.h.
Referenced by hiddenElementsColor(), and setHiddenElementsColor().
QTimer* CAScoreViewPort::_animationTimer [private] |
Definition at line 330 of file scoreviewport.h.
Referenced by initScoreViewPort(), on__animationTimer_timeout(), startAnimationTimer(), and ~CAScoreViewPort().
const int CAScoreViewPort::ANIMATION_STEPS = 7 [static, private] |
int CAScoreViewPort::_animationStep [private] |
Definition at line 332 of file scoreviewport.h.
Referenced by on__animationTimer_timeout(), and startAnimationTimer().
int CAScoreViewPort::_targetWorldX [private] |
Definition at line 333 of file scoreviewport.h.
Referenced by on__animationTimer_timeout(), setWorldX(), setWorldY(), and setZoom().
int CAScoreViewPort::_targetWorldY [private] |
Definition at line 333 of file scoreviewport.h.
Referenced by on__animationTimer_timeout(), setWorldX(), setWorldY(), and setZoom().
int CAScoreViewPort::_targetWorldW [private] |
Definition at line 333 of file scoreviewport.h.
int CAScoreViewPort::_targetWorldH [private] |
Definition at line 333 of file scoreviewport.h.
float CAScoreViewPort::_targetZoom [private] |
Definition at line 334 of file scoreviewport.h.
Referenced by on__animationTimer_timeout(), setWorldX(), setWorldY(), and setZoom().
Definition at line 341 of file scoreviewport.h.
Referenced by initScoreViewPort(), isScrollBarVisible(), and setScrollBarVisible().
bool CAScoreViewPort::_allowManualScroll [private] |
This property holds whether a user interaction with the scrollbars actually triggers the scroll of the viewport.
Definition at line 342 of file scoreviewport.h.
Referenced by HScrollBarEvent(), initScoreViewPort(), manualScroll(), setManualScroll(), and VScrollBarEvent().
int CAScoreViewPort::_oldWorldX [private] |
int CAScoreViewPort::_oldWorldY [private] |
int CAScoreViewPort::_oldWorldW [private] |
Definition at line 347 of file scoreviewport.h.
Referenced by initScoreViewPort(), paintEvent(), and setWorldWidth().
int CAScoreViewPort::_oldWorldH [private] |
Definition at line 347 of file scoreviewport.h.
Referenced by initScoreViewPort(), paintEvent(), and setWorldHeight().
bool CAScoreViewPort::_playing [private] |
Definition at line 348 of file scoreviewport.h.
Referenced by initScoreViewPort(), playing(), and setPlaying().
int CAScoreViewPort::_xCursor [private] |
Definition at line 350 of file scoreviewport.h.
Referenced by initScoreViewPort(), mouseMoveEvent(), updateHelpers(), and wheelEvent().
int CAScoreViewPort::_yCursor [private] |
Definition at line 350 of file scoreviewport.h.
Referenced by initScoreViewPort(), mouseMoveEvent(), updateHelpers(), and wheelEvent().
bool CAScoreViewPort::_holdRepaint [private] |
Definition at line 351 of file scoreviewport.h.
Referenced by checkScrollBars(), initScoreViewPort(), and paintEvent().
bool CAScoreViewPort::_checkScrollBarsDeadLock [private] |
Definition at line 352 of file scoreviewport.h.
Referenced by checkScrollBars(), initScoreViewPort(), setCenterCoords(), and setWorldCoords().
bool CAScoreViewPort::_hScrollBarDeadLock [private] |
Definition at line 353 of file scoreviewport.h.
Referenced by HScrollBarEvent(), initScoreViewPort(), setWorldWidth(), and setWorldX().
bool CAScoreViewPort::_vScrollBarDeadLock [private] |
Definition at line 354 of file scoreviewport.h.
Referenced by initScoreViewPort(), setWorldHeight(), setWorldY(), and VScrollBarEvent().
1.5.3