KReport

KReportDesignerSection.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  * Copyright (C) 2014 JarosÅ‚aw Staniek <[email protected]>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef __REPORTSECTION_H__
21 #define __REPORTSECTION_H__
22 
23 #include <QWidget>
24 
25 #include "kreport_export.h"
26 
27 // forward declarations
28 class QDomNode;
29 class QDomDocument;
30 class QDomElement;
31 class QGraphicsItem;
33 
34 class KPropertySet;
35 class KProperty;
36 
37 class KReportDesigner;
38 class KReportZoomHandler;
39 
40 /*!
41  * @brief This class is the base to all Report Section's visual representation.
42  *
43  * Contains the basic data and interface that all the sections need to work.
44  */
45 class KREPORT_EXPORT KReportDesignerSection : public QWidget
46 {
47  Q_OBJECT
48 public:
49  ~KReportDesignerSection() override;
50 
51  void setTitle(const QString & s);
52  void buildXML(QDomDocument *doc, QDomElement *section);
53  //! @todo 4.0: Use QDomElement
54  void initFromXML(const QDomNode & section);
55  QSize sizeHint() const override;
56 
57  /**
58  * @brief Return the items in the section
59  * Only return top-level items ... ie, items with no parent item
60  * because child items are not full report-items, they are implementation
61  * details of a report item and do not need to be counted individually
62  *
63  * @return QGraphicsItemList
64  */
65  QGraphicsItemList items() const;
66 
67  void setSectionCursor(const QCursor&);
68  void unsetSectionCursor();
69 
70 protected Q_SLOTS:
71  void slotResizeBarDragged(int delta, bool changeSet = true);
72 
73 protected:
74  explicit KReportDesignerSection(KReportDesigner * rptdes,
75  const KReportZoomHandler &zoomHandler);
76 
77 private Q_SLOTS:
78  void slotPageOptionsChanged(KPropertySet &);
79  void slotSceneClicked();
80  void slotPropertyChanged(KPropertySet &, KProperty &);
81 
82 private:
84  class Private;
85  Private * const d;
86  friend class KReportDesigner;
87  friend class KReportDesignerSectionTitle;
88 };
89 
90 #endif
91 
This class is the base to all Report Section's visual representation.
Q_SLOTSQ_SLOTS
The ReportDesigner is the main widget for designing a report.
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Dec 6 2023 04:08:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.