Jump to content

KReport/API Changes: Difference between revisions

From KDE Community Wiki
Jstaniek (talk | contribs)
No edit summary
Jstaniek (talk | contribs)
No edit summary
Line 2: Line 2:


==Design creation==
==Design creation==
Goal Make it possible to create, modify, open and save KReport designs without touching the designer API.
Started: [[User:Jstaniek|Jstaniek]] ([[User talk:Jstaniek|talk]]) 08:59, 29 July 2015 (UTC)


New classes proposed:
The goal: Make it possible to create, modify, open and save KReport designs without touching the designer API.
 
New classes and relations between them proposed:
*KReportDesign: setContent(xml) loads, toString() saves, modelled after
*KReportDesign: setContent(xml) loads, toString() saves, modelled after
**We don't use KReportDocument name because actual document is: design+data
**We don't use KReportDocument name for this because actual document is: design+data
*KReportDocument: design+data so it's more or less takes KReportDesign and KReportData args.
**KReportDocument can be rendered on a KReportWriter
*KReportWriter is equivalent of QImageWriter, can use files or QIODevices
**Inherit KReportWriter to implement what we so far call 'renderers'
**KReportDocument+KReportWriter is like QPainter+QPaintDevice
 
<pre>
[KReportDesign]
              >--builds-[KReportDocument]-->-is-used-in-[KReportWriter]--writes-to--[File/Screen/Printer]
[ KReportData ]
</pre>

Revision as of 08:59, 29 July 2015

Note

This is a design document


Design creation

Started: Jstaniek (talk) 08:59, 29 July 2015 (UTC)

The goal: Make it possible to create, modify, open and save KReport designs without touching the designer API.

New classes and relations between them proposed:

  • KReportDesign: setContent(xml) loads, toString() saves, modelled after
    • We don't use KReportDocument name for this because actual document is: design+data
  • KReportDocument: design+data so it's more or less takes KReportDesign and KReportData args.
    • KReportDocument can be rendered on a KReportWriter
  • KReportWriter is equivalent of QImageWriter, can use files or QIODevices
    • Inherit KReportWriter to implement what we so far call 'renderers'
    • KReportDocument+KReportWriter is like QPainter+QPaintDevice
[KReportDesign]
              >--builds-[KReportDocument]-->-is-used-in-[KReportWriter]--writes-to--[File/Screen/Printer]
[ KReportData ]