From a5a6bbf90f43e1d0370bfc39868179614aa42292 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Fri, 25 Nov 2011 09:14:17 +1000 Subject: [PATCH] Slight improvement to event list links --- daily.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/daily.cpp b/daily.cpp index 59a28b2c..9db3c976 100644 --- a/daily.cpp +++ b/daily.cpp @@ -255,7 +255,10 @@ void Daily::on_Link_clicked(const QUrl &url) } else if (code=="event") { QList list=ui->treeWidget->findItems(data,Qt::MatchContains); if (list.size()>0) { - ui->treeWidget->setCurrentItem(list.at(0)); + ui->treeWidget->collapseAll(); + ui->treeWidget->expandItem(list.at(0)); + QTreeWidgetItem *wi=list.at(0)->child(0); + ui->treeWidget->setCurrentItem(wi); ui->tabWidget->setCurrentIndex(1); } } else { @@ -457,8 +460,8 @@ void Daily::Load(QDate date) QString html="" "" "" @@ -549,24 +552,24 @@ void Daily::Load(QDate date) QString cs; if (cpap->machine->GetClass()!="PRS1") { - cs="4 align=center>"; - } else cs="2>"; + cs="4 width='100%' align=center>"; + } else cs="2 width='50%'>"; html+="" ""+tr("AHI")+""+QString().sprintf("%.2f",ahi)+"\n" - ""+tr("Hypopnea")+""+QString().sprintf("%.2f",hi)+"\n"; + " "+tr("Hypopnea")+""+QString().sprintf("%.2f",hi)+"\n"; if (cpap->machine->GetClass()=="ResMed") { - html+=""+tr("Unspecified Apnea")+""+QString().sprintf("%.2f",uai)+"\n"; + html+=" "+tr("Unspecified Apnea")+""+QString().sprintf("%.2f",uai)+"\n"; } - html+=""+tr("Obstructive")+""+QString().sprintf("%.2f",oai)+"\n" - ""+tr("Clear Airway")+""+QString().sprintf("%.2f",cai)+"\n" + html+=" "+tr("Obstructive")+""+QString().sprintf("%.2f",oai)+"\n" + " "+tr("Clear Airway")+""+QString().sprintf("%.2f",cai)+"\n" ""; if (cpap->machine->GetClass()=="PRS1") { html+="" - "\n" - "\n" - "\n" - "\n" + "\n" + "\n" + "\n" + "\n" "
"+tr("RERA")+""+QString().sprintf("%.2f",rei)+"
"+tr("FlowLimit")+""+a.sprintf("%.2f",fli)+"
"+tr("Vsnore")+""+QString().sprintf("%.2f",vsi)+"
"+tr("PB/CSR")+""+QString().sprintf("%.2f",csr)+"%
 "+tr("RERA")+""+QString().sprintf("%.2f",rei)+"
 "+tr("FlowLimit")+""+a.sprintf("%.2f",fli)+"
 "+tr("Vsnore")+""+QString().sprintf("%.2f",vsi)+"
 "+tr("PB/CSR")+""+QString().sprintf("%.2f",csr)+"%
"; } else if (cpap->machine->GetClass()=="Intellipap") { html+=""