- Timestamp:
- May 21, 2008 8:30:39 AM (17 years ago)
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r8917 r8997 1561 1561 1562 1562 if (dbgStatisticsAction) 1563 dbgStatisticsAction->setMenuText (tr ("&Statistics..." ));1563 dbgStatisticsAction->setMenuText (tr ("&Statistics...", "debug action")); 1564 1564 if (dbgCommandLineAction) 1565 dbgCommandLineAction->setMenuText (tr ("&Command line..."));1565 dbgCommandLineAction->setMenuText (tr ("&Command Line...", "debug action")); 1566 1566 if (dbgLoggingAction) 1567 dbgLoggingAction->setMenuText (tr ("&Logging..." ));1567 dbgLoggingAction->setMenuText (tr ("&Logging...", "debug action")); 1568 1568 #endif 1569 1569 -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMInformationDlg.ui.h
r8918 r8997 706 706 } 707 707 708 709 /* Old code for two columns support */710 #if 0711 void VBoxVMInformationDlg::refreshStatistics()712 {713 QString table = "<p><table border=0 cellspacing=0 cellpadding=0 width=100%>%1</table></p>";714 QString hdrRow = "<tr><td align=left><img src='%1'></td><td colspan=4><b>%2</b></td></tr>";715 QString subRow = "<tr><td></td><td colspan=2><nobr><u>%1</u></nobr></td>"716 "<td colspan=2><nobr><u>%2</u></nobr></td></tr>";717 QString bdyRow = "<tr><td></td><td><nobr>%1</nobr></td><td width=50%><nobr>%2</nobr></td>"718 "<td><nobr>%3</nobr></td><td width=50%><nobr>%4</nobr></td></tr>";719 QString paragraph = "<tr><td colspan=5></td></tr>";720 QString interline = "<tr><td colspan=5><font size=1> </font></td></tr>";721 QString result;722 723 /* Screen & VT-X Runtime Parameters */724 if (!mSession.isNull())725 {726 CConsole console = mSession.GetConsole();727 ULONG bpp = console.GetDisplay().GetBitsPerPixel();728 QString resolution = QString ("%1x%2")729 .arg (console.GetDisplay().GetWidth())730 .arg (console.GetDisplay().GetHeight());731 if (bpp)732 resolution += QString ("x%1").arg (bpp);733 QString virt = console.GetDebugger().GetHWVirtExEnabled() ?734 tr ("Enabled") : tr ("Disabled");735 736 result += hdrRow.arg ("state_running_16px.png").arg (tr ("Runtime Attributes"));737 result += bdyRow.arg (tr ("Screen Resolution")) .arg (resolution)738 .arg (tr ("Hardware Virtualization")).arg (virt);739 result += paragraph;740 }741 742 /* Hard Disk Statistics. */743 result += hdrRow.arg ("hd_16px.png").arg (tr ("Hard Disks Statistics"));744 745 result += subRow.arg (tr ("Primary Master")).arg (tr ("Primary Slave"));746 result += composeArticle (QString::null, 0, 1, 4, 5);747 result += composeArticle ("B", 2, 3, 6, 7);748 result += interline;749 750 result += subRow.arg (tr ("Secondary Master")).arg (tr ("Secondary Slave"));751 result += composeArticle (QString::null, 8, 9, 12, 13);752 result += composeArticle ("B", 10, 11, 14, 15);753 result += paragraph;754 755 /* Network Adapters Statistics. Counters are currently missed. */756 result += hdrRow.arg ("nw_16px.png").arg (tr ("Network Adapter Statistics"));757 result += subRow.arg (tr ("Adapter 1")).arg (tr ("Adapter 2"));758 result += composeArticle ("B", 16, 17, 18, 19);759 760 /* Show full composed page. */761 mStatisticText->setText (table.arg (result));762 }763 764 765 QString VBoxVMInformationDlg::composeArticle (const QString &aUnits,766 int aStart1, int aFinish1,767 int aStart2, int aFinish2)768 {769 QString bdyRow = "<tr><td></td><td><nobr>%1</nobr></td><td width=50%><nobr>%2</nobr></td>"770 "<td><nobr>%3</nobr></td><td width=50%><nobr>%4</nobr></td></tr>";771 772 QString result;773 774 int id1 = aStart1, id2 = aStart2;775 while (id1 <= aFinish1 || id2 <= aFinish2)776 {777 QString line = bdyRow;778 /* Processing first column */779 if (id1 > aFinish1)780 {781 line = line.arg (QString::null).arg (QString::null)782 .arg (QString::null).arg (QString::null);783 }784 else if (mValuesMap.contains (mNamesMap.keys() [id1]))785 {786 line = line.arg (mNamesMap.values() [id1]);787 ULONG64 value = mValuesMap.values() [id1].toULongLong();788 line = aUnits.isNull() ?789 line.arg (QString ("%L1").arg (value)) :790 line.arg (QString ("%L1 %2").arg (value).arg (aUnits));791 }792 /* Processing second column */793 if (id2 > aFinish2)794 {795 line = line.arg (QString::null).arg (QString::null)796 .arg (QString::null).arg (QString::null);797 }798 else if (mValuesMap.contains (mNamesMap.keys() [id2]))799 {800 line = line.arg (mNamesMap.values() [id2]);801 ULONG64 value = mValuesMap.values() [id2].toULongLong();802 line = aUnits.isNull() ?803 line.arg (QString ("%L1").arg (value)) :804 line.arg (QString ("%L1 %2").arg (value).arg (aUnits));805 }806 result += line;807 ++ id1; ++ id2;808 }809 810 return result;811 }812 #endif813 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r8947 r8997 1469 1469 break; 1470 1470 } 1471 default: 1471 default: 1472 1472 break; 1473 1473 } … … 1583 1583 1584 1584 if (dbgStatisticsAction) 1585 dbgStatisticsAction->setText (tr ("&Statistics..." ));1585 dbgStatisticsAction->setText (tr ("&Statistics...", "debug action")); 1586 1586 if (dbgCommandLineAction) 1587 dbgCommandLineAction->setText (tr ("&Command line..."));1587 dbgCommandLineAction->setText (tr ("&Command Line...", "debug action")); 1588 1588 #endif 1589 1589 … … 1617 1617 /* main menu & seamless popup menu */ 1618 1618 1619 mVMMenu->setTitle (tr ("&Machine")); 1619 mVMMenu->setTitle (tr ("&Machine")); 1620 1620 // mVMMenu->setIcon (VBoxGlobal::iconSet (":/machine_16px.png")); 1621 1621 … … 2238 2238 WindowRef windowRef = ::darwinToWindowRef (this); 2239 2239 Assert (VALID_PTR (windowRef)); 2240 /* See above. 2240 /* See above. 2241 2241 status = RemoveEventHandler (mDarwinRegionEventHandlerRef); 2242 2242 AssertCarbonOSStatus (status); … … 3325 3325 console->setAutoresizeGuest ( mIsGraphicsSupported 3326 3326 && vmAutoresizeGuestAction->isChecked()); 3327 vmAutoresizeGuestAction->setEnabled (mIsGraphicsSupported); 3327 vmAutoresizeGuestAction->setEnabled (mIsGraphicsSupported); 3328 3328 } 3329 3329
Note:
See TracChangeset
for help on using the changeset viewer.