Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/reports/kexireportdesignview.cpp
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Line(s) | 157 | } else { | |||
---|---|---|---|---|---|
158 | if (m_reportDesigner) { | 158 | if (m_reportDesigner) { | ||
159 | m_scrollArea->takeWidget(); | 159 | m_scrollArea->takeWidget(); | ||
160 | delete m_reportDesigner; | 160 | delete m_reportDesigner; | ||
161 | m_reportDesigner = 0; | 161 | m_reportDesigner = 0; | ||
162 | } | 162 | } | ||
163 | 163 | | |||
164 | m_reportDesigner = new KReportDesigner(this, tempData()->reportDefinition); | 164 | m_reportDesigner = new KReportDesigner(this, tempData()->reportDefinition); | ||
165 | m_sourceSelector->setConnectionData(tempData()->connectionDefinition); | 165 | m_sourceSelector->setConnectionData(tempData()->connectionDefinition); | ||
166 | m_reportDesigner->setScriptSource(qobject_cast<KexiReportPart*>(part())); | ||||
166 | } | 167 | } | ||
167 | connect(m_reportDesigner, SIGNAL(itemInserted(QString)), this, SIGNAL(itemInserted(QString))); | 168 | connect(m_reportDesigner, SIGNAL(itemInserted(QString)), this, SIGNAL(itemInserted(QString))); | ||
168 | 169 | | |||
169 | m_scrollArea->setWidget(m_reportDesigner); | 170 | m_scrollArea->setWidget(m_reportDesigner); | ||
170 | 171 | | |||
171 | connect(m_reportDesigner, SIGNAL(propertySetChanged()), this, SLOT(slotDesignerPropertySetChanged())); | 172 | connect(m_reportDesigner, SIGNAL(propertySetChanged()), this, SLOT(slotDesignerPropertySetChanged())); | ||
172 | connect(m_reportDesigner, SIGNAL(dirty()), this, SLOT(setDirty())); | 173 | connect(m_reportDesigner, SIGNAL(dirty()), this, SLOT(setDirty())); | ||
173 | 174 | | |||
Show All 24 Lines | |||||
198 | 199 | | |||
199 | KexiReportPartTempData* KexiReportDesignView::tempData() const | 200 | KexiReportPartTempData* KexiReportDesignView::tempData() const | ||
200 | { | 201 | { | ||
201 | return static_cast<KexiReportPartTempData*>(window()->data()); | 202 | return static_cast<KexiReportPartTempData*>(window()->data()); | ||
202 | } | 203 | } | ||
203 | 204 | | |||
204 | void KexiReportDesignView::slotSourceDataChanged() | 205 | void KexiReportDesignView::slotSourceDataChanged() | ||
205 | { | 206 | { | ||
206 | m_reportDesigner->setDataSource(m_sourceSelector->createSourceData()); | 207 | m_reportDesigner->setDataSource(m_sourceSelector->createSourceData()); | ||
staniek: Not needed | |||||
207 | tempData()->connectionDefinition = m_sourceSelector->connectionData(); | 208 | tempData()->connectionDefinition = m_sourceSelector->connectionData(); | ||
208 | setDirty(true); | 209 | setDirty(true); | ||
209 | } | 210 | } | ||
210 | 211 | | |||
211 | void KexiReportDesignView::triggerAction(const QString &action) | 212 | void KexiReportDesignView::triggerAction(const QString &action) | ||
212 | { | 213 | { | ||
213 | m_reportDesigner->slotItem(action); | 214 | m_reportDesigner->slotItem(action); | ||
214 | } | 215 | } |
Not needed