File indexing completed on 2024-06-16 05:24:56
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2008 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_PRINTJOB_HPP 0010 #define KASTEN_PRINTJOB_HPP 0011 0012 // KF 0013 // #include <KJob> 0014 // Qt 0015 #include <QObject> 0016 0017 class FramesToPaperPrinter; 0018 0019 class QPrinter; 0020 0021 namespace Kasten { 0022 0023 class PrintThread; 0024 0025 class PrintJob : public QObject // not yet: KJob 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 PrintJob(FramesToPaperPrinter* framesPrinter, int firstPage, int lastPage, QPrinter* printer); 0031 0032 public: // KJob API 0033 // virtual void start(); 0034 0035 public: 0036 bool exec(); 0037 0038 private Q_SLOTS: 0039 // void onFinished(); 0040 void onPagePrinted(); 0041 0042 private: 0043 // PrintThread *mPrintThread; 0044 FramesToPaperPrinter* mFramesPrinter; 0045 const int mFirstPage; 0046 const int mLastPage; 0047 0048 QPrinter* mPrinter; 0049 }; 0050 0051 inline PrintJob::PrintJob(FramesToPaperPrinter* framesPrinter, int firstPage, int lastPage, QPrinter* printer) 0052 : mFramesPrinter(framesPrinter) 0053 , mFirstPage(firstPage) 0054 , mLastPage(lastPage) 0055 , mPrinter(printer) 0056 {} 0057 0058 } 0059 0060 #endif