Date locale stuff

This commit is contained in:
Mark Watkins 2011-11-15 16:54:58 +10:00
commit d6615d21e3
3 changed files with 15 additions and 11 deletions

View File

@ -2,6 +2,7 @@
#include <QLocale>
#include <QMessageBox>
#include <QCalendarWidget>
#include <QTextCharFormat>
#include "SleepLib/profiles.h"
#include "SleepLib/day.h"
#include "exportcsv.h"
@ -206,15 +207,15 @@ void ExportCSV::on_exportButton_clicked()
float ahi=sess->count(CPAP_Obstructive)+sess->count(CPAP_Hypopnea)+sess->count(CPAP_Apnea)+sess->count(CPAP_ClearAirway);
ahi/=sess->hours();
data+=sep+QString::number(ahi,'f',3);
for (int i=0;i<countlist.size();i++)
data+=sep+QString::number(sess->count(countlist.at(i)));
for (int i=0;i<avglist.size();i++)
data+=sep+QString::number(day->wavg(avglist.at(i)));
for (int i=0;i<p90list.size();i++)
data+=sep+QString::number(day->p90(p90list.at(i)));
for (int j=0;j<countlist.size();j++)
data+=sep+QString::number(sess->count(countlist.at(j)));
for (int j=0;j<avglist.size();j++)
data+=sep+QString::number(day->wavg(avglist.at(j)));
for (int j=0;j<p90list.size();j++)
data+=sep+QString::number(day->p90(p90list.at(j)));
data+=newline;
file.write(data.toAscii());
}
data+=newline;
file.write(data.toAscii());
} else if (ui->rb1_details->isChecked()) {
QStringList all=countlist;
all.append(avglist);

View File

@ -53,7 +53,7 @@
<item>
<widget class="QRadioButton" name="rb1_Summary">
<property name="text">
<string>Summary</string>
<string>Daily</string>
</property>
<property name="checked">
<bool>true</bool>

View File

@ -343,12 +343,15 @@ void MainWindow::on_webView_loadProgress(int progress)
void MainWindow::on_action_About_triggered()
{
QString msg=tr("<html><body><div align='center'><h2>SleepyHead v%1.%2.%3</h2>Build Date: %4 %5<br/>Revision: %6<hr>"
QString gitrev=QString(GIT_REVISION);
if (!gitrev.isEmpty()) gitrev="Revision: "+gitrev;
QString msg=tr("<html><body><div align='center'><h2>SleepyHead v%1.%2.%3</h2>Build Date: %4 %5<br/>%6<hr>"
"Copyright &copy;2011 Mark Watkins (jedimark) <br> \n"
"<a href='http://sleepyhead.sourceforge.net'>http://sleepyhead.sourceforge.net</a> <hr>"
"This software is released under the GNU Public License <br>"
"<i>This software comes with absolutely no warranty, either express of implied. It comes with no guarantee of fitness for any particular purpose. No guarantees are made regarding the accuracy of any data this program displays."
"</div></body></html>").arg(major_version).arg(minor_version).arg(revision_number).arg(__DATE__).arg(__TIME__).arg(GIT_REVISION);
"</div></body></html>").arg(major_version).arg(minor_version).arg(revision_number).arg(__DATE__).arg(__TIME__).arg(gitrev);
QMessageBox msgbox(QMessageBox::Information,tr("About SleepyHead"),"",QMessageBox::Ok,this);
msgbox.setTextFormat(Qt::RichText);
msgbox.setText(msg);