Changeset 28731 in vbox
- Timestamp:
- Apr 26, 2010 8:11:58 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
r27961 r28731 4685 4685 /* HDTV == 1920x1080 ~ 2M 4686 4686 * for the 4:2:2 formats each pixel is 2Bytes 4687 * so each frame may be 4M B4688 * so for triple-buffering we would need 12 M B */4687 * so each frame may be 4MiB 4688 * so for triple-buffering we would need 12 MiB */ 4689 4689 return _1M * 12; 4690 4690 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r28593 r28731 1978 1978 1979 1979 QString item = QString (sSectionItemTpl2).arg (tr ("Base Memory", "details report"), 1980 tr ("<nobr>%1 M B</nobr>", "details report"))1980 tr ("<nobr>%1 MiB</nobr>", "details report")) 1981 1981 .arg (aMachine.GetMemorySize()) 1982 1982 + QString (sSectionItemTpl2).arg (tr ("Processor(s)", "details report"), … … 2011 2011 QString item = QString(sSectionItemTpl2) 2012 2012 .arg(tr ("Video Memory", "details report"), 2013 tr ("<nobr>%1 M B</nobr>", "details report"))2013 tr ("<nobr>%1 MiB</nobr>", "details report")) 2014 2014 .arg(aMachine.GetVRAMSize()); 2015 2015 ++rows; … … 3832 3832 /** 3833 3833 * Returns the regexp string that defines the format of the human-readable 3834 * size representation, <tt>####[.##] B| KB|MB|GB|TB|PB</tt>.3834 * size representation, <tt>####[.##] B|kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB</tt>. 3835 3835 * 3836 3836 * This regexp will capture 5 groups of text: … … 3847 3847 { 3848 3848 QString regexp = 3849 QString ("^(?:(?:(\\d+)(?:\\s?([KMGTP]?B))?)|(?:(\\d*)%1(\\d{1,2})(?:\\s?([KMGTP]B))))$")3850 3849 tr ("^(?:(?:(\\d+)(?:\\s?(B|kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB))?)|(?:(\\d*)%1(\\d{1,2})(?:\\s?(kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB))))$", "regexp for matching ####[.##] B|kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB, %1=decimal point") 3850 .arg (decimalSep()); 3851 3851 return regexp; 3852 3852 } … … 3854 3854 /** 3855 3855 * Parses the given size string that should be in form of 3856 * <tt>####[.##] B| KB|MB|GB|TB|PB</tt> and returns the size value3857 * in bytes. Zero is returned on error.3856 * <tt>####[.##] B|kB|KB|KiB|MB|MiB|GB|GiB|TB|TiB|PB|PiB</tt> and returns 3857 * the size value in bytes. Zero is returned on error. 3858 3858 */ 3859 3859 /* static */ … … 3875 3875 3876 3876 quint64 denom = 0; 3877 if (suff.isEmpty() || suff == "B")3877 if (suff.isEmpty() || suff == tr ("B", "size suffix Bytes")) 3878 3878 denom = 1; 3879 else if (suff == "KB") 3879 else if (suff == tr ("kB", "size suffix kBytes=1000 Bytes")) 3880 denom = 1000; 3881 else if ( suff == tr ("KiB", "size suffix KiBytes") 3882 || suff == tr ("KB", "size suffix legacy KB=KiBytes")) 3880 3883 denom = _1K; 3881 else if (suff == "MB") 3884 else if (suff == tr ("MB", "size suffix MBytes=1000 kBytes")) 3885 denom = 1000000; 3886 else if (suff == tr ("MiB", "size suffix MiBytes")) 3882 3887 denom = _1M; 3883 else if (suff == "GB") 3888 else if (suff == tr ("GB", "size suffix GBytes=1000 MBytes")) 3889 denom = 1000000000; 3890 else if (suff == tr ("GiB", "size suffix GiBytes")) 3884 3891 denom = _1G; 3885 else if (suff == "TB") 3892 else if (suff == tr ("TB", "size suffix TBytes=1000 GBytes")) 3893 denom = 1000000000000ULL; 3894 else if (suff == tr ("TiB", "size suffix TiBytes")) 3886 3895 denom = _1T; 3887 else if (suff == "PB") 3896 else if (suff == tr ("PB", "size suffix PBytes=1000 TBytes")) 3897 denom = 1000000000000000ULL; 3898 else if (suff == tr ("PiB", "size suffix PiBytes")) 3888 3899 denom = _1P; 3889 3900 … … 3903 3914 /** 3904 3915 * Formats the given @a aSize value in bytes to a human readable string 3905 * in form of <tt>####[.##] B|K B|MB|GB|TB|PB</tt>.3916 * in form of <tt>####[.##] B|KiB|MiB|GiB|TiB|PiB</tt>. 3906 3917 * 3907 3918 * The @a aMode and @a aDecimal parameters are used for rounding the resulting 3908 * number when converting the size value to K B, MB, etc gives a fractional part:3919 * number when converting the size value to KiB, MiB, etc gives a fractional part: 3909 3920 * <ul> 3910 3921 * <li>When \a aMode is FormatSize_Round, the result is rounded to the … … 3934 3945 VBoxDefs::FormatSize aMode /* = FormatSize_Round */) 3935 3946 { 3936 static const char *Suffixes [] = { "B", "KB", "MB", "GB", "TB", "PB", NULL }; 3947 static QString Suffixes [7]; 3948 Suffixes[0] = tr ("B", "size suffix Bytes"); 3949 Suffixes[1] = tr ("KiB", "size suffix KiBytes"); 3950 Suffixes[2] = tr ("MiB", "size suffix MiBytes"); 3951 Suffixes[3] = tr ("GiB", "size suffix GiBytes"); 3952 Suffixes[4] = tr ("TiB", "size suffix TiBytes"); 3953 Suffixes[5] = tr ("PiB", "size suffix PiBytes"); 3954 Suffixes[6] = (const char *)NULL; 3955 AssertCompile(6 < RT_ELEMENTS (Suffixes)); 3937 3956 3938 3957 quint64 denom = 0; … … 3995 4014 decm = 0; 3996 4015 ++ intg; 3997 /* check if we've got 1024 X B after rounding and scale down if so */4016 /* check if we've got 1024 XiB after rounding and scale down if so */ 3998 4017 if (intg == 1024 && Suffixes [suffix + 1] != NULL) 3999 4018 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r28268 r28731 156 156 { 157 157 quint64 availBits = machine.GetVRAMSize() /* VRAM */ 158 * _1M /* M B to bytes */158 * _1M /* MiB to bytes */ 159 159 * 8; /* to bits */ 160 160 quint64 usedBits = memoryRequirements(pTmpMap); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r28493 r28731 84 84 { 85 85 quint64 availBits = machine.GetVRAMSize() /* VRAM */ 86 * _1M /* M B to bytes */86 * _1M /* MiB to bytes */ 87 87 * 8; /* to bits */ 88 88 quint64 usedBits = m_pScreenLayout->memoryRequirements(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r28493 r28731 82 82 { 83 83 quint64 availBits = machine.GetVRAMSize() /* VRAM */ 84 * _1M /* M B to bytes */84 * _1M /* MiB to bytes */ 85 85 * 8; /* to bits */ 86 86 quint64 usedBits = m_pScreenLayout->memoryRequirements(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.cpp
r28279 r28731 267 267 268 268 CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties(); 269 mLbMemoryMin->setText (tr ("<qt>%1 M B</qt>").arg (m_minVRAM));270 mLbMemoryMax->setText (tr ("<qt>%1 M B</qt>").arg (m_maxVRAMVisible));269 mLbMemoryMin->setText (tr ("<qt>%1 MiB</qt>").arg (m_minVRAM)); 270 mLbMemoryMax->setText (tr ("<qt>%1 MiB</qt>").arg (m_maxVRAMVisible)); 271 271 mLbMonitorsMin->setText (tr ("<qt>%1</qt>").arg (1)); 272 272 mLbMonitorsMax->setText (tr ("<qt>%1</qt>").arg (sys.GetMaxGuestMonitors())); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.h
r28178 r28731 67 67 QIWidgetValidator *mValidator; 68 68 69 /* System minimum lower limit of VRAM (M B). */69 /* System minimum lower limit of VRAM (MiB). */ 70 70 int m_minVRAM; 71 /* System maximum limit of VRAM (M B). */71 /* System maximum limit of VRAM (MiB). */ 72 72 int m_maxVRAM; 73 /* Upper limit of VRAM in M B for this dialog. This value is lower than73 /* Upper limit of VRAM in MiB for this dialog. This value is lower than 74 74 * m_maxVRAM to save careless users from setting useless big values. */ 75 75 int m_maxVRAMVisible; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.ui
r27407 r28731 145 145 </property> 146 146 <property name="text"> 147 <string>M B</string>147 <string>MiB</string> 148 148 </property> 149 149 </widget> -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsSystem.cpp
r27591 r28731 7 7 8 8 /* 9 * Copyright (C) 2008-20 09Sun Microsystems, Inc.9 * Copyright (C) 2008-2010 Sun Microsystems, Inc. 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 381 381 382 382 /* Retranslate the memory slider legend */ 383 mLbMemoryMin->setText (tr ("<qt>%1 M B</qt>").arg (mSlMemory->minRAM()));384 mLbMemoryMax->setText (tr ("<qt>%1 M B</qt>").arg (mSlMemory->maxRAM()));383 mLbMemoryMin->setText (tr ("<qt>%1 MiB</qt>").arg (mSlMemory->minRAM())); 384 mLbMemoryMax->setText (tr ("<qt>%1 MiB</qt>").arg (mSlMemory->maxRAM())); 385 385 386 386 /* Retranslate the cpu slider legend */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsSystem.ui
r27591 r28731 145 145 </property> 146 146 <property name="text"> 147 <string>M B</string>147 <string>MiB</string> 148 148 </property> 149 149 </widget> -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.cpp
r26715 r28731 7 7 8 8 /* 9 * Copyright (C) 2009 Sun Microsystems, Inc.9 * Copyright (C) 2009-2010 Sun Microsystems, Inc. 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 220 220 } 221 221 case KVirtualSystemDescriptionType_OS: v = vboxGlobal().vmGuestOSTypeDescription (mConfigValue); break; 222 case KVirtualSystemDescriptionType_Memory: v = mConfigValue + " " + VBoxApplianceEditorWgt::tr ("M B"); break;222 case KVirtualSystemDescriptionType_Memory: v = mConfigValue + " " + VBoxApplianceEditorWgt::tr ("MiB", "size suffix MiBytes"); break; 223 223 case KVirtualSystemDescriptionType_SoundCard: v = vboxGlobal().toString (static_cast<KAudioControllerType> (mConfigValue.toInt())); break; 224 224 case KVirtualSystemDescriptionType_NetworkAdapter: v = vboxGlobal().toString (static_cast<KNetworkAdapterType> (mConfigValue.toInt())); break; … … 399 399 QSpinBox *e = new QSpinBox (aParent); 400 400 e->setRange (VBoxApplianceEditorWgt::minGuestRAM(), VBoxApplianceEditorWgt::maxGuestRAM()); 401 e->setSuffix (" " + VBoxApplianceEditorWgt::tr ("M B"));401 e->setSuffix (" " + VBoxApplianceEditorWgt::tr ("MiB", "size suffix MiBytes")); 402 402 editor = e; 403 403 break;
Note:
See TracChangeset
for help on using the changeset viewer.