KReport

KReportDesignerSection.h
1/* This file is part of the KDE project
2 * Copyright (C) 2001-2007 by OpenMFG, LLC (info@openmfg.com)
3 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
4 * Copyright (C) 2014 Jarosław Staniek <staniek@kde.org>
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
28class QDomNode;
29class QDomDocument;
30class QDomElement;
31class QGraphicsItem;
33
34class KPropertySet;
35class KProperty;
36
37class KReportDesigner;
38class 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 */
45class KREPORT_EXPORT KReportDesignerSection : public QWidget
46{
47 Q_OBJECT
48public:
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
70protected Q_SLOTS:
71 void slotResizeBarDragged(int delta, bool changeSet = true);
72
73protected:
75 const KReportZoomHandler &zoomHandler);
76
77private Q_SLOTS:
78 void slotPageOptionsChanged(KPropertySet &);
79 void slotSceneClicked();
80 void slotPropertyChanged(KPropertySet &, KProperty &);
81
82private:
83 Q_DISABLE_COPY(KReportDesignerSection)
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.
The ReportDesigner is the main widget for designing a report.
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:50:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.