Hooked up jump to marker selection logic for Qt GUI.

This commit is contained in:
mjbudd77 2021-12-02 23:30:03 -05:00
parent 802019e879
commit c2f1c5193b
3 changed files with 30 additions and 1 deletions

View File

@ -1166,6 +1166,11 @@ void TasEditorWindow::buildSideControlPanel(void)
connect( turboSeekCbox , SIGNAL(clicked(bool)), this, SLOT(playbackTurboSeekCb(bool)));
connect( autoRestoreCbox , SIGNAL(clicked(bool)), this, SLOT(playbackAutoRestoreCb(bool)));
connect( prevMkrBtn, SIGNAL(clicked(void)), this, SLOT(jumpToPreviousMarker(void)) );
connect( nextMkrBtn, SIGNAL(clicked(void)), this, SLOT(jumpToNextMarker(void)) );
connect( similarBtn, SIGNAL(clicked(void)), this, SLOT(findSimilarNote(void)) );
connect( moreBtn , SIGNAL(clicked(void)), this, SLOT(findNextSimilarNote(void)) );
shortcut = new QShortcut( QKeySequence("Pause"), this);
connect( shortcut, SIGNAL(activated(void)), this, SLOT(playbackPauseCB(void)) );
@ -3108,6 +3113,26 @@ void TasEditorWindow::lowerMarkerLabelClicked(void)
}
}
//----------------------------------------------------------------------------
void TasEditorWindow::jumpToPreviousMarker(void)
{
selection.jumpToPreviousMarker();
}
//----------------------------------------------------------------------------
void TasEditorWindow::jumpToNextMarker(void)
{
selection.jumpToNextMarker();
}
//----------------------------------------------------------------------------
void TasEditorWindow::findSimilarNote(void)
{
markersManager.findSimilarNote();
}
//----------------------------------------------------------------------------
void TasEditorWindow::findNextSimilarNote(void)
{
markersManager.findNextSimilarNote();
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
//---- TAS Piano Roll Widget
//----------------------------------------------------------------------------

View File

@ -475,6 +475,10 @@ class TasEditorWindow : public QDialog
void setMaxUndoCapacity(void);
void setCurrentPattern(int);
void tabViewChanged(int);
void findSimilarNote(void);
void findNextSimilarNote(void);
void jumpToPreviousMarker(void);
void jumpToNextMarker(void);
void autoLuaRunChanged(bool);
void manLuaRun(void);

View File

@ -212,7 +212,7 @@ void SELECTION::redrawMarkerData()
strcpy(new_text, markersManager->getNoteCopy(displayedMarkerNumber).c_str());
tasWin->lowerMarkerNote->setText( QObject::tr(new_text) );
printf("Marker %i: '%s'\n", displayedMarkerNumber, new_text );
//printf("Marker %i: '%s'\n", displayedMarkerNumber, new_text );
}
void SELECTION::jumpToPreviousMarker(int speed)