Ask before opening oximetry screen, W.I.P. message in preferences->Graph

This commit is contained in:
Mark Watkins 2011-10-05 16:45:33 +10:00
parent a440d91e1b
commit 91da11e936
2 changed files with 17 additions and 12 deletions

View File

@ -77,9 +77,6 @@ MainWindow::MainWindow(QWidget *parent) :
//new QGLContext(fmt);
//shared_context->create(shared_context);
daily=NULL;
//overview=NULL;
//oximetry=NULL;
qstatusbar=ui->statusbar;
qprogress=new QProgressBar(this);
qprogress->setMaximum(100);
@ -160,8 +157,6 @@ MainWindow::~MainWindow()
void MainWindow::Startup()
{
qDebug() << pref["AppName"].toString().toAscii()+" v"+pref["VersionString"].toString().toAscii() << "built with Qt"<< QT_VERSION_STR << "on" << __DATE__ << __TIME__;
qstatus->setText(tr("Loading Data"));
qprogress->show();
@ -178,9 +173,6 @@ void MainWindow::Startup()
overview=new Overview(ui->tabWidget,profile,daily->SharedWidget());
ui->tabWidget->insertTab(2,overview,tr("Overview"));
oximetry=new Oximetry(ui->tabWidget,profile,daily->SharedWidget());
ui->tabWidget->insertTab(3,oximetry,tr("Oximetry"));
if (daily) daily->ReloadGraphs();
if (overview) overview->ReloadGraphs();
qprogress->hide();
@ -376,11 +368,17 @@ void MainWindow::on_action_Preferences_triggered()
void MainWindow::on_oximetryButton_clicked()
{
if (oximetry) {
ui->tabWidget->setCurrentWidget(oximetry);
qstatus2->setText("Oximetry");
oximetry->RedrawGraphs();
bool first=false;
if (!oximetry) {
if (QMessageBox::question(this,"Question","Do you have a CMS50[x] Oximeter?\nOne is required to use this section.",QMessageBox::Yes,QMessageBox::No)==QMessageBox::No) return;
oximetry=new Oximetry(ui->tabWidget,profile,daily->SharedWidget());
ui->tabWidget->insertTab(3,oximetry,tr("Oximetry"));
first=true;
}
ui->tabWidget->setCurrentWidget(oximetry);
if (!first) oximetry->RedrawGraphs();
qstatus2->setText("Oximetry");
}
void MainWindow::on_actionCheck_for_Updates_triggered()

View File

@ -486,6 +486,13 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>This page is yet another work in progress. Please ignore.</string>
</property>
</widget>
</item>
<item>
<widget class="QTreeWidget" name="graphTree">
<property name="headerHidden">