- Timestamp:
- Aug 1, 2019 1:15:19 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r80100 r80101 65 65 const QString strName = comMachine.GetName(); 66 66 table << UITextTableLine(QApplication::translate("UIDetails", "Name", "details (general)"), 67 QString("<a href=#%1,%2>%2</a>").arg(strAnchorType, strName)); 67 QString("<a href=#%1,%2>%2</a>") 68 .arg(strAnchorType, 69 strName)); 68 70 } 69 71 … … 75 77 const QString strOsTypeId = comMachine.GetOSTypeId(); 76 78 table << UITextTableLine(QApplication::translate("UIDetails", "Operating System", "details (general)"), 77 QString("<a href=#%1,%2>%3</a>").arg(strAnchorType, 78 strOsTypeId, 79 uiCommon().vmGuestOSTypeDescription(strOsTypeId))); 79 QString("<a href=#%1,%2>%3</a>") 80 .arg(strAnchorType, 81 strOsTypeId, 82 uiCommon().vmGuestOSTypeDescription(strOsTypeId))); 80 83 } 81 84 … … 87 90 const QString strMachineLocation = comMachine.GetSettingsFilePath(); 88 91 table << UITextTableLine(QApplication::translate("UIDetails", "Settings File Location", "details (general)"), 89 QString("<a href=#%1,%2>%3</a>").arg(strAnchorType, 90 strMachineLocation, 91 QDir::toNativeSeparators(QFileInfo(strMachineLocation).absolutePath()))); 92 QString("<a href=#%1,%2>%3</a>") 93 .arg(strAnchorType, 94 strMachineLocation, 95 QDir::toNativeSeparators(QFileInfo(strMachineLocation).absolutePath()))); 92 96 } 93 97 … … 138 142 const int iBaseMemory = comMachine.GetMemorySize(); 139 143 table << UITextTableLine(QApplication::translate("UIDetails", "Base Memory", "details (system)"), 140 QApplication::translate("UIDetails", "<a href=#%1,%2>%2 MB</a>", "details") 141 .arg(strAnchorType).arg(iBaseMemory)); 144 QString("<a href=#%1,%2>%3</a>") 145 .arg(strAnchorType) 146 .arg(iBaseMemory) 147 .arg(QApplication::translate("UIDetails", "%1 MB").arg(iBaseMemory))); 142 148 } 143 149 … … 167 173 const UIBootItemDataList bootItems = loadBootItems(comMachine); 168 174 table << UITextTableLine(QApplication::translate("UIDetails", "Boot Order", "details (system)"), 169 Q Application::translate("UIDetails", "<a href=#%1,%2>%3</a>", "details")170 .arg(strAnchorType,171 bootItemsToSerializedString(bootItems),172 bootItemsToReadableString(bootItems)));175 QString("<a href=#%1,%2>%3</a>") 176 .arg(strAnchorType, 177 bootItemsToSerializedString(bootItems), 178 bootItemsToReadableString(bootItems))); 173 179 } 174 180 … … 261 267 const int iVideoMemory = comMachine.GetVRAMSize(); 262 268 table << UITextTableLine(QApplication::translate("UIDetails", "Video Memory", "details (display)"), 263 QApplication::translate("UIDetails", "<a href=#%1,%2>%2 MB</a>", "details") 264 .arg(strAnchorType).arg(iVideoMemory)); 269 QString("<a href=#%1,%2>%3</a>") 270 .arg(strAnchorType) 271 .arg(iVideoMemory) 272 .arg(QApplication::translate("UIDetails", "%1 MB").arg(iVideoMemory))); 265 273 } 266 274 … … 298 306 const KGraphicsControllerType enmType = comMachine.GetGraphicsControllerType(); 299 307 table << UITextTableLine(QApplication::translate("UIDetails", "Graphics Controller", "details (display)"), 300 Q Application::translate("UIDetails", "<a href=#%1,%2>%3</a>", "details")308 QString("<a href=#%1,%2>%3</a>") 301 309 .arg(strAnchorType) 302 310 .arg((int)enmType) … … 435 443 attachmentsMap.insert(attachmentSlot, 436 444 QString("<a href=#%1,%2,%3,%4>%5</a>") 437 .arg(strAnchorType,438 comController.GetName(),439 gpConverter->toString(attachmentSlot),440 strMediumLocation,441 strDeviceType + strAttachmentInfo));445 .arg(strAnchorType, 446 comController.GetName(), 447 gpConverter->toString(attachmentSlot), 448 strMediumLocation, 449 strDeviceType + strAttachmentInfo)); 442 450 else 443 451 attachmentsMap.insert(attachmentSlot, 444 452 QString("%1") 445 .arg(strDeviceType + strAttachmentInfo));453 .arg(strDeviceType + strAttachmentInfo)); 446 454 } 447 455 } … … 459 467 } 460 468 461 462 469 UITextTable UIDetailsGenerator::generateMachineInformationAudio(CMachine &comMachine, 463 470 const UIExtraDataMetaDefs::DetailsElementOptionTypeAudio &fOptions) … … 483 490 const KAudioDriverType enmType = comAudio.GetAudioDriver(); 484 491 table << UITextTableLine(QApplication::translate("UIDetails", "Host Driver", "details (audio)"), 485 Q Application::translate("UIDetails", "<a href=#%1,%2>%3</a>", "details")492 QString("<a href=#%1,%2>%3</a>") 486 493 .arg(strAnchorType) 487 494 .arg((int)enmType) … … 495 502 const KAudioControllerType enmType = comAudio.GetAudioController(); 496 503 table << UITextTableLine(QApplication::translate("UIDetails", "Controller", "details (audio)"), 497 Q Application::translate("UIDetails", "<a href=#%1,%2>%3</a>", "details")504 QString("<a href=#%1,%2>%3</a>") 498 505 .arg(strAnchorType) 499 506 .arg((int)enmType) … … 800 807 /* Try to convert loaded data to bool: */ 801 808 const bool fEnabled = !( strMenubarEnabled.compare("false", Qt::CaseInsensitive) == 0 802 803 804 809 || strMenubarEnabled.compare("no", Qt::CaseInsensitive) == 0 810 || strMenubarEnabled.compare("off", Qt::CaseInsensitive) == 0 811 || strMenubarEnabled == "0"); 805 812 /* Append information: */ 806 813 table << UITextTableLine(QApplication::translate("UIDetails", "Menu-bar", "details (user interface)"), 807 814 fEnabled ? QApplication::translate("UIDetails", "Enabled", "details (user interface/menu-bar)") 808 : QApplication::translate("UIDetails", "Disabled", "details (user interface/menu-bar)"));815 : QApplication::translate("UIDetails", "Disabled", "details (user interface/menu-bar)")); 809 816 } 810 817 #endif /* !VBOX_WS_MAC */ … … 816 823 /* Try to convert loaded data to bool: */ 817 824 const bool fEnabled = !( strStatusbarEnabled.compare("false", Qt::CaseInsensitive) == 0 818 819 820 825 || strStatusbarEnabled.compare("no", Qt::CaseInsensitive) == 0 826 || strStatusbarEnabled.compare("off", Qt::CaseInsensitive) == 0 827 || strStatusbarEnabled == "0"); 821 828 /* Append information: */ 822 829 table << UITextTableLine(QApplication::translate("UIDetails", "Status-bar", "details (user interface)"), 823 830 fEnabled ? QApplication::translate("UIDetails", "Enabled", "details (user interface/status-bar)") 824 : QApplication::translate("UIDetails", "Disabled", "details (user interface/status-bar)"));831 : QApplication::translate("UIDetails", "Disabled", "details (user interface/status-bar)")); 825 832 } 826 833 … … 832 839 /* Try to convert loaded data to bool: */ 833 840 const bool fEnabled = !( strMiniToolbarEnabled.compare("false", Qt::CaseInsensitive) == 0 834 835 836 841 || strMiniToolbarEnabled.compare("no", Qt::CaseInsensitive) == 0 842 || strMiniToolbarEnabled.compare("off", Qt::CaseInsensitive) == 0 843 || strMiniToolbarEnabled == "0"); 837 844 /* Append information: */ 838 845 if (fEnabled)
Note:
See TracChangeset
for help on using the changeset viewer.