File indexing completed on 2025-03-16 04:29:28
0001 /* 0002 SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef K3B_BLANKING_JOB_H 0007 #define K3B_BLANKING_JOB_H 0008 0009 #include "k3bjob.h" 0010 #include "k3b_export.h" 0011 0012 class QString; 0013 0014 namespace K3b { 0015 class AbstractWriter; 0016 0017 class LIBK3B_EXPORT BlankingJob : public BurnJob 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 explicit BlankingJob( JobHandler*, QObject* parent = 0 ); 0023 ~BlankingJob() override; 0024 0025 QString jobDescription() const override; 0026 QString jobDetails() const override; 0027 0028 Device::Device* writer() const override; 0029 0030 bool hasBeenCanceled() const override { return m_canceled; } 0031 0032 public Q_SLOTS: 0033 void start() override; 0034 void cancel() override; 0035 void setForce( bool f ) { m_force = f; } 0036 void setDevice( K3b::Device::Device* d ); 0037 void setSpeed( int s ) { m_speed = s; } 0038 void setFormattingMode( FormattingMode mode ) { m_mode = mode; } 0039 void setWritingApp( WritingApp app ) { m_writingApp = app; } 0040 0041 /** 0042 * If set true the job ignores the global K3b setting 0043 * and does not eject the CD-RW after finishing 0044 */ 0045 void setForceNoEject( bool b ) { m_forceNoEject = b; } 0046 0047 private Q_SLOTS: 0048 void slotFinished(bool); 0049 void slotStartErasing(); 0050 0051 private: 0052 AbstractWriter* m_writerJob; 0053 bool m_force; 0054 Device::Device* m_device; 0055 int m_speed; 0056 FormattingMode m_mode; 0057 WritingApp m_writingApp; 0058 bool m_canceled; 0059 bool m_forceNoEject; 0060 }; 0061 } 0062 0063 #endif