File indexing completed on 2024-04-28 04:32:04
0001 /* 0002 * Copyright (C) 2010-2015 by Stephen Allewell 0003 * steve.allewell@gmail.com 0004 * 0005 * This program is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU General Public License as published by 0007 * the Free Software Foundation; either version 2 of the License, or 0008 * (at your option) any later version. 0009 */ 0010 0011 #ifndef PagePreviewListWidgetItem_H 0012 #define PagePreviewListWidgetItem_H 0013 0014 #include <QListWidgetItem> 0015 #include <QPrinter> 0016 0017 class Document; 0018 class Page; 0019 0020 class PagePreviewListWidgetItem : public QListWidgetItem 0021 { 0022 public: 0023 PagePreviewListWidgetItem(Document *, Page *); 0024 virtual ~PagePreviewListWidgetItem() = default; 0025 0026 QPageSize pageSize() const; 0027 QPageLayout::Orientation orientation() const; 0028 int paperWidth() const; 0029 int paperHeight() const; 0030 0031 void setPageSize(QPageSize); 0032 void setOrientation(QPageLayout::Orientation); 0033 0034 Page *page() const; 0035 void generatePreviewIcon(); 0036 0037 private: 0038 Document *m_document; 0039 Page *m_page; 0040 int m_paperWidth; 0041 int m_paperHeight; 0042 }; 0043 0044 #endif // PagePreviewListWidgetItem_H