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

0001 /*
0002     SPDX-FileCopyrightText: 2011 Michal Malek <michalm@jabster.pl>
0003     SPDX-FileCopyrightText: 1998-2011 Sebastian Trueg <trueg@k3b.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef K3B_KJOB_BRIDGE_H
0009 #define K3B_KJOB_BRIDGE_H
0010 
0011 #include "k3b_export.h"
0012 
0013 #include <KJob>
0014 #include <QScopedPointer>
0015 
0016 namespace K3b {
0017     
0018 class Job;
0019 
0020 class LIBK3B_EXPORT KJobBridge : public KJob
0021 {
0022     Q_OBJECT
0023     Q_DISABLE_COPY( KJobBridge )
0024 
0025 public:
0026     explicit KJobBridge( Job& job );
0027     ~KJobBridge() override;
0028     
0029     void start() override;
0030     
0031 protected:
0032     bool doKill() override;
0033     
0034 private Q_SLOTS:
0035     void slotFinished( bool success );
0036     void slotInfoMessage( const QString& message, int type );
0037     void slotPercent( int progress );
0038     void slotProcessedSize( int processed, int size );
0039     void slotNewTask( const QString& task );
0040     
0041 private:
0042     class Private;
0043     QScopedPointer<Private> d;
0044 };
0045 
0046 } // namespace K3b
0047 
0048 #endif // K3B_KJOB_BRIDGE_H