File indexing completed on 2024-04-28 04:42:10
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 KREPORTDESIGNERSECTIONDETAIL_H 0020 #define KREPORTDESIGNERSECTIONDETAIL_H 0021 0022 #include <QWidget> 0023 0024 #include "kreport_export.h" 0025 0026 class QDomNode; 0027 class QDomElement; 0028 class QDomDocument; 0029 0030 class KReportDesignerSection; 0031 class KReportDesigner; 0032 class KReportDesignerSectionDetailGroup; 0033 0034 /*! 0035 * @brief The central detail section which contains the bulk of the report 0036 */ 0037 class KREPORT_EXPORT KReportDesignerSectionDetail : public QWidget 0038 { 0039 Q_OBJECT 0040 public: 0041 explicit KReportDesignerSectionDetail(KReportDesigner * rptdes); 0042 ~KReportDesignerSectionDetail() override; 0043 0044 enum class PageBreak { 0045 None, 0046 AtEnd 0047 }; 0048 0049 void setPageBreak(PageBreak pageBreak); 0050 PageBreak pageBreak() const; 0051 0052 KReportDesignerSection * detailSection() const; 0053 0054 void buildXML(QDomDocument *doc, QDomElement *section); 0055 //! @todo 4.0: Use QDomElement 0056 void initFromXML(QDomNode *node); 0057 0058 KReportDesigner * reportDesigner() const; 0059 0060 int groupSectionCount() const; 0061 KReportDesignerSectionDetailGroup * groupSection(int i) const; 0062 void insertGroupSection(int idx, KReportDesignerSectionDetailGroup * rsd); 0063 int indexOfGroupSection(const QString & column) const; 0064 void removeGroupSection(int idx, bool del = false); 0065 QSize sizeHint() const override; 0066 0067 void setSectionCursor(const QCursor&); 0068 void unsetSectionCursor(); 0069 0070 private: 0071 Q_DISABLE_COPY(KReportDesignerSectionDetail) 0072 class Private; 0073 Private * const d; 0074 }; 0075 0076 #endif