mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 02:30:44 +00:00
Enable buttons and tabs if machine data is available
This commit is contained in:
parent
cb025431e5
commit
6213819fa5
@ -32,9 +32,14 @@ Welcome::~Welcome()
|
||||
|
||||
void Welcome::refreshPage()
|
||||
{
|
||||
const auto & mlist = p_profile->GetMachines(MT_CPAP);
|
||||
bool b;
|
||||
|
||||
if (p_profile != nullptr) {
|
||||
const auto & mlist = p_profile->GetMachines(MT_CPAP);
|
||||
b = mlist.size() > 0;
|
||||
} else
|
||||
b = false;
|
||||
|
||||
bool b = mlist.size() > 0;
|
||||
bool showCardWarning = !b;
|
||||
|
||||
|
||||
@ -52,9 +57,9 @@ void Welcome::refreshPage()
|
||||
ui->dailyButton->setEnabled(b);
|
||||
ui->overviewButton->setEnabled(b);
|
||||
ui->statisticsButton->setEnabled(b);
|
||||
// ui->tabWidget->setTabEnabled(2, b);
|
||||
// ui->tabWidget->setTabEnabled(3, b);
|
||||
// ui->tabWidget->setTabEnabled(4, b);
|
||||
ui->tabWidget->setTabEnabled(2, b);
|
||||
ui->tabWidget->setTabEnabled(3, b);
|
||||
ui->tabWidget->setTabEnabled(4, b);
|
||||
|
||||
ui->cpapInfo->setHtml(GenerateCPAPHTML());
|
||||
ui->oxiInfo->setHtml(GenerateOxiHTML());
|
||||
|
Loading…
Reference in New Issue
Block a user