diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2009-09-05 22:30:11 -0400 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2009-09-05 22:30:11 -0400 |
commit | 04c5531ec85c6e5a4b9e8d2c166e93f32961e442 (patch) | |
tree | ed7d43f067d0b5309970d08418c969bdbee2bef7 /video.cpp | |
parent | Skeleton of job system. (diff) | |
download | AnyRip-04c5531ec85c6e5a4b9e8d2c166e93f32961e442.tar.xz AnyRip-04c5531ec85c6e5a4b9e8d2c166e93f32961e442.zip |
Added dvd drive skeleton.
Diffstat (limited to 'video.cpp')
-rw-r--r-- | video.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,10 +1,13 @@ #include "video.h" #include "job.h" #include "dvdimagejob.h" +#include "dvddrive.h" -Video::Video() : m_jobsCompleted(QBitArray(5)) +Video::Video(DVDDrive *dvdDrive) : + m_jobsCompleted(QBitArray(5)), + m_dvdDrive(dvdDrive) { - //Do something + m_title = dvdDrive->dvdName(); } void Video::completedJob(bool success) { @@ -25,10 +28,14 @@ Job* Video::nextJob() { Job *job; if (!m_jobsCompleted.at(Video::DVDImage)) { - job = new DVDImageJob(this); + job = new DVDImageJob(this, m_dvdDrive); } else { - return job = 0; //Other jobs... + job = 0; //Other jobs... } connect(job, SIGNAL(completed(bool)), this, SLOT(completedJob(bool))); return job; } +bool Video::isJobComplete(Jobs job) const +{ + return m_jobsCompleted.at(job); +} |