diff --git a/Graphs/gLineOverlay.cpp b/Graphs/gLineOverlay.cpp index 334f5988..9701b483 100644 --- a/Graphs/gLineOverlay.cpp +++ b/Graphs/gLineOverlay.cpp @@ -104,7 +104,7 @@ void gLineOverlayBar::Plot(gGraphWindow & w,float scrx,float scry) if (xx<(1800.0/86400.0)) { GetTextExtent(label,x,y); DrawText(w,label,x1-(x/2),scry-(start_py+height-30+y)); - //w.renderText(x1-(x/2),start_py+height-30+y,label); + //w.renderText(x1-(x/2),scry-(start_py+height-30+y),label); } } } diff --git a/SleepLib/preferences.cpp b/SleepLib/preferences.cpp index 14493fdd..00068536 100644 --- a/SleepLib/preferences.cpp +++ b/SleepLib/preferences.cpp @@ -186,6 +186,7 @@ bool Preferences::Open(QString filename) TiXmlAttribute *attr=pElem->FirstAttribute(); assert(attr!=NULL); QString type=attr->Value(); + type=type.toLower(); QString pKey=pElem->Value(); QString pText=pElem->GetText(); bool ok; @@ -204,11 +205,16 @@ bool Preferences::Open(QString filename) p_preferences[pKey]=d; } else if (type=="bool") { int d=pText.toInt(&ok); - if (!ok) - qDebug("String to number conversion error in Preferences::Open()"); - else + if (!ok) { + if (pText.toLower()=="true") + p_preferences[pKey]=true; + else if (pText.toLower()=="false") + p_preferences[pKey]=false; + else + qDebug("String to number conversion error in Preferences::Open()"); + } else p_preferences[pKey]=(bool)d; - } else if (type=="QDateTime") { + } else if (type=="qdatetime") { QDateTime d; d.fromString("yyyy-MM-dd HH:mm:ss"); if (d.isValid()) diff --git a/daily.cpp b/daily.cpp index c11042cb..ff5d7b05 100644 --- a/daily.cpp +++ b/daily.cpp @@ -66,7 +66,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) : AddCPAPData(flags[8]=new FlagData(PRS1_VSnore2,1)); AddCPAPData(flags[9]=new FlagData(PRS1_Unknown0E,1)); AddCPAPData(frw=new WaveData(CPAP_FlowRate)); - AddGraph(SF=new gGraphWindow(gSplitter,"Event Flags",(QGLWidget *)NULL)); + AddGraph(SF=new gGraphWindow(gSplitter,tr("Event Flags"),(QGLWidget *)NULL)); int sfc=7; SF->SetLeftMargin(SF->GetLeftMargin()+gYAxis::Margin); SF->SetBlockZoom(true); @@ -91,19 +91,19 @@ Daily::Daily(QWidget *parent,QGLContext *context) : AddCPAPData(pressure_iap=new EventData(CPAP_IAP)); AddCPAPData(pressure_eap=new EventData(CPAP_EAP)); AddCPAPData(prd=new EventData(CPAP_Pressure)); - AddGraph(PRD=new gGraphWindow(gSplitter,"Pressure",SF)); + AddGraph(PRD=new gGraphWindow(gSplitter,tr("Pressure"),SF)); PRD->AddLayer(new gXAxis()); PRD->AddLayer(new gYAxis()); PRD->AddLayer(new gFooBar()); PRD->AddLayer(new gLineChart(prd,QColor("dark green"),4096,false,false,true)); - PRD->AddLayer(new gLineChart(pressure_iap,QColor("blue"),4096,false,true,true)); - PRD->AddLayer(new gLineChart(pressure_eap,QColor("red"),4096,false,true,true)); + PRD->AddLayer(new gLineChart(pressure_iap,Qt::blue,4096,false,true,true)); + PRD->AddLayer(new gLineChart(pressure_eap,Qt::red,4096,false,true,true)); PRD->setMinimumHeight(150); AddCPAPData(leakdata=new EventData(CPAP_Leak,0)); //leakdata->ForceMinY(0); //leakdata->ForceMaxY(120); - AddGraph(LEAK=new gGraphWindow(gSplitter,"Leaks",SF)); + AddGraph(LEAK=new gGraphWindow(gSplitter,tr("Leaks"),SF)); LEAK->AddLayer(new gXAxis()); LEAK->AddLayer(new gYAxis()); LEAK->AddLayer(new gFooBar()); @@ -112,12 +112,12 @@ Daily::Daily(QWidget *parent,QGLContext *context) : LEAK->setMinimumHeight(150); - AddGraph(FRW=new gGraphWindow(gSplitter,"Flow Rate",SF)); + AddGraph(FRW=new gGraphWindow(gSplitter,tr("Flow Rate"),SF)); FRW->AddLayer(new gFooBar()); FRW->AddLayer(new gYAxis()); FRW->AddLayer(new gXAxis()); FRW->AddLayer(new gLineOverlayBar(flags[0],QColor("light green"),"CSR")); - gLineChart *g=new gLineChart(frw,QColor("black"),200000,true); + gLineChart *g=new gLineChart(frw,Qt::black,200000,true); g->ReportEmpty(true); @@ -136,33 +136,33 @@ Daily::Daily(QWidget *parent,QGLContext *context) : AddCPAPData(snore=new EventData(CPAP_SnoreGraph,0)); //snore->ForceMinY(0); //snore->ForceMaxY(15); - AddGraph(SNORE=new gGraphWindow(gSplitter,"Snore",SF)); + AddGraph(SNORE=new gGraphWindow(gSplitter,tr("Snore"),SF)); SNORE->AddLayer(new gXAxis()); SNORE->AddLayer(new gYAxis()); SNORE->AddLayer(new gFooBar()); - SNORE->AddLayer(new gLineChart(snore,QColor("black"),4096,false,false,true)); + SNORE->AddLayer(new gLineChart(snore,Qt::black,4096,false,false,true)); SNORE->setMinimumHeight(150); AddOXIData(pulse=new EventData(OXI_Pulse,0,65536,true)); //pulse->ForceMinY(40); //pulse->ForceMaxY(120); - AddGraph(PULSE=new gGraphWindow(gSplitter,"Pulse",SF)); + AddGraph(PULSE=new gGraphWindow(gSplitter,tr("Pulse"),SF)); PULSE->AddLayer(new gXAxis()); PULSE->AddLayer(new gYAxis()); PULSE->AddLayer(new gFooBar()); - PULSE->AddLayer(new gLineChart(pulse,QColor("red"),65536,false,false,true)); + PULSE->AddLayer(new gLineChart(pulse,Qt::red,65536,false,false,true)); PULSE->setMinimumHeight(150); AddOXIData(spo2=new EventData(OXI_SPO2,0,65536,true)); //spo2->ForceMinY(60); //spo2->ForceMaxY(100); - AddGraph(SPO2=new gGraphWindow(gSplitter,"SpO2",SF)); + AddGraph(SPO2=new gGraphWindow(gSplitter,tr("SpO2"),SF)); SPO2->AddLayer(new gXAxis()); SPO2->AddLayer(new gYAxis()); SPO2->AddLayer(new gFooBar()); - SPO2->AddLayer(new gLineChart(spo2,QColor("blue"),65536,false,false,true)); + SPO2->AddLayer(new gLineChart(spo2,Qt::blue,65536,false,false,true)); SPO2->setMinimumHeight(150); SPO2->LinkZoom(PULSE); PULSE->LinkZoom(SPO2); @@ -191,12 +191,12 @@ Daily::Daily(QWidget *parent,QGLContext *context) : G_AHI->SetMargins(0,0,0,0); AddCPAPData(g_ahi=new AHIData()); gCandleStick *l=new gCandleStick(g_ahi); - l->AddName("H"); - l->AddName("OA"); - l->AddName("CA"); - l->AddName("RE"); - l->AddName("FL"); - l->AddName("CSR"); + l->AddName(tr("H")); + l->AddName(tr("OA")); + l->AddName(tr("CA")); + l->AddName(tr("RE")); + l->AddName(tr("FL")); + l->AddName(tr("CSR")); l->color.clear(); l->color.push_back(QColor("blue")); l->color.push_back(QColor("aqua")); @@ -207,9 +207,9 @@ Daily::Daily(QWidget *parent,QGLContext *context) : G_AHI->AddLayer(l); //G_AHI->setMaximumSize(2000,30); //TAP->setMaximumSize(2000,30); - NoData=new QLabel("No CPAP Data",gSplitter); + NoData=new QLabel(tr("No CPAP Data"),gSplitter); NoData->setAlignment(Qt::AlignCenter); - QFont font("Times",20); //NoData->font(); + QFont font("FreeSans",20); //NoData->font(); //font.setBold(true); NoData->setFont(font); NoData->hide(); @@ -252,16 +252,6 @@ Daily::Daily(QWidget *parent,QGLContext *context) : ui->graphSizer->layout(); - /*ui->graphLayout->addWidget(SF); - ui->graphLayout->addWidget(FRW); - ui->graphLayout->addWidget(PRD); - ui->graphLayout->addWidget(LEAK); - ui->graphLayout->addWidget(SNORE); - ui->graphLayout->addWidget(PULSE); - ui->graphLayout->addWidget(SPO2); */ - // ui->graphLayout->addWidget(G_AHI); - //ui->graphLayout->addWidget(TAP); - QTextCharFormat format = ui->calendar->weekdayTextFormat(Qt::Saturday); format.setForeground(QBrush(Qt::black, Qt::SolidPattern)); ui->calendar->setWeekdayTextFormat(Qt::Saturday, format); @@ -443,7 +433,7 @@ void Daily::Load(QDate date) html=html+""+cpap->machine->properties["Serial"]+"\n"; } - html=html+"DateSleepWakeHours"; + html=html+"Date"+tr("Sleep")+""+tr("Wake")+""+tr("Hours")+""; int tt=cpap->total_time(); html=html+""+cpap->first().date().toString(Qt::SystemLocaleShortDate)+""+cpap->first().toString("HH:mm")+""+cpap->last().toString("HH:mm")+""+a.sprintf("%02i:%02i",tt/3600,tt%60)+"\n"; html=html+"
\n"; @@ -490,7 +480,7 @@ void Daily::Load(QDate date) //html=html+wxT("
\n"); if (mode==MODE_BIPAP) { - html=html+("")+tr("90% EPAP ")+a.sprintf("%.2f",eap90)+"cmH2O\n"; + html=html+("")+tr("90% EPAP ")+a.sprintf("%.2f",eap90)+tr("cmH2O")+"\n"; html=html+("")+tr("90% IPAP ")+a.sprintf("%.2f",iap90)+"\n"; } else if (mode==MODE_APAP) { html=html+("")+tr("90% Pressure ")+a.sprintf("%.2f",cpap->summary_weighted_avg(CPAP_PressurePercentValue))+("\n"); @@ -502,30 +492,30 @@ void Daily::Load(QDate date) html=html+(" MinAvgMax"); if (mode==MODE_APAP) { - html=html+"Pressure"+a.sprintf("%.2f",cpap->summary_min(CPAP_PressureMinAchieved)); + html=html+""+tr("Pressure")+""+a.sprintf("%.2f",cpap->summary_min(CPAP_PressureMinAchieved)); html=html+("")+a.sprintf("%.2f",cpap->summary_weighted_avg(CPAP_PressureAverage)); html=html+("")+a.sprintf("%.2f",cpap->summary_max(CPAP_PressureMaxAchieved))+(""); // html=html+wxT("")+_("90% Pressure")+wxT("")+wxString::Format(wxT("%.1fcmH2O"),p90)+wxT("\n"); } else if (mode==MODE_BIPAP) { - html=html+("EPAP")+a.sprintf("%.2f",cpap->summary_min(BIPAP_EAPMin)); + html=html+(""+tr("EPAP")+"")+a.sprintf("%.2f",cpap->summary_min(BIPAP_EAPMin)); html=html+("")+a.sprintf("%.2f",cpap->summary_weighted_avg(BIPAP_EAPAverage)); html=html+("")+a.sprintf("%.2f",cpap->summary_max(BIPAP_EAPMax))+(""); - html=html+("IPAP")+a.sprintf("%.2f",cpap->summary_min(BIPAP_IAPMin)); + html=html+(""+tr("IPAP")+"")+a.sprintf("%.2f",cpap->summary_min(BIPAP_IAPMin)); html=html+("")+a.sprintf("%.2f",cpap->summary_weighted_avg(BIPAP_IAPAverage)); html=html+("")+a.sprintf("%.2f",cpap->summary_max(BIPAP_IAPMax))+(""); } - html=html+("Leak"); - html=html+("")+a.sprintf("%.2f",cpap->summary_min(CPAP_LeakMinimum)); - html=html+("")+a.sprintf("%.2f",cpap->summary_weighted_avg(CPAP_LeakAverage)); - html=html+("")+a.sprintf("%.2f",cpap->summary_max(CPAP_LeakMaximum))+(""); + html=html+""+tr("Leak"); + html=html+""+a.sprintf("%.2f",cpap->summary_min(CPAP_LeakMinimum)); + html=html+""+a.sprintf("%.2f",cpap->summary_weighted_avg(CPAP_LeakAverage)); + html=html+""+a.sprintf("%.2f",cpap->summary_max(CPAP_LeakMaximum))+(""); - html=html+("Snore"); - html=html+("")+a.sprintf("%.2f",cpap->summary_min(CPAP_SnoreMinimum)); - html=html+("")+a.sprintf("%.2f",cpap->summary_avg(CPAP_SnoreAverage)); - html=html+("")+a.sprintf("%.2f",cpap->summary_max(CPAP_SnoreMaximum))+(""); + html=html+""+tr("Snore"); + html=html+""+a.sprintf("%.2f",cpap->summary_min(CPAP_SnoreMinimum)); + html=html+""+a.sprintf("%.2f",cpap->summary_avg(CPAP_SnoreAverage)); + html=html+""+a.sprintf("%.2f",cpap->summary_max(CPAP_SnoreMaximum))+(""); FRW->show(); PRD->show(); LEAK->show(); @@ -545,15 +535,15 @@ void Daily::Load(QDate date) SNORE->hide(); } if (oxi) { - html=html+("Pulse"); - html=html+("")+a.sprintf("%.2fbpm",oxi->summary_min(OXI_PulseMin)); - html=html+("")+a.sprintf("%.2fbpm",oxi->summary_avg(OXI_PulseAverage)); - html=html+("")+a.sprintf("%.2fbpm",oxi->summary_max(OXI_PulseMax))+""; + html=html+""+tr("Pulse"); + html=html+""+a.sprintf("%.2fbpm",oxi->summary_min(OXI_PulseMin)); + html=html+""+a.sprintf("%.2fbpm",oxi->summary_avg(OXI_PulseAverage)); + html=html+""+a.sprintf("%.2fbpm",oxi->summary_max(OXI_PulseMax))+""; - html=html+("SpO2"); - html=html+("")+a.sprintf("%.2f%%",oxi->summary_min(OXI_SPO2Min)); - html=html+("")+a.sprintf("%.2f%%",oxi->summary_avg(OXI_SPO2Average)); - html=html+("")+a.sprintf("%.2f%%",oxi->summary_max(OXI_SPO2Max))+""; + html=html+""+tr("SpO2"); + html=html+""+a.sprintf("%.2f%%",oxi->summary_min(OXI_SPO2Min)); + html=html+""+a.sprintf("%.2f%%",oxi->summary_avg(OXI_SPO2Average)); + html=html+""+a.sprintf("%.2f%%",oxi->summary_max(OXI_SPO2Max))+""; //html=html+wxT(" \n"); @@ -564,7 +554,7 @@ void Daily::Load(QDate date) SPO2->hide(); } if (!cpap && !oxi) { - NoData->setText("No CPAP Data for "+date.toString(Qt::SystemLocaleLongDate)); + NoData->setText(tr("No CPAP Data for ")+date.toString(Qt::SystemLocaleLongDate)); NoData->show(); } else NoData->hide(); @@ -690,7 +680,7 @@ void Daily::on_JournalNotesFontsize_activated(int index) void Daily::on_JournalNotesColour_clicked() { - QColor col=QColorDialog::getColor(QColor("black"),this,tr("Pick a Colour")); //,QColorDialog::NoButtons); + QColor col=QColorDialog::getColor(Qt::black,this,tr("Pick a Colour")); //,QColorDialog::NoButtons); if (!col.isValid()) return; QTextCursor cursor = ui->JournalNotes->textCursor(); diff --git a/daily.h b/daily.h index ae350d0c..6bdf744a 100644 --- a/daily.h +++ b/daily.h @@ -31,6 +31,7 @@ public: ~Daily(); void SetGLContext(QGLContext *context) { shared_context=context; }; void ReloadGraphs(); + void RedrawGraphs(); private slots: @@ -67,7 +68,6 @@ private: void AddGraph(gGraphWindow *w) { Graphs.push_back(w); }; void UpdateCPAPGraphs(Day *day); void UpdateOXIGraphs(Day *day); - void RedrawGraphs(); gPointData *flags[10]; diff --git a/daily.ui b/daily.ui index 51c34840..cb7d6576 100644 --- a/daily.ui +++ b/daily.ui @@ -60,6 +60,12 @@ 180 + + + Sans Serif + 9 + + Qt::Sunday @@ -77,6 +83,12 @@ + + + Sans Serif + 10 + + 0 @@ -96,6 +108,12 @@ + + + Sans Serif + 9 + + IBeamCursor @@ -121,6 +139,12 @@ + + + Sans Serif + 10 + + QAbstractItemView::NoEditTriggers diff --git a/mainwindow.cpp b/mainwindow.cpp index beb3a740..95c43e90 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -26,7 +26,7 @@ MainWindow::MainWindow(QWidget *parent) : ui(new Ui::MainWindow) { ui->setupUi(this); - this->setWindowTitle("SleepyHead v0.8."+subversion); + this->setWindowTitle(tr("SleepyHead")+QString(" v0.8.")+subversion); QGLFormat fmt; fmt.setDepth(false); @@ -51,11 +51,15 @@ MainWindow::MainWindow(QWidget *parent) : //loader_progress->Show(); //pref["Version"]=wxString(AutoVersion::_FULLVERSION_STRING,wxConvUTF8); - pref["AppName"]="SleepyHead"; - pref["Profile"]=getUserName(); - pref["LinkGraphMovement"]=true; - pref["fruitsalad"]=true; + if (!pref.Exists("AppName")) pref["AppName"]="SleepyHead"; + if (!pref.Exists("Profile")) pref["Profile"]=getUserName(); + if (!pref.Exists("LinkGraphMovement")) pref["LinkGraphMovement"]=true; + else ui->action_Link_Graphs->setChecked(pref["LinkGraphMovement"].toBool()); + if (!pref.Exists("fruitsalad")) pref["fruitsalad"]=true; + + if (!pref.Exists("UseAntiAliasing")) pref["UseAntiAliasing"]=false; + else ui->actionUse_AntiAliasing->setChecked(pref["UseAntiAliasing"].toBool()); first_load=true; } @@ -77,7 +81,7 @@ MainWindow::~MainWindow() void MainWindow::Startup() { - qstatus->setText("Loading Data"); + qstatus->setText(tr("Loading Data")); qprogress->show(); profile=Profiles::Get(pref["Profile"].toString()); @@ -85,11 +89,11 @@ void MainWindow::Startup() daily=new Daily(ui->tabWidget,shared_context); overview=new Overview(ui->tabWidget,shared_context); - ui->tabWidget->addTab(daily,"Daily"); - ui->tabWidget->addTab(overview,"Overview"); + ui->tabWidget->addTab(daily,tr("Daily")); + ui->tabWidget->addTab(overview,tr("Overview")); qprogress->hide(); - qstatus->setText("Ready"); + qstatus->setText(tr("Ready")); } void MainWindow::on_action_Import_Data_triggered() @@ -102,7 +106,7 @@ void MainWindow::on_action_Import_Data_triggered() if (qfd.exec()) { qprogress->setValue(0); qprogress->show(); - qstatus->setText("Importing Data"); + qstatus->setText(tr("Importing Data")); dirNames=qfd.selectedFiles(); for (int i=0;iImport(dirNames[i]); @@ -111,25 +115,15 @@ void MainWindow::on_action_Import_Data_triggered() daily->ReloadGraphs(); overview->ReloadGraphs(); overview->UpdateGraphs(); - qstatus->setText("Ready"); + qstatus->setText(tr("Ready")); qprogress->hide(); } } -void MainWindow::on_actionView_Daily_triggered() -{ - -} - -void MainWindow::on_actionView_Overview_triggered() -{ - -} - void MainWindow::on_actionView_Welcome_triggered() { - + ui->tabWidget->setCurrentWidget(ui->welcome); } void MainWindow::on_action_Fullscreen_triggered() @@ -141,12 +135,6 @@ void MainWindow::on_action_Fullscreen_triggered() } -void MainWindow::on_actionUse_AntiAliasing_triggered() -{ - pref["UseAntiAliasing"]=(bool)ui->actionUse_AntiAliasing->isChecked(); - if (daily) daily->update(); -} - void MainWindow::on_homeButton_clicked() { QString file="qrc:/docs/index.html"; @@ -197,7 +185,7 @@ void MainWindow::on_webView_loadFinished(bool arg1) QTimer::singleShot(0,this,SLOT(Startup())); first_load=false; } else { - qstatus->setText("Ready"); + qstatus->setText(tr("Ready")); } ui->backButton->setEnabled(ui->webView->history()->canGoBack()); ui->forwardButton->setEnabled(ui->webView->history()->canGoForward()); @@ -207,7 +195,7 @@ void MainWindow::on_webView_loadFinished(bool arg1) void MainWindow::on_webView_loadStarted() { if (!first_load) { - qstatus->setText("Loading"); + qstatus->setText(tr("Loading")); qprogress->reset(); qprogress->show(); } @@ -220,14 +208,26 @@ void MainWindow::on_webView_loadProgress(int progress) void MainWindow::on_action_About_triggered() { - QString msg="

SleepyHead v0.8.0


\ + QString msg=tr("

SleepyHead v0.8.0


\ Copyright ©2011 Mark Watkins (jedimark)
\n\ http://sleepyhead.sourceforge.net
\ This software is released under the GNU Public License
\ 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.\ -
"; - QMessageBox msgbox(QMessageBox::Information,"About SleepyHead","",QMessageBox::Ok,this); +
"); + QMessageBox msgbox(QMessageBox::Information,tr("About SleepyHead"),"",QMessageBox::Ok,this); msgbox.setTextFormat(Qt::RichText); msgbox.setText(msg); msgbox.exec(); } + +void MainWindow::on_action_Link_Graphs_triggered(bool checked) +{ + pref["LinkGraphMovement"]=checked; +} + +void MainWindow::on_actionUse_AntiAliasing_triggered(bool checked) +{ + pref["UseAntiAliasing"]=checked; + if (daily) daily->RedrawGraphs(); + +} diff --git a/mainwindow.h b/mainwindow.h index 04163b1f..94fd284d 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -28,16 +28,10 @@ public: private slots: void on_action_Import_Data_triggered(); - void on_actionView_Daily_triggered(); - - void on_actionView_Overview_triggered(); - void on_actionView_Welcome_triggered(); void on_action_Fullscreen_triggered(); - void on_actionUse_AntiAliasing_triggered(); - void on_homeButton_clicked(); void on_backButton_clicked(); @@ -62,6 +56,10 @@ private slots: void Startup(); + void on_action_Link_Graphs_triggered(bool checked); + + void on_actionUse_AntiAliasing_triggered(bool checked); + private: Ui::MainWindow *ui; Daily * daily; diff --git a/mainwindow.ui b/mainwindow.ui index 8e76fd13..e8cb1a6c 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -22,6 +22,12 @@ 16777215 + + + Sans Serif + 10 + + SleepyHead @@ -497,6 +503,19 @@
+ + + + Qt::Vertical + + + + 20 + 40 + + + +
@@ -513,7 +532,7 @@ 0 0 1089 - 29 + 25 @@ -669,5 +688,37 @@ + + actionView_Daily + activated() + dailyButton + click() + + + -1 + -1 + + + 1020 + 223 + + + + + actionView_Overview + activated() + overviewButton + click() + + + -1 + -1 + + + 1020 + 319 + + + diff --git a/overview.cpp b/overview.cpp index 8fc420f7..a16f0929 100644 --- a/overview.cpp +++ b/overview.cpp @@ -45,7 +45,7 @@ Overview::Overview(QWidget *parent,QGLContext *context) : gSplitter->setHandleWidth(3); ui->graphLayout->addWidget(gSplitter); - AHI=new gGraphWindow(ui->SummaryGraphWindow,"AHI",(QGLWidget *)NULL); // Not sure here.. + AHI=new gGraphWindow(ui->SummaryGraphWindow,tr("AHI"),(QGLWidget *)NULL); // Not sure here.. AHI->SetTopMargin(10); AHI->SetBottomMargin(AHI->GetBottomMargin()+gXAxis::Margin+25); AHI->AddLayer(new gFooBar(7)); @@ -53,7 +53,7 @@ Overview::Overview(QWidget *parent,QGLContext *context) : AHI->AddLayer(new gBarChart(ahidata,QColor("red"))); AHI->setMinimumHeight(170); - PRESSURE=new gGraphWindow(ui->SummaryGraphWindow,"Pressure",AHI); + PRESSURE=new gGraphWindow(ui->SummaryGraphWindow,tr("Pressure"),AHI); //PRESSURE->SetMargins(10,15,65,80); PRESSURE->AddLayer(new gYAxis()); PRESSURE->AddLayer(new gXAxis()); @@ -66,7 +66,7 @@ Overview::Overview(QWidget *parent,QGLContext *context) : PRESSURE->SetBottomMargin(PRESSURE->GetBottomMargin()+25); PRESSURE->setMinimumHeight(170); - LEAK=new gGraphWindow(ui->SummaryGraphWindow,"Leak",AHI); + LEAK=new gGraphWindow(ui->SummaryGraphWindow,tr("Leak"),AHI); //LEAK->SetMargins(10,15,65,80); //LEAK->AddLayer(new gBarChart(leak,wxYELLOW)); LEAK->AddLayer(new gXAxis()); @@ -76,7 +76,7 @@ Overview::Overview(QWidget *parent,QGLContext *context) : LEAK->SetBottomMargin(LEAK->GetBottomMargin()+25); LEAK->setMinimumHeight(170); - USAGE=new gGraphWindow(ui->SummaryGraphWindow,"Usage (Hours)",AHI); + USAGE=new gGraphWindow(ui->SummaryGraphWindow,tr("Usage (Hours)"),AHI); //USAGE->SetMargins(10,15,65,80); USAGE->AddLayer(new gFooBar(7)); USAGE->AddLayer(new gYAxis());