bool LanguageSelection::prompt(bool force) { m_languageChanged = false; QString language = gCoreContext->GetSetting("Language", ""); QString country = gCoreContext->GetSetting("Country", ""); // Ask for language if we don't already know. if (force || language.isEmpty() || country.isEmpty()) { MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); if (!mainStack) return false; LanguageSelection *langSettings = new LanguageSelection(mainStack, true); if (langSettings->Create()) { mainStack->AddScreen(langSettings, false); qApp->exec(); mainStack->PopScreen(langSettings, false); } else delete langSettings; } return m_languageChanged; }
void NetTree::switchView() { NetTree *nettree = new NetTree(m_type, GetMythMainWindow()->GetMainStack(), "nettree"); if (nettree->Create()) { gCoreContext->SaveSetting("mythnetvision.ViewMode", m_type); MythScreenStack *screenStack = GetScreenStack(); screenStack->AddScreen(nettree); screenStack->PopScreen(this, false, false); deleteLater(); } else delete nettree; }
BackendSelection::Decision BackendSelection::Prompt( DatabaseParams *dbParams, Configuration *pConfig) { Decision ret = kCancelConfigure; MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); if (!mainStack) return ret; BackendSelection *backendSettings = new BackendSelection(mainStack, dbParams, pConfig, true); if (backendSettings->Create()) { mainStack->AddScreen(backendSettings, false); backendSettings->m_loop->exec(); ret = backendSettings->m_backendDecision; mainStack->PopScreen(backendSettings, false); } else delete backendSettings; return ret; }
bool BackendSelection::prompt(DatabaseParams *dbParams, Configuration *pConfig) { m_backendChanged = false; MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); if (!mainStack) return false; BackendSelection *backendSettings = new BackendSelection(mainStack, dbParams, pConfig, true); if (backendSettings->Create()) { mainStack->AddScreen(backendSettings, false); qApp->exec(); mainStack->PopScreen(backendSettings, false); } else delete backendSettings; return m_backendChanged; }