Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesignerSection.h
Show All 29 Lines | |||||
30 | class QDomElement; | 30 | class QDomElement; | ||
31 | class QGraphicsItem; | 31 | class QGraphicsItem; | ||
32 | typedef QList<QGraphicsItem*> QGraphicsItemList; | 32 | typedef QList<QGraphicsItem*> QGraphicsItemList; | ||
33 | 33 | | |||
34 | class KPropertySet; | 34 | class KPropertySet; | ||
35 | class KProperty; | 35 | class KProperty; | ||
36 | 36 | | |||
37 | class KReportDesigner; | 37 | class KReportDesigner; | ||
38 | class KReportZoomHandler; | ||||
38 | 39 | | |||
39 | // | 40 | // | ||
40 | // Class ReportSection | 41 | // Class ReportSection | ||
41 | // | 42 | // | ||
42 | // This class is the base to all Report Section's visual representation. | 43 | // This class is the base to all Report Section's visual representation. | ||
43 | // It contains the basic data and interface that all the sections need to work. | 44 | // It contains the basic data and interface that all the sections need to work. | ||
44 | // | 45 | // | ||
45 | class KREPORT_EXPORT KReportDesignerSection : public QWidget | 46 | class KREPORT_EXPORT KReportDesignerSection : public QWidget | ||
46 | { | 47 | { | ||
47 | Q_OBJECT | 48 | Q_OBJECT | ||
48 | public: | 49 | public: | ||
49 | explicit KReportDesignerSection(KReportDesigner * rptdes); | | |||
50 | virtual ~KReportDesignerSection(); | 50 | virtual ~KReportDesignerSection(); | ||
51 | 51 | | |||
52 | void setTitle(const QString & s); | 52 | void setTitle(const QString & s); | ||
53 | void buildXML(QDomDocument *doc, QDomElement *section); | 53 | void buildXML(QDomDocument *doc, QDomElement *section); | ||
54 | void initFromXML(const QDomNode & section); | 54 | void initFromXML(const QDomNode & section); | ||
55 | virtual QSize sizeHint() const; | 55 | virtual QSize sizeHint() const; | ||
56 | 56 | | |||
57 | /** | 57 | /** | ||
58 | * @brief Return the items in the section | 58 | * @brief Return the items in the section | ||
59 | * Only return top-level items ... ie, items with no parent item | 59 | * Only return top-level items ... ie, items with no parent item | ||
60 | * because child items are not full report-items, they are implementation | 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 | 61 | * details of a report item and do not need to be counted individually | ||
62 | * | 62 | * | ||
63 | * @return QGraphicsItemList | 63 | * @return QGraphicsItemList | ||
64 | */ | 64 | */ | ||
65 | QGraphicsItemList items() const; | 65 | QGraphicsItemList items() const; | ||
66 | 66 | | |||
67 | void setSectionCursor(const QCursor&); | 67 | void setSectionCursor(const QCursor&); | ||
68 | void unsetSectionCursor(); | 68 | void unsetSectionCursor(); | ||
69 | 69 | | |||
70 | protected Q_SLOTS: | 70 | protected Q_SLOTS: | ||
71 | void slotResizeBarDragged(int delta); | 71 | void slotResizeBarDragged(int delta); | ||
72 | 72 | | |||
73 | protected: | ||||
74 | explicit KReportDesignerSection(KReportDesigner * rptdes, | ||||
75 | const KReportZoomHandler &zoomHandler); | ||||
76 | | ||||
73 | private Q_SLOTS: | 77 | private Q_SLOTS: | ||
74 | void slotPageOptionsChanged(KPropertySet &); | 78 | void slotPageOptionsChanged(KPropertySet &); | ||
75 | void slotSceneClicked(); | 79 | void slotSceneClicked(); | ||
76 | void slotPropertyChanged(KPropertySet &, KProperty &); | 80 | void slotPropertyChanged(KPropertySet &, KProperty &); | ||
77 | 81 | | |||
78 | private: | 82 | private: | ||
79 | Q_DISABLE_COPY(KReportDesignerSection) | 83 | Q_DISABLE_COPY(KReportDesignerSection) | ||
80 | class Private; | 84 | class Private; | ||
81 | Private * const d; | 85 | Private * const d; | ||
86 | friend class KReportDesigner; | ||||
82 | friend class KReportDesignerSectionTitle; | 87 | friend class KReportDesignerSectionTitle; | ||
83 | }; | 88 | }; | ||
84 | 89 | | |||
85 | #endif | 90 | #endif | ||
86 | 91 | |