File indexing completed on 2024-06-16 04:33:38

0001 /*
0002     SPDX-FileCopyrightText: 1998-2010 Sebastian Trueg <trueg@k3b.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef _K3B_SIMPLE_JOB_HANDLER_H_
0007 #define _K3B_SIMPLE_JOB_HANDLER_H_
0008 
0009 #include "k3bjobhandler.h"
0010 #include "k3b_export.h"
0011 
0012 #include <QObject>
0013 
0014 
0015 namespace K3b {
0016     /**
0017      * This is a simplified job handler which just consumes the
0018      * job handler calls without doing anything.
0019      * Use it for very simple jobs that don't need the job handler
0020      * methods.
0021      */
0022     class LIBK3B_EXPORT SimpleJobHandler : public QObject, public JobHandler
0023     {
0024         Q_OBJECT
0025 
0026     public:
0027         explicit SimpleJobHandler( QObject* parent = 0 );
0028         ~SimpleJobHandler() override;
0029 
0030         /*
0031          * \return MEDIA_UNKNOWN
0032          */
0033         Device::MediaType waitForMedium( Device::Device*,
0034                                          K3b::Device::MediaStates mediaState = Device::STATE_EMPTY,
0035                                          K3b::Device::MediaTypes mediaType = Device::MEDIA_WRITABLE_CD,
0036                                          const K3b::Msf& minMediaSize = K3b::Msf(),
0037                                          const QString& message = QString() ) override;
0038         /**
0039          * \return true
0040          */
0041         bool questionYesNo( const QString& text,
0042                             const QString& caption = QString(),
0043                             const KGuiItem& buttonYes = KStandardGuiItem::ok(),
0044                             const KGuiItem& buttonNo = KStandardGuiItem::cancel() ) override;
0045 
0046         /**
0047          * Does nothing
0048          */
0049         void blockingInformation( const QString& text,
0050                                   const QString& caption = QString() ) override;
0051     };
0052 }
0053 
0054 #endif