void WizardWelcome::hideLanguageSettings() { qDebug() << Q_FUNC_INFO; Screen::getInstance()->queueUpdates(); m_WizardLanguage->hide(); if(!m_WizardDateTime) m_WizardDateTime = new WizardDateTime(this); connect(m_WizardDateTime, SIGNAL(hideMe()), this, SLOT(hideWizardDateTime())); showElement(m_WizardDateTime); Screen::getInstance()->setMode(Screen::MODE_SAFE, true, FLAG_FULLSCREEN_UPDATE, Q_FUNC_INFO); Screen::getInstance()->setUpdateScheme(Screen::SCHEME_MERGE, true); Screen::getInstance()->flushUpdates(); }
WizardWelcome::WizardWelcome(QWidget* parent) : QBookForm(parent) , current_widget(0) , m_WizardLanguage(0) , m_WizardDateTime(0) , m_elfFinishWizard(0) { qDebug() << Q_FUNC_INFO; setupUi(this); connect(nextStepBtn, SIGNAL(clicked()), this, SLOT(requestConnection())); connect(skipBtn, SIGNAL(clicked()), this, SLOT(skipWizard())); nextStepBtn->setFocus(); if(QBook::settings().value("setting/initial_lang_selection",true).toBool()) { if(!m_WizardLanguage) m_WizardLanguage = new WizardLanguage(this); connect(m_WizardLanguage, SIGNAL(languageSelected()), this, SLOT(hideLanguageSettings())); showElement(m_WizardLanguage); } if(QBookApp::instance()->isActivated()) { intro3Lbl->hide(); welcomeTitleLbl->setText(tr("Enlazar dispositivo")); }else intro3Lbl->show(); // Check if: 1. language selection is needed, 2. initial power on for user is set and 3. Device has not been manually deactivated because of OTA if(!QBook::settings().value("setting/initial_lang_selection", true).toBool()&& QBook::settings().value("setting/initial",true).toBool() && !QBook::settings().value("setting/activated").isValid()) { if(!m_WizardDateTime) m_WizardDateTime = new WizardDateTime(this); connect(m_WizardDateTime, SIGNAL(hideMe()), this, SLOT(hideWizardDateTime())); showElement(m_WizardDateTime); } QFile fileSpecific(":/res/wizard_styles.qss"); QFile fileCommons(":/res/wizard_styles_generic.qss"); fileSpecific.open(QFile::ReadOnly); fileCommons.open(QFile::ReadOnly); QString styles = QLatin1String(fileSpecific.readAll() + fileCommons.readAll()); setStyleSheet(styles); }