File indexing completed on 2024-05-05 08:41:19
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 PrinterConfiguration_H 0012 #define PrinterConfiguration_H 0013 0014 #include <QDataStream> 0015 #include <QList> 0016 0017 #include "Page.h" 0018 0019 class PrinterConfiguration 0020 { 0021 public: 0022 PrinterConfiguration(); 0023 PrinterConfiguration(const PrinterConfiguration &); 0024 ~PrinterConfiguration(); 0025 0026 PrinterConfiguration &operator=(const PrinterConfiguration &); 0027 0028 bool isEmpty() const; 0029 0030 void addPage(Page *); 0031 void insertPage(int, Page *); 0032 void removePage(Page *); 0033 0034 QList<Page *> pages() const; 0035 0036 friend QDataStream &operator<<(QDataStream &, const PrinterConfiguration &); 0037 friend QDataStream &operator>>(QDataStream &, PrinterConfiguration &); 0038 0039 private: 0040 void updatePageNumbers(); 0041 0042 static const int version = 100; 0043 0044 QList<Page *> m_pages; 0045 }; 0046 0047 #endif // PrinterConfiguration_H