File indexing completed on 2024-05-12 04:51:11

0001 /*
0002     SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 
0007 #include "k3bvideodvdjob.h"
0008 #include "k3bvideodvddoc.h"
0009 #include "k3bvideodvdimager.h"
0010 #include "k3bcore.h"
0011 #include "k3bisoimager.h"
0012 #include "k3bisooptions.h"
0013 #include "k3bgrowisofswriter.h"
0014 #include "k3bglobals.h"
0015 #include "k3b_i18n.h"
0016 
0017 #include <KConfig>
0018 #include <KMessageBox>
0019 
0020 
0021 
0022 K3b::VideoDvdJob::VideoDvdJob( K3b::VideoDvdDoc* doc, K3b::JobHandler* jh, QObject* parent )
0023     : K3b::DataJob( doc, jh, parent ),
0024       m_doc(doc)
0025 {
0026 }
0027 
0028 
0029 K3b::VideoDvdJob::~VideoDvdJob()
0030 {
0031 }
0032 
0033 
0034 void K3b::VideoDvdJob::prepareImager()
0035 {
0036     setImager( new K3b::VideoDvdImager( m_doc, this ) );
0037 }
0038 
0039 
0040 QString K3b::VideoDvdJob::jobDescription() const
0041 {
0042     if( m_doc->onlyCreateImages() ) {
0043         return i18n("Creating Video DVD Image File");
0044     }
0045     else {
0046         return i18n("Writing Video DVD")
0047             + ( m_doc->isoOptions().volumeID().isEmpty()
0048                 ? QString()
0049                 : QString( " (%1)" ).arg(m_doc->isoOptions().volumeID()) );
0050     }
0051 }
0052 
0053 
0054 QString K3b::VideoDvdJob::jobDetails() const
0055 {
0056     return ( i18n("ISO 9660/Udf Filesystem (Size: %1)",KIO::convertSize( doc()->size() ))
0057              + ( m_doc->copies() > 1
0058                  ? i18np(" - %1 copy", " - %1 copies", m_doc->copies())
0059                  : QString() ) );
0060 }
0061 
0062 #include "moc_k3bvideodvdjob.cpp"