From 50b48aec6ddd451a6d1709c0942477b503457663 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 3 Feb 2010 02:15:56 +0000 Subject: Added abandoned KDE3 version of K3B git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1084400 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/rip/k3baudioripjob.cpp | 77 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/rip/k3baudioripjob.cpp (limited to 'src/rip/k3baudioripjob.cpp') diff --git a/src/rip/k3baudioripjob.cpp b/src/rip/k3baudioripjob.cpp new file mode 100644 index 0000000..ef520e1 --- /dev/null +++ b/src/rip/k3baudioripjob.cpp @@ -0,0 +1,77 @@ +/* + * + * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $ + * Copyright (C) 2006 Sebastian Trueg + * + * This file is part of the K3b project. + * Copyright (C) 1998-2007 Sebastian Trueg + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + */ + +#include "k3baudioripjob.h" +#include "k3baudioripthread.h" + +#include +#include + +#include +#include + + +K3bAudioRipJob::K3bAudioRipJob( K3bJobHandler* hdl, QObject* parent ) + : K3bJob( hdl, parent ) +{ + m_thread = new K3bAudioRipThread(); + m_threadJob = new K3bThreadJob( m_thread, this, this ); + connectSubJob( m_threadJob, + SLOT(slotRippingFinished(bool)), + SIGNAL(newTask(const QString&)), + SIGNAL(newSubTask(const QString&)), + SIGNAL(percent(int)), + SIGNAL(subPercent(int)) ); +} + + +K3bAudioRipJob::~K3bAudioRipJob() +{ +} + + +QString K3bAudioRipJob::jobDescription() const +{ + return m_thread->jobDescription(); +} + + +QString K3bAudioRipJob::jobDetails() const +{ + return m_thread->jobDetails(); +} + + +void K3bAudioRipJob::start() +{ + jobStarted(); + k3bcore->blockDevice( m_thread->m_device ); + m_threadJob->start(); +} + + +void K3bAudioRipJob::cancel() +{ + m_threadJob->cancel(); +} + + +void K3bAudioRipJob::slotRippingFinished( bool success ) +{ + k3bcore->unblockDevice( m_thread->m_device ); + jobFinished( success ); +} + +#include "k3baudioripjob.moc" -- cgit v1.2.1