本文整理汇总了C++中ThemeInfo::IsWide方法的典型用法代码示例。如果您正苦于以下问题:C++ ThemeInfo::IsWide方法的具体用法?C++ ThemeInfo::IsWide怎么用?C++ ThemeInfo::IsWide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ThemeInfo
的用法示例。
在下文中一共展示了ThemeInfo::IsWide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadQtConfig
void MythUIHelper::LoadQtConfig(void)
{
gCoreContext->ResetLanguage();
d->themecachedir.clear();
if (GetMythDB()->GetNumSetting("UseVideoModes", 0))
{
DisplayRes *dispRes = DisplayRes::GetDisplayRes(); // create singleton
if (dispRes)
{
d->display_res = dispRes;
// Make sure DisplayRes has current context info
d->display_res->Initialize();
// Switch to desired GUI resolution
if (d->display_res->SwitchToGUI())
{
d->WaitForScreenChange();
}
}
}
// Note the possibly changed screen settings
d->GetScreenBounds();
delete d->m_qtThemeSettings;
d->m_qtThemeSettings = new Settings;
qApp->setStyle("Windows");
QString themename = GetMythDB()->GetSetting("Theme", DEFAULT_UI_THEME);
QString themedir = FindThemeDir(themename);
ThemeInfo *themeinfo = new ThemeInfo(themedir);
if (themeinfo)
{
d->m_isWide = themeinfo->IsWide();
d->m_baseWidth = themeinfo->GetBaseRes()->width();
d->m_baseHeight = themeinfo->GetBaseRes()->height();
d->m_themename = themeinfo->GetName();
LOG(VB_GUI, LOG_INFO, LOC +
QString("Using theme base resolution of %1x%2")
.arg(d->m_baseWidth).arg(d->m_baseHeight));
delete themeinfo;
}
// Recalculate GUI dimensions
d->StoreGUIsettings();
d->m_themepathname = themedir + '/';
themedir += "/qtlook.txt";
d->m_qtThemeSettings->ReadSettings(themedir);
d->m_themeloaded = false;
themename = GetMythDB()->GetSetting("MenuTheme", "defaultmenu");
if (themename == "default")
themename = "defaultmenu";
d->m_menuthemepathname = FindMenuThemeDir(themename) + '/';
}