2 * @file cuesheettrack.cpp
3 * @author Wei-Cheng Pan
5 * Copyright (C) 2008 Wei-Cheng Pan <legnaleurc@gmail.com>
7 * This file is part of Khopper.
9 * Khopper is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
14 * Khopper is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include "cuesheettrack.hpp"
24 using namespace khopper::album
;
25 using khopper::codec::ReaderSP
;
26 using khopper::codec::RangedReader
;
28 CueSheetTrack::CueSheetTrack( const QUrl
& uri
):
32 ReaderSP
CueSheetTrack::createReader() const {
33 return ReaderSP( new RangedReader( this->getURI(), this->getStartTime().toMillisecond(), this->getDuration().toMillisecond() ) );
36 const QStringList
& CueSheetTrack::getComments() const {
37 return this->comments_
;
40 const QStringList
& CueSheetTrack::getGarbage() const {
41 return this->garbage_
;
44 const Timestamp
& CueSheetTrack::getStartTime() const {
45 return this->startTime_
;
48 void CueSheetTrack::setComments( const QStringList
& comments
) {
49 this->comments_
= comments
;
52 void CueSheetTrack::setDataType( const QString
& dataType
) {
53 this->dataType_
= dataType
;
56 void CueSheetTrack::setFileType( const QString
& fileType
) {
57 this->fileType_
= fileType
;
60 void CueSheetTrack::setGarbage( const QStringList
& garbage
) {
61 this->garbage_
= garbage
;
64 void CueSheetTrack::setISRC( const QString
& isrc
) {
68 void CueSheetTrack::setPostgap( const Timestamp
& postgap
) {
69 this->postgap_
= postgap
;
72 void CueSheetTrack::setPregap( const Timestamp
& pregap
) {
73 this->pregap_
= pregap
;
76 void CueSheetTrack::setStartTime( const Timestamp
& startTime
) {
77 this->startTime_
= startTime
;