File indexing completed on 2024-04-21 05:53:49
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2007-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 FRAMESPRINT_FRAMESTOPAPERPRINTER_HPP 0010 #define FRAMESPRINT_FRAMESTOPAPERPRINTER_HPP 0011 0012 // Qt 0013 #include <QObject> 0014 #include <QVector> 0015 #include <QRect> 0016 0017 class QPrinter; 0018 class AbstractFrameRenderer; 0019 0020 class FramesToPaperPrinter : public QObject 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 FramesToPaperPrinter(); 0026 ~FramesToPaperPrinter() override; 0027 0028 public: 0029 void setPaperRect(QRect paperRect); 0030 void setPageRect(QRect pageRect); 0031 0032 void addFrameRenderer(AbstractFrameRenderer* frameRenderer); 0033 0034 bool print(QPrinter* printer, int firstPageIndex, int lastPageIndex); 0035 0036 public: 0037 QRect pageRect() const; 0038 0039 Q_SIGNALS: 0040 void printedPage(int pageIndex); 0041 0042 private: 0043 QVector<AbstractFrameRenderer*> mFrameRendererList; 0044 QRect mPaperRect; 0045 QRect mPageRect; 0046 }; 0047 0048 #endif