TrackList Search::tracks() const { TrackList list; for (int i = 0; i < trackCount(); ++i) list << trackAt(i); return list; }
Meta::TrackList ProxyBase::tracks() const { Meta::TrackList tl; for( int i = 0; i < rowCount(); ++i ) tl << trackAt( i ); return tl; }
void PlaylistModel::setActiveRow(int row, bool manual) { if (!rowExists(row)) return; const int oldActiveRow = activeRow; activeRow = row; activeTrack = trackAt(activeRow); activeTrack->setPlayed(true); playedTracks << activeTrack; if (rowExists(oldActiveRow)) { QModelIndex oldIndex = index(oldActiveRow, 0, QModelIndex()); emit dataChanged(oldIndex, oldIndex); } QModelIndex newIndex = index(activeRow, 0, QModelIndex()); emit dataChanged(newIndex, newIndex); emit activeRowChanged(row, manual); }