File indexing completed on 2024-05-05 16:48:34
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2001-2007 by OpenMFG, LLC (info@openmfg.com) 0003 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk) 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it under the terms of the GNU Lesser General Public 0007 * License as published by the Free Software Foundation; either 0008 * version 2.1 of the License, or (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 * Lesser General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Lesser General Public 0016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 0017 */ 0018 0019 #ifndef KREPORTDETAILSECTIONDATA_H 0020 #define KREPORTDETAILSECTIONDATA_H 0021 0022 #include <QObject> 0023 0024 #include "KReportDataSource.h" 0025 0026 class KReportSectionData; 0027 class KReportDetailGroupSectionData; 0028 class KReportDocument; 0029 0030 class QDomElement; 0031 0032 /** 0033 */ 0034 class KReportDetailSectionData : public QObject 0035 { 0036 Q_OBJECT 0037 public: 0038 explicit KReportDetailSectionData(QObject *parent = nullptr); 0039 KReportDetailSectionData(const QDomElement &elemSource, KReportDocument *report); 0040 ~KReportDetailSectionData() override; 0041 0042 enum class PageBreak { 0043 None, 0044 AtEnd 0045 }; 0046 0047 QString name; 0048 PageBreak pageBreak; 0049 QList<KReportDataSource::SortedField> sortedFields; 0050 0051 KReportSectionData *detailSection; 0052 0053 QList<KReportDetailGroupSectionData*> groupList; 0054 0055 bool isValid() const { 0056 return m_valid; 0057 } 0058 0059 private: 0060 bool m_valid; 0061 }; 0062 0063 class KReportDetailGroupSectionData 0064 { 0065 public: 0066 KReportDetailGroupSectionData(); 0067 0068 enum class PageBreak { 0069 None, 0070 AfterGroupFooter, 0071 BeforeGroupHeader 0072 }; 0073 0074 QString column; 0075 PageBreak pagebreak; 0076 Qt::SortOrder m_sort; 0077 0078 KReportSectionData *groupHeader; 0079 KReportSectionData *groupFooter; 0080 }; 0081 0082 #endif