KReport

KReportDesignerSectionDetailGroup.h
1 /* This file is part of the KDE project
2  * Copyright (C) 2001-2007 by OpenMFG, LLC ([email protected])
3  * Copyright (C) 2007-2008 by Adam Pigg ([email protected])
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef KREPORTDESIGNERSECTIONDETAILGROUP_H
20 #define KREPORTDESIGNERSECTIONDETAILGROUP_H
21 
22 #include <QObject>
23 
24 #include "kreport_export.h"
25 
26 class QDomElement;
27 class QDomDocument;
28 class QString;
29 class QWidget;
30 
33 
34 /*!
35  * @brief A section group allows a header and footer to be used for a particular report field
36 */
37 class KREPORT_EXPORT KReportDesignerSectionDetailGroup : public QObject
38 {
39  Q_OBJECT
40 public:
42  QWidget *parent = nullptr);
44 
45  enum class PageBreak {
46  None,
47  AfterGroupFooter,
48  BeforeGroupHeader
49  };
50 
51  void setColumn(const QString &);
52  QString column() const;
53 
54  void setGroupHeaderVisible(bool yes = true);
55  bool groupHeaderVisible() const;
56 
57  void setGroupFooterVisible(bool yes = true);
58  bool groupFooterVisible() const;
59 
60  void setPageBreak(PageBreak);
61  PageBreak pageBreak() const;
62 
63  void setSort(Qt::SortOrder);
64  Qt::SortOrder sort();
65 
66  KReportDesignerSection * groupHeader() const;
67  KReportDesignerSection * groupFooter() const;
68 
69  void buildXML(QDomDocument *doc, QDomElement *section) const;
70  void initFromXML( const QDomElement &element );
71 
72 private:
74  class Private;
75  Private * const d;
76 };
77 
78 
79 #endif
This class is the base to all Report Section's visual representation.
The central detail section which contains the bulk of the report.
A section group allows a header and footer to be used for a particular report field.
SortOrder
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed Sep 28 2022 04:10:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.