Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesigner.h
Show All 39 Lines | |||||
40 | class KReportDesignerSectionScene; | 40 | class KReportDesignerSectionScene; | ||
41 | class KReportDesignerSectionView; | 41 | class KReportDesignerSectionView; | ||
42 | class QAction; | 42 | class QAction; | ||
43 | 43 | | |||
44 | #ifdef KREPORT_SCRIPTING | 44 | #ifdef KREPORT_SCRIPTING | ||
45 | class KReportScriptSource; | 45 | class KReportScriptSource; | ||
46 | #endif | 46 | #endif | ||
47 | 47 | | |||
48 | // | 48 | | ||
49 | // Class ReportDesigner | 49 | /*! | ||
50 | // The ReportDesigner is the main widget for designing a report | 50 | * @brief The ReportDesigner is the main widget for designing a report | ||
51 | // | 51 | */ | ||
52 | class KREPORT_EXPORT KReportDesigner : public QWidget | 52 | class KREPORT_EXPORT KReportDesigner : public QWidget | ||
53 | { | 53 | { | ||
54 | Q_OBJECT | 54 | Q_OBJECT | ||
55 | public: | 55 | public: | ||
56 | /** | 56 | /** | ||
57 | @brief Constructor that create a blank designer | 57 | @brief Constructor that create a blank designer | ||
58 | @param widget QWidget parent | 58 | @param parent QWidget parent | ||
59 | */ | 59 | */ | ||
60 | explicit KReportDesigner(QWidget *parent = nullptr); | 60 | explicit KReportDesigner(QWidget *parent = nullptr); | ||
61 | 61 | | |||
62 | /** | 62 | /** | ||
63 | @brief Constructor that create a designer, and loads the report described in the QDomElement | 63 | @brief Constructor that create a designer, and loads the report described in the QDomElement | ||
64 | @param widget QWidget parent | 64 | @param parent QWidget parent | ||
65 | @param element Report structure XML element | 65 | @param desc Report structure XML element | ||
66 | */ | 66 | */ | ||
67 | KReportDesigner(QWidget *parent, const QDomElement &data); | 67 | KReportDesigner(QWidget *parent, const QDomElement &desc); | ||
68 | 68 | | |||
69 | /** | 69 | /** | ||
70 | @brief Desctructor | 70 | @brief Desctructor | ||
71 | */ | 71 | */ | ||
72 | ~KReportDesigner() override; | 72 | ~KReportDesigner() override; | ||
73 | 73 | | |||
74 | /** | 74 | /** | ||
75 | @brief Sets the report data | 75 | @brief Sets the report data | ||
Show All 15 Lines | 89 | #endif | |||
91 | /** | 91 | /** | ||
92 | @brief Return a pointer to the reports data | 92 | @brief Return a pointer to the reports data | ||
93 | @return Pointer to report data | 93 | @return Pointer to report data | ||
94 | */ | 94 | */ | ||
95 | KReportDataSource *reportDataSource() const; | 95 | KReportDataSource *reportDataSource() const; | ||
96 | 96 | | |||
97 | /** | 97 | /** | ||
98 | @brief Return a pointer to the section specified | 98 | @brief Return a pointer to the section specified | ||
99 | @param section KReportSectionData::Section enum value of the section to return | 99 | @param type KReportSectionData::Section enum value of the section to return | ||
100 | @return Pointer to report section object, or 0 if no section exists | 100 | @return Pointer to report section object, or 0 if no section exists | ||
101 | */ | 101 | */ | ||
102 | KReportDesignerSection* section(KReportSectionData::Type type) const; | 102 | KReportDesignerSection* section(KReportSectionData::Type type) const; | ||
103 | 103 | | |||
104 | /** | 104 | /** | ||
105 | @brief Creates new section | 105 | @brief Creates new section | ||
106 | @return Pointer to a new report section section object, ownership is transferred to | 106 | @return Pointer to a new report section section object, ownership is transferred to | ||
107 | the caller | 107 | the caller | ||
108 | */ | 108 | */ | ||
109 | KReportDesignerSection* createSection() Q_REQUIRED_RESULT; | 109 | KReportDesignerSection* createSection() Q_REQUIRED_RESULT; | ||
110 | 110 | | |||
111 | /** | 111 | /** | ||
112 | @brief Deletes the section specified | 112 | @brief Deletes the section specified | ||
113 | @param section KReportSectionData::Section enum value of the section to return | 113 | @param type KReportSectionData::Section enum value of the section to return | ||
114 | */ | 114 | */ | ||
115 | void removeSection(KReportSectionData::Type type); | 115 | void removeSection(KReportSectionData::Type type); | ||
116 | 116 | | |||
117 | /** | 117 | /** | ||
118 | @brief Create a new section and insert it into the report | 118 | @brief Create a new section and insert it into the report | ||
119 | @param section KReportSectionData::Section enum value of the section to return | 119 | @param type KReportSectionData::Section enum value of the section to return | ||
120 | */ | 120 | */ | ||
121 | void insertSection(KReportSectionData::Type type); | 121 | void insertSection(KReportSectionData::Type type); | ||
122 | 122 | | |||
123 | /** | 123 | /** | ||
124 | @brief Return a pointer to the detail section. | 124 | @brief Return a pointer to the detail section. | ||
125 | The detail section contains the actual detail section and related group sections | 125 | The detail section contains the actual detail section and related group sections | ||
126 | @return Pointer to detail section | 126 | @return Pointer to detail section | ||
127 | */ | 127 | */ | ||
128 | KReportDesignerSectionDetail* detailSection() const; | 128 | KReportDesignerSectionDetail* detailSection() const; | ||
129 | 129 | | |||
130 | /** | 130 | /** | ||
131 | @brief Sets the title of the reportData | 131 | @brief Sets the title of the reportData | ||
132 | @param title Report Title | 132 | @param title Report Title | ||
133 | */ | 133 | */ | ||
134 | void setReportTitle(const QString &); | 134 | void setReportTitle(const QString &title); | ||
135 | 135 | | |||
136 | /** | 136 | /** | ||
137 | @brief Sets the parameters for the display of the background gridpoints | 137 | @brief Sets the parameters for the display of the background gridpoints | ||
138 | @param visible Grid visibility | 138 | @param visible Grid visibility | ||
139 | @param divisions Number of minor divisions between major points | 139 | @param divisions Number of minor divisions between major points | ||
140 | */ | 140 | */ | ||
141 | void setGridOptions(bool visible, int divisions); | 141 | void setGridOptions(bool visible, int divisions); | ||
142 | 142 | | |||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
199 | @brief Return the current unit assigned to the report | 199 | @brief Return the current unit assigned to the report | ||
200 | */ | 200 | */ | ||
201 | KReportUnit pageUnit() const; | 201 | KReportUnit pageUnit() const; | ||
202 | 202 | | |||
203 | /** | 203 | /** | ||
204 | @brief Handle the context menu event for a report section | 204 | @brief Handle the context menu event for a report section | ||
205 | @param scene The associated scene (section) | 205 | @param scene The associated scene (section) | ||
206 | */ | 206 | */ | ||
207 | void sectionContextMenuEvent(KReportDesignerSectionScene *s, QGraphicsSceneContextMenuEvent * e); | 207 | void sectionContextMenuEvent(KReportDesignerSectionScene *scene, QGraphicsSceneContextMenuEvent * event); | ||
208 | 208 | | |||
209 | /** | 209 | /** | ||
210 | @brief Handle the mouse release event for a report section | 210 | @brief Handle the mouse release event for a report section | ||
211 | */ | 211 | */ | ||
212 | void sectionMouseReleaseEvent(KReportDesignerSectionView *v, QMouseEvent * e); | 212 | void sectionMouseReleaseEvent(KReportDesignerSectionView *v, QMouseEvent * e); | ||
213 | 213 | | |||
214 | void sectionMousePressEvent(KReportDesignerSectionView *v, QMouseEvent * e); | 214 | void sectionMousePressEvent(KReportDesignerSectionView *v, QMouseEvent * e); | ||
215 | 215 | | |||
216 | /** | 216 | /** | ||
217 | @brief Sets the property set for the currently selected item | 217 | @brief Sets the property set for the currently selected item | ||
218 | @param set Property set of item | 218 | @param set Property set of item | ||
219 | */ | 219 | */ | ||
220 | void changeSet(KPropertySet *); | 220 | void changeSet(KPropertySet *set); | ||
221 | 221 | | |||
222 | /** | 222 | /** | ||
223 | @brief Return the property set for the curently selected item | 223 | @brief Return the property set for the curently selected item | ||
224 | */ | 224 | */ | ||
225 | KPropertySet* selectedItemPropertySet() const; | 225 | KPropertySet* selectedItemPropertySet() const; | ||
226 | 226 | | |||
227 | /** | 227 | /** | ||
228 | @brief Sets the modified status, defaulting to true for modified | 228 | @brief Sets the modified status, defaulting to true for modified | ||
229 | @param modified Modified status | 229 | @param modified Modified status | ||
230 | */ | 230 | */ | ||
231 | void setModified(bool modified); | 231 | void setModified(bool modified); | ||
232 | 232 | | |||
233 | /** | 233 | /** | ||
234 | @brief Return a unique name that can be used by the entity | 234 | @brief Return a unique name that can be used by the entity | ||
235 | @param entity Name of entity | 235 | @param name Name of entity | ||
236 | */ | 236 | */ | ||
237 | QString suggestEntityName(const QString &name) const; | 237 | QString suggestEntityName(const QString &name) const; | ||
238 | 238 | | |||
239 | /** | 239 | /** | ||
240 | @brief Checks if the supplied name is unique among all entities | 240 | @brief Checks if the supplied name is unique among all entities | ||
241 | */ | 241 | */ | ||
242 | bool isEntityNameUnique(const QString &name, KReportItemBase *ignore = nullptr) const; | 242 | bool isEntityNameUnique(const QString &name, KReportItemBase *ignore = nullptr) const; | ||
243 | 243 | | |||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |