Add next song to status line

This commit is contained in:
2021-10-03 01:23:25 -05:00
parent 7999cc486f
commit b0eeb81592
5 changed files with 28 additions and 9 deletions

View File

@@ -33,6 +33,15 @@ SlideView::SlideView(QWidget *parent): QWidget(parent) {
connect(m_slideTable, &QTableWidget::currentCellChanged, this, &SlideView::slideChanged);
}
QString SlideView::getNextSong() const {
const auto cnt = m_songSelector->count();
const auto idx = m_songSelector->currentIndex() + 1;
if (idx < cnt) {
return m_songSelector->itemText(idx);
}
return "";
}
void SlideView::pollUpdate(QString songName, int slide) {
if (songName != m_currentSong) {
m_currentSong = songName;