@ -3147,7 +3147,7 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview,
i ! = s - > getSegmentEvents ( ) . end ( ) ; + + i ) {
i ! = s - > getSegmentEvents ( ) . end ( ) ; + + i ) {
if ( oldSelection & & oldSelection - > getSegment ( ) = = s - > getSegment ( )
if ( oldSelection & & oldSelection - > getSegment ( ) = = s - > getSegment ( )
& & oldSelection - > tq contains( * i ) )
& & oldSelection - > contains( * i ) )
continue ;
continue ;
foundNewEvent = true ;
foundNewEvent = true ;
@ -3829,12 +3829,12 @@ void NotationView::setMenuStates()
NOTATION_DEBUG < < " NotationView::setMenuStates: Have selection; it's " < < m_currentEventSelection < < " covering range from " < < m_currentEventSelection - > getStartTime ( ) < < " to " < < m_currentEventSelection - > getEndTime ( ) < < " ( " < < m_currentEventSelection - > getSegmentEvents ( ) . size ( ) < < " events) " < < endl ;
NOTATION_DEBUG < < " NotationView::setMenuStates: Have selection; it's " < < m_currentEventSelection < < " covering range from " < < m_currentEventSelection - > getStartTime ( ) < < " to " < < m_currentEventSelection - > getEndTime ( ) < < " ( " < < m_currentEventSelection - > getSegmentEvents ( ) . size ( ) < < " events) " < < endl ;
stateChanged ( " have_selection " , KXMLGUIClient : : StateNoReverse ) ;
stateChanged ( " have_selection " , KXMLGUIClient : : StateNoReverse ) ;
if ( m_currentEventSelection - > tq contains
if ( m_currentEventSelection - > contains
( Note : : EventType ) ) {
( Note : : EventType ) ) {
stateChanged ( " have_notes_in_selection " ,
stateChanged ( " have_notes_in_selection " ,
KXMLGUIClient : : StateNoReverse ) ;
KXMLGUIClient : : StateNoReverse ) ;
}
}
if ( m_currentEventSelection - > tq contains
if ( m_currentEventSelection - > contains
( Note : : EventRestType ) ) {
( Note : : EventRestType ) ) {
stateChanged ( " have_rests_in_selection " ,
stateChanged ( " have_rests_in_selection " ,
KXMLGUIClient : : StateNoReverse ) ;
KXMLGUIClient : : StateNoReverse ) ;
@ -3955,7 +3955,7 @@ void NotationView::slotNoteAction()
const TQObject * sigSender = TQT_TQOBJECT_CONST ( const_cast < const TQT_BASE_OBJECT_NAME * > ( sender ( ) ) ) ;
const TQObject * sigSender = TQT_TQOBJECT_CONST ( const_cast < const TQT_BASE_OBJECT_NAME * > ( sender ( ) ) ) ;
NoteActionDataMap : : Iterator noteAct =
NoteActionDataMap : : Iterator noteAct =
m_noteActionDataMap - > tq find( sigSender - > name ( ) ) ;
m_noteActionDataMap - > find( sigSender - > name ( ) ) ;
if ( noteAct ! = m_noteActionDataMap - > end ( ) ) {
if ( noteAct ! = m_noteActionDataMap - > end ( ) ) {
m_lastNoteAction = sigSender - > name ( ) ;
m_lastNoteAction = sigSender - > name ( ) ;
@ -3987,7 +3987,7 @@ void NotationView::slotAddMark()
if ( ! m_currentEventSelection )
if ( ! m_currentEventSelection )
return ;
return ;
MarkActionDataMap : : Iterator i = m_markActionDataMap - > tq find( s - > name ( ) ) ;
MarkActionDataMap : : Iterator i = m_markActionDataMap - > find( s - > name ( ) ) ;
if ( i ! = m_markActionDataMap - > end ( ) ) {
if ( i ! = m_markActionDataMap - > end ( ) ) {
addCommandToHistory ( new AddMarkCommand
addCommandToHistory ( new AddMarkCommand
@ -4000,7 +4000,7 @@ void NotationView::slotNoteChangeAction()
const TQObject * sigSender = TQT_TQOBJECT_CONST ( const_cast < const TQT_BASE_OBJECT_NAME * > ( sender ( ) ) ) ;
const TQObject * sigSender = TQT_TQOBJECT_CONST ( const_cast < const TQT_BASE_OBJECT_NAME * > ( sender ( ) ) ) ;
NoteChangeActionDataMap : : Iterator noteAct =
NoteChangeActionDataMap : : Iterator noteAct =
m_noteChangeActionDataMap - > tq find( sigSender - > name ( ) ) ;
m_noteChangeActionDataMap - > find( sigSender - > name ( ) ) ;
if ( noteAct ! = m_noteChangeActionDataMap - > end ( ) ) {
if ( noteAct ! = m_noteChangeActionDataMap - > end ( ) ) {
slotSetNoteDurations ( ( * * noteAct ) . noteType , ( * * noteAct ) . notationOnly ) ;
slotSetNoteDurations ( ( * * noteAct ) . noteType , ( * * noteAct ) . notationOnly ) ;
@ -4032,7 +4032,7 @@ void NotationView::initActionDataMaps()
( NotationStrings : : getReferenceName ( Note ( type , dots ) , rest = = 1 ) ) ;
( NotationStrings : : getReferenceName ( Note ( type , dots ) , rest = = 1 ) ) ;
TQString shortName ( refName ) ;
TQString shortName ( refName ) ;
shortName . tq replace( TQRegExp ( " - " ) , " _ " ) ;
shortName . replace( TQRegExp ( " - " ) , " _ " ) ;
TQString titleName
TQString titleName
( NotationStrings : : getNoteName ( Note ( type , dots ) ) ) ;
( NotationStrings : : getNoteName ( Note ( type , dots ) ) ) ;
@ -4041,7 +4041,7 @@ void NotationView::initActionDataMaps()
titleName . right ( titleName . length ( ) - 1 ) ;
titleName . right ( titleName . length ( ) - 1 ) ;
if ( rest ) {
if ( rest ) {
titleName . tq replace( TQRegExp ( i18n ( " note " ) ) , i18n ( " rest " ) ) ;
titleName . replace( TQRegExp ( i18n ( " note " ) ) , i18n ( " rest " ) ) ;
}
}
int keycode = keys [ type - Note : : Shortest ] ;
int keycode = keys [ type - Note : : Shortest ] ;
@ -4068,7 +4068,7 @@ void NotationView::initActionDataMaps()
TQString shortName ( TQString ( " change_%1%2 " )
TQString shortName ( TQString ( " change_%1%2 " )
. tqarg ( notationOnly ? " notation_ " : " " ) . tqarg ( refName ) ) ;
. tqarg ( notationOnly ? " notation_ " : " " ) . tqarg ( refName ) ) ;
shortName . tq replace( TQRegExp ( " - " ) , " _ " ) ;
shortName . replace( TQRegExp ( " - " ) , " _ " ) ;
TQString titleName
TQString titleName
( NotationStrings : : getNoteName ( Note ( type , 0 ) ) ) ;
( NotationStrings : : getNoteName ( Note ( type , 0 ) ) ) ;
@ -5658,7 +5658,7 @@ void NotationView::slotSwitchFromRestToNote()
Note note ( restInserter - > getCurrentNote ( ) ) ;
Note note ( restInserter - > getCurrentNote ( ) ) ;
TQString actionName = NotationStrings : : getReferenceName ( note , false ) ;
TQString actionName = NotationStrings : : getReferenceName ( note , false ) ;
actionName = actionName . tq replace( " - " , " _ " ) ;
actionName = actionName . replace( " - " , " _ " ) ;
KRadioAction * action = dynamic_cast < KRadioAction * >
KRadioAction * action = dynamic_cast < KRadioAction * >
( actionCollection ( ) - > action ( actionName ) ) ;
( actionCollection ( ) - > action ( actionName ) ) ;
@ -5693,7 +5693,7 @@ void NotationView::slotSwitchFromNoteToRest()
Note note ( noteInserter - > getCurrentNote ( ) ) ;
Note note ( noteInserter - > getCurrentNote ( ) ) ;
TQString actionName = NotationStrings : : getReferenceName ( note , true ) ;
TQString actionName = NotationStrings : : getReferenceName ( note , true ) ;
actionName = actionName . tq replace( " - " , " _ " ) ;
actionName = actionName . replace( " - " , " _ " ) ;
KRadioAction * action = dynamic_cast < KRadioAction * >
KRadioAction * action = dynamic_cast < KRadioAction * >
( actionCollection ( ) - > action ( actionName ) ) ;
( actionCollection ( ) - > action ( actionName ) ) ;