From 293fe7a78cc4b0712cc8799217519643f0d1ffe4 Mon Sep 17 00:00:00 2001 From: Mark Watkins <jedimark@users.sourceforge.net> Date: Mon, 31 Oct 2011 01:37:11 +1000 Subject: [PATCH] Add Sessions overview charts to reports. Temporarily disabled local HTML template cache --- docs/template_overview.sht | 1 + report.cpp | 5 ++++- report.h | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/template_overview.sht b/docs/template_overview.sht index ca2ca676..b6f449c5 100644 --- a/docs/template_overview.sht +++ b/docs/template_overview.sht @@ -46,6 +46,7 @@ {{graph.Leaks}} {{graph.Pressure}} {{graph.Settings}} +{{graph.Sessions}} {{graph.%PB}} </body> </html> diff --git a/report.cpp b/report.cpp index 3c025bf1..08d26f32 100644 --- a/report.cpp +++ b/report.cpp @@ -47,6 +47,9 @@ Report::Report(QWidget *parent, gGraphView * shared, Overview * overview) : graphs["Settings"]=SET=new gGraph(GraphView,"Settings",graph_print_height,0); SET->AddLayer(m_overview->set); + graphs["Sessions"]=SES=new gGraph(GraphView,"Sessions",graph_print_height,0); + SES->AddLayer(m_overview->ses); + for (QHash<QString,gGraph *>::iterator g=graphs.begin();g!=graphs.end();g++) { gGraph *gr=g.value(); @@ -196,7 +199,7 @@ QString Report::GenerateReport(QString templ,QDate start, QDate end) file.setFileName(filename); QByteArray input; - if (file.exists()) { + if (0) { //file.exists()) { file.open(QIODevice::ReadOnly); input=file.readAll(); file.close(); diff --git a/report.h b/report.h index 9ce0502e..596c6730 100644 --- a/report.h +++ b/report.h @@ -35,8 +35,8 @@ private: Overview * m_overview; gGraphView * shared; gGraphView * GraphView; - gGraph *AHI,*UC,*PR,*LK,*NPB,*SET; - SummaryChart *bc,*uc,*pr,*lk,*npb,*set; + gGraph *AHI,*UC,*PR,*LK,*NPB,*SET,*SES; + SummaryChart *bc,*uc,*pr,*lk,*npb,*set,*ses; QHash<QString,QVariant> locals; QHash<QString,gGraph *> graphs;