Skip to content

Commit

Permalink
track/track: Add Track::setCuePoints method for list of CueInfo objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Feb 28, 2020
1 parent e821875 commit f04730f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/track/track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,15 @@ void Track::setCuePoints(const QList<CuePointer>& cuePoints) {
emit cuesUpdated();
}

void Track::setCuePoints(const QList<CueInfo>& cueInfos) {
QList<CuePointer> cuePoints;
for (const CueInfo& cueInfo : cueInfos) {
CuePointer pCue(new Cue(m_record.getId(), getSampleRate(), cueInfo));
cuePoints.append(pCue);
}
setCuePoints(cuePoints);
}

void Track::markDirty() {
QMutexLocker lock(&m_qMutex);
setDirtyAndUnlock(&lock, true);
Expand Down
1 change: 1 addition & 0 deletions src/track/track.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ class Track : public QObject {
void removeCuesOfType(CueType);
QList<CuePointer> getCuePoints() const;
void setCuePoints(const QList<CuePointer>& cuePoints);
void setCuePoints(const QList<CueInfo>& cueInfos);

bool isDirty();

Expand Down

0 comments on commit f04730f

Please sign in to comment.