Changeset 52980 in vbox
- Timestamp:
- Oct 8, 2014 7:34:42 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 96432
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp
r52978 r52980 569 569 CConsole console = m_session.GetConsole(); 570 570 571 /* Determine resolution: */ 572 ULONG uWidth = 0; 573 ULONG uHeight = 0; 574 ULONG uBpp = 0; 575 LONG xOrigin = 0; 576 LONG yOrigin = 0; 577 KGuestMonitorStatus monitorStatus = KGuestMonitorStatus_Enabled; 578 console.GetDisplay().GetScreenResolution(0, uWidth, uHeight, uBpp, xOrigin, yOrigin, monitorStatus); 579 QString strResolution = QString("%1x%2").arg(uWidth).arg(uHeight); 580 if (uBpp) 581 strResolution += QString("x%1").arg(uBpp); 582 strResolution += QString(" @%1,%2").arg(xOrigin).arg(yOrigin); 571 ULONG cGuestScreens = m.GetMonitorCount(); 572 QVector<QString> aResolutions(cGuestScreens); 573 for (ULONG iScreen = 0; iScreen < cGuestScreens; ++iScreen) 574 { 575 /* Determine resolution: */ 576 ULONG uWidth = 0; 577 ULONG uHeight = 0; 578 ULONG uBpp = 0; 579 LONG xOrigin = 0; 580 LONG yOrigin = 0; 581 KGuestMonitorStatus monitorStatus = KGuestMonitorStatus_Enabled; 582 console.GetDisplay().GetScreenResolution(iScreen, uWidth, uHeight, uBpp, xOrigin, yOrigin, monitorStatus); 583 QString strResolution = QString("%1x%2").arg(uWidth).arg(uHeight); 584 if (uBpp) 585 strResolution += QString("x%1").arg(uBpp); 586 strResolution += QString(" @%1,%2").arg(xOrigin).arg(yOrigin); 587 if (monitorStatus == KGuestMonitorStatus_Disabled) 588 { 589 strResolution += QString(" "); 590 strResolution += QString(VBoxGlobal::tr("off", "guest monitor status")); 591 } 592 aResolutions[iScreen] = strResolution; 593 } 583 594 584 595 /* Calculate uptime: */ … … 638 649 /* Searching for longest string: */ 639 650 QStringList values; 640 values << strResolution << strUptime 651 for (ULONG iScreen = 0; iScreen < cGuestScreens; ++iScreen) 652 values << aResolutions[iScreen]; 653 values << strUptime 641 654 << strVirtualization << strNestedPaging << strUnrestrictedExecution 642 655 << strGAVersion << strOSType << strVRDEInfo; … … 648 661 /* Summary: */ 649 662 strResult += strHeader.arg(":/state_running_16px.png").arg(tr("Runtime Attributes")); 650 strResult += formatValue(tr("Screen Resolution"), strResolution, iMaxLength); 663 for (ULONG iScreen = 0; iScreen < cGuestScreens; ++iScreen) 664 { 665 QString strLabel(tr("Screen Resolution")); 666 strLabel += QString(" %1").arg(iScreen + 1); 667 strResult += formatValue(strLabel, aResolutions[iScreen], iMaxLength); 668 } 651 669 strResult += formatValue(tr("VM Uptime"), strUptime, iMaxLength); 652 670 strResult += formatValue(tr("Clipboard Mode"), strClipboardMode, iMaxLength);
Note:
See TracChangeset
for help on using the changeset viewer.