summaryrefslogtreecommitdiffstats
path: root/video.cpp
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2009-09-05 22:30:11 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2009-09-05 22:30:11 -0400
commit04c5531ec85c6e5a4b9e8d2c166e93f32961e442 (patch)
treeed7d43f067d0b5309970d08418c969bdbee2bef7 /video.cpp
parentSkeleton of job system. (diff)
downloadAnyRip-04c5531ec85c6e5a4b9e8d2c166e93f32961e442.tar.xz
AnyRip-04c5531ec85c6e5a4b9e8d2c166e93f32961e442.zip
Added dvd drive skeleton.
Diffstat (limited to 'video.cpp')
-rw-r--r--video.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/video.cpp b/video.cpp
index 0daccf2..9a8527e 100644
--- a/video.cpp
+++ b/video.cpp
@@ -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);
+}