diff options
Diffstat (limited to 'desktop-widgets/printer.cpp')
-rw-r--r-- | desktop-widgets/printer.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/desktop-widgets/printer.cpp b/desktop-widgets/printer.cpp index b617fde11..9de1e41be 100644 --- a/desktop-widgets/printer.cpp +++ b/desktop-widgets/printer.cpp @@ -195,6 +195,21 @@ void Printer::templateProgessUpdated(int value) emit progessUpdated(done); } +QString Printer::exportHtml() { + TemplateLayout t(printOptions, templateOptions); + connect(&t, SIGNAL(progressUpdated(int)), this, SLOT(templateProgessUpdated(int))); + QString html; + + if (printOptions->type == print_options::DIVELIST) { + html = t.generate(); + } else if (printOptions->type == print_options::STATISTICS ) { + html = t.generateStatistics(); + } + + // TODO: write html to file + return html; +} + void Printer::print() { // we can only print if "PRINT" mode is selected |