1 /* 2 dspdfviewer - Dual Screen PDF Viewer for LaTeX-Beamer 3 Copyright (C) 2012 Danny Edel <mail@danny-edel.de> 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License along 16 with this program; if not, write to the Free Software Foundation, Inc., 17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 20 21 #ifndef RENDERUTILS_H 22 #define RENDERUTILS_H 23 24 #include <QSharedPointer> 25 #include "pagepart.h" 26 #include <QImage> 27 #include "poppler-qt.h" 28 29 class RenderUtils 30 { 31 public: 32 static QImage renderPagePart(QSharedPointer<const Poppler::Page> page, QSize targetSize, PagePart whichPart); 33 34 /** Since only the static functions of this class are used, we do not need to construct instances */ 35 RenderUtils() =delete; 36 37 /** Notifies about impending shutdown. 38 * 39 * All further render attempts will return null images. 40 */ 41 static void notifyShutdown(void); 42 }; 43 44 #endif // RENDERUTILS_H 45