QString SystemInfo::getOSInfo(QSysInfo::WinVersion ver) const { QString verStr("undefined"); if(strListOS.contains(ver)) verStr = strListOS.find(ver).value(); return verStr; }
BOOL CALLBACK AboutDialog::DlgFunc(HWND pWindow, UINT pMsgId, WPARAM pWParam, LPARAM pLParam) { BOOL lReturnValue = FALSE; switch (pMsgId) { case WM_INITDIALOG: { SetWindowTextW(pWindow, Str::UW(_("About HoverRace"))); // set version string std::string verStr(_("HoverRace version ")); if(Config::GetInstance()->IsPrerelease()) verStr += Config::GetInstance()->GetFullVersion(); else verStr += Config::GetInstance()->GetVersion(); SetDlgItemTextW(pWindow, IDC_VER_TXT, Str::UW(verStr.c_str())); CHARFORMAT fmt; fmt.cbSize = sizeof(CHARFORMAT); fmt.yHeight = 240; // 12pt (units are 1/20 pt) fmt.dwEffects = CFE_BOLD | CFE_UNDERLINE; fmt.dwMask = CFM_BOLD | CFM_UNDERLINE | CFM_SIZE; SendMessage(GetDlgItem(pWindow, IDC_VER_TXT), EM_SETCHARFORMAT, SCF_ALL, (LPARAM) (CHARFORMAT FAR *) &fmt); std::ostringstream oss; oss << _("HoverRace is brought to you by:") << "\r\n" "\r\n" "Richard Langlois (" << _("original author") << ")\r\n" " Grokksoft Inc.\r\n" "\r\n" << _("with contributions from (in alphabetical order)") << ":\r\n" "\r\n" "Austin L. Brock\r\n" "Ryan Curtin\r\n" "Michael Imamura\r\n" "\r\n" << _("and with the help of the many testers willing to put up with bugs and other strange happenings.") << "\r\n" "\r\n" << _("visit us at") << " " << HR_WEBSITE << "\r\n" "\r\n" "HoverRace © Richard Langlois, Grokksoft Inc.\r\n" "\r\n" << _("Thanks also to the following projects") << ":\r\n" "\r\n" "Boost C++ Libraries\r\n" " http://www.boost.org/\r\n" "\r\n" "libcurl - Daniel Stenberg and contributors.\r\n" " http://curl.haxx.se/\r\n" "\r\n" "LibYAML - Kirill Simonov and contributors.\r\n" " http://pyyaml.org/wiki/LibYAML\r\n" "\r\n" "LiteUnzip - Jeff Glatt, based on work by Lucian Wischik, based on work by Jean-Loup Gailly and Mark Adler.\r\n" "\r\n" "Lua -- Copyright (c) 1994-2008 Lua.org, PUC-Rio.\r\n" " http://www.lua.org/\r\n" "\r\n" "Luabind -- Copyright (c) 2003 Daniel Wallin and Arvid Norberg\r\n" " http://www.rasterbar.com/products/luabind.html\r\n" ; SetDlgItemTextW(pWindow, IDC_ABOUT_TXT, Str::UW(oss.str().c_str())); SetDlgItemTextW(pWindow, IDOK, Str::UW(_("Close"))); lReturnValue = TRUE; } break; case WM_COMMAND: switch (LOWORD(pWParam)) { case IDCANCEL: EndDialog(pWindow, IDCANCEL); lReturnValue = TRUE; break; case IDOK: EndDialog(pWindow, IDOK); lReturnValue = TRUE; break; } break; } return lReturnValue; }