VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp@ 103131

Last change on this file since 103131 was 103085, checked in by vboxsync, 12 months ago

Main,FE/VBoxManage,FE/VirtualBox,ValidationKit: Allow setting the primary VM execution engine to make it easier to force particular engine for testing, bugref:10583

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
  • Property svn:mergeinfo set to (toggle deleted branches)
    /branches/VBox-3.0/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp58652,​70973
    /branches/VBox-3.2/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp66309,​66318
    /branches/VBox-4.0/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp70873
    /branches/VBox-4.1/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp74233
    /branches/VBox-4.2/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp91503-91504,​91506-91508,​91510,​91514-91515,​91521
    /branches/VBox-4.3/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp91223
    /branches/VBox-4.3/trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp91223
    /branches/dsen/gui/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp79076-79078,​79089,​79109-79110,​79112-79113,​79127-79130,​79134,​79141,​79151,​79155,​79157-79159,​79193,​79197
    /branches/dsen/gui2/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp79562-79569,​79572-79573,​79578,​79581-79582,​79590-79591,​79598-79599,​79602-79603,​79605-79606,​79632,​79635,​79637,​79644
    /branches/dsen/gui3/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp79645-79692
    /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp79225,​79271
File size: 72.5 KB
Line 
1/* $Id: UIDetailsGenerator.cpp 103085 2024-01-26 16:17:43Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIDetailsGenerator implementation.
4 */
5
6/*
7 * Copyright (C) 2012-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28/* Qt includes: */
29#include <QApplication>
30#include <QDir>
31#include <QRegularExpression>
32
33/* GUI includes: */
34#include "UIBootOrderEditor.h"
35#include "UICommon.h"
36#include "UIConverter.h"
37#include "UIDetailsGenerator.h"
38#include "UIErrorString.h"
39#include "UIGuestOSType.h"
40#include "UIMedium.h"
41#include "UITranslator.h"
42
43/* COM includes: */
44#include "COMEnums.h"
45#include "CAudioAdapter.h"
46#include "CAudioSettings.h"
47#include "CBooleanFormValue.h"
48#include "CChoiceFormValue.h"
49#include "CCloudMachine.h"
50#include "CConsole.h"
51#include "CFirmwareSettings.h"
52#include "CForm.h"
53#include "CFormValue.h"
54#include "CGraphicsAdapter.h"
55#include "CGuest.h"
56#include "CMachine.h"
57#include "CMediumAttachment.h"
58#include "CNetworkAdapter.h"
59#include "CNvramStore.h"
60#include "CPlatform.h"
61#include "CPlatformX86.h"
62#include "CPlatformProperties.h"
63#include "CProgress.h"
64#include "CRangedIntegerFormValue.h"
65#include "CRangedInteger64FormValue.h"
66#include "CRecordingScreenSettings.h"
67#include "CRecordingSettings.h"
68#include "CSerialPort.h"
69#include "CSharedFolder.h"
70#include "CStorageController.h"
71#include "CStringFormValue.h"
72#include "CTrustedPlatformModule.h"
73#include "CUefiVariableStore.h"
74#include "CUSBController.h"
75#include "CUSBDevice.h"
76#include "CUSBDeviceFilter.h"
77#include "CUSBDeviceFilters.h"
78#include "CVRDEServer.h"
79
80/* VirtualBox interface declarations: */
81#include <iprt/time.h>
82#include <VBox/com/VirtualBox.h>
83
84
85const QString UIDetailsGenerator::e_strTableRow1 = QString("<tr><td colspan='2'><nobr><b>%1</b></nobr></td></tr>");
86const QString UIDetailsGenerator::e_strTableRow2 = QString("<tr><td><nobr>%1:</nobr></td><td><nobr>%2</nobr></td></tr>");
87const QString UIDetailsGenerator::e_strTableRow3 = QString("<tr><td><nobr>&nbsp;%1:</nobr></td><td><nobr>%2</nobr></td></tr>");
88
89
90UITextTable UIDetailsGenerator::generateMachineInformationGeneral(CMachine &comMachine,
91 const UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral &fOptions)
92{
93 UITextTable table;
94
95 if (comMachine.isNull())
96 return table;
97
98 if (!comMachine.GetAccessible())
99 {
100 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
101 return table;
102 }
103
104 /* Name: */
105 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral_Name)
106 {
107 /* Configure hovering anchor: */
108 const QString strAnchorType = QString("machine_name");
109 const QString strName = comMachine.GetName();
110 table << UITextTableLine(QApplication::translate("UIDetails", "Name", "details (general)"),
111 QString("<a href=#%1,%2>%2</a>")
112 .arg(strAnchorType,
113 strName));
114 }
115
116 /* Operating system: */
117 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral_OS)
118 {
119 /* Configure hovering anchor: */
120 const QString strAnchorType = QString("os_type");
121 const QString strOsTypeId = comMachine.GetOSTypeId();
122 table << UITextTableLine(QApplication::translate("UIDetails", "Operating System", "details (general)"),
123 QString("<a href=#%1,%2>%3</a>")
124 .arg(strAnchorType,
125 strOsTypeId,
126 uiCommon().guestOSTypeManager().getDescription(strOsTypeId)));
127 }
128
129 /* Settings file location: */
130 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral_Location)
131 {
132 /* Configure hovering anchor: */
133 const QString strAnchorType = QString("machine_location");
134 const QString strMachineLocation = comMachine.GetSettingsFilePath();
135 table << UITextTableLine(QApplication::translate("UIDetails", "Settings File Location", "details (general)"),
136 QString("<a href=#%1,%2>%3</a>")
137 .arg(strAnchorType,
138 strMachineLocation,
139 QDir::toNativeSeparators(QFileInfo(strMachineLocation).absolutePath())));
140 }
141
142 /* Groups: */
143 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral_Groups)
144 {
145 QStringList groups = comMachine.GetGroups().toList();
146 /* Do not show groups for machine which is in root group only: */
147 if (groups.size() == 1)
148 groups.removeAll("/");
149 /* If group list still not empty: */
150 if (!groups.isEmpty())
151 {
152 /* For every group: */
153 for (int i = 0; i < groups.size(); ++i)
154 {
155 /* Trim first '/' symbol: */
156 QString &strGroup = groups[i];
157 if (strGroup.startsWith("/") && strGroup != "/")
158 strGroup.remove(0, 1);
159 }
160 table << UITextTableLine(QApplication::translate("UIDetails", "Groups", "details (general)"), groups.join(", "));
161 }
162 }
163
164 return table;
165}
166
167UITextTable UIDetailsGenerator::generateMachineInformationGeneral(CCloudMachine &comCloudMachine,
168 const UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral &)
169{
170 UITextTable table;
171
172 if (comCloudMachine.isNull())
173 return table;
174
175 if (!comCloudMachine.GetAccessible())
176 {
177 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
178 return table;
179 }
180
181 /* Acquire details form: */
182 CForm comForm = comCloudMachine.GetDetailsForm();
183 /* Ignore cloud machine errors: */
184 if (comCloudMachine.isOk())
185 {
186 /* Common anchor for all fields: */
187 const QString strAnchorType = "cloud";
188
189 /* For each form value: */
190 const QVector<CFormValue> values = comForm.GetValues();
191 foreach (const CFormValue &comIteratedValue, values)
192 {
193 /* Ignore invisible values: */
194 if (!comIteratedValue.GetVisible())
195 continue;
196
197 /* Acquire label: */
198 const QString strLabel = comIteratedValue.GetLabel();
199 /* Generate value: */
200 const QString strValue = generateFormValueInformation(comIteratedValue);
201
202 /* Generate table string: */
203 table << UITextTableLine(strLabel, QString("<a href=#%1,%2>%3</a>").arg(strAnchorType, strLabel, strValue));
204 }
205 }
206
207 return table;
208}
209
210QString UIDetailsGenerator::generateFormValueInformation(const CFormValue &comFormValue, bool fFull /* = false */)
211{
212 /* Handle possible form value types: */
213 QString strResult;
214 switch (comFormValue.GetType())
215 {
216 case KFormValueType_Boolean:
217 {
218 CBooleanFormValue comValue(comFormValue);
219 const bool fBool = comValue.GetSelected();
220 strResult = fBool ? QApplication::translate("UIDetails", "Enabled", "details (cloud value)")
221 : QApplication::translate("UIDetails", "Disabled", "details (cloud value)");
222 break;
223 }
224 case KFormValueType_String:
225 {
226 CStringFormValue comValue(comFormValue);
227 const QString strValue = comValue.GetString();
228 const QString strClipboardValue = comValue.GetClipboardString();
229 strResult = fFull && !strClipboardValue.isEmpty() ? strClipboardValue : strValue;
230 break;
231 }
232 case KFormValueType_Choice:
233 {
234 AssertMsgFailed(("Aren't we decided to convert all choices to strings?\n"));
235 CChoiceFormValue comValue(comFormValue);
236 const QVector<QString> possibleValues = comValue.GetValues();
237 const int iCurrentIndex = comValue.GetSelectedIndex();
238 strResult = possibleValues.value(iCurrentIndex);
239 break;
240 }
241 case KFormValueType_RangedInteger:
242 {
243 CRangedIntegerFormValue comValue(comFormValue);
244 strResult = QString("%1 %2")
245 .arg(comValue.GetInteger())
246 .arg(QApplication::translate("UICommon", comValue.GetSuffix().toUtf8().constData()));
247 break;
248 }
249 case KFormValueType_RangedInteger64:
250 {
251 CRangedInteger64FormValue comValue(comFormValue);
252 strResult = QString("%1 %2")
253 .arg(comValue.GetInteger())
254 .arg(QApplication::translate("UICommon", comValue.GetSuffix().toUtf8().constData()));
255 break;
256 }
257 default:
258 break;
259 }
260 /* Return result: */
261 return strResult;
262}
263
264UITextTable UIDetailsGenerator::generateMachineInformationSystem(CMachine &comMachine,
265 const UIExtraDataMetaDefs::DetailsElementOptionTypeSystem &fOptions)
266{
267 UITextTable table;
268
269 if (comMachine.isNull())
270 return table;
271
272 if (!comMachine.GetAccessible())
273 {
274 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
275 return table;
276 }
277
278 /* Base memory: */
279 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_RAM)
280 {
281 /* Configure hovering anchor: */
282 const QString strAnchorType = QString("base_memory");
283 const int iBaseMemory = comMachine.GetMemorySize();
284 table << UITextTableLine(QApplication::translate("UIDetails", "Base Memory", "details (system)"),
285 QString("<a href=#%1,%2>%3</a>")
286 .arg(strAnchorType)
287 .arg(iBaseMemory)
288 .arg(QApplication::translate("UIDetails", "%1 MB").arg(iBaseMemory)));
289 }
290
291 /* Processors: */
292 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_CPUCount)
293 {
294 const int cCPU = comMachine.GetCPUCount();
295 if (cCPU > 1)
296 table << UITextTableLine(QApplication::translate("UIDetails", "Processors", "details (system)"),
297 QString::number(cCPU));
298 }
299
300 /* Execution cap: */
301 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_CPUExecutionCap)
302 {
303 const int iCPUExecutionCap = comMachine.GetCPUExecutionCap();
304 if (iCPUExecutionCap < 100)
305 table << UITextTableLine(QApplication::translate("UIDetails", "Execution Cap", "details (system)"),
306 QApplication::translate("UIDetails", "%1%", "details").arg(iCPUExecutionCap));
307 }
308
309 /* Boot order: */
310 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_BootOrder)
311 {
312 /* Configure hovering anchor: */
313 const QString strAnchorType = QString("boot_order");
314 const UIBootItemDataList bootItems = loadBootItems(comMachine);
315 table << UITextTableLine(QApplication::translate("UIDetails", "Boot Order", "details (system)"),
316 QString("<a href=#%1,%2>%3</a>")
317 .arg(strAnchorType,
318 bootItemsToSerializedString(bootItems),
319 bootItemsToReadableString(bootItems)));
320 }
321
322 /* Chipset type: */
323 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_ChipsetType)
324 {
325 CPlatform comPlatform = comMachine.GetPlatform();
326 const KChipsetType enmChipsetType = comPlatform.GetChipsetType();
327 if (enmChipsetType == KChipsetType_ICH9)
328 table << UITextTableLine(QApplication::translate("UIDetails", "Chipset Type", "details (system)"),
329 gpConverter->toString(enmChipsetType));
330 }
331
332 /* TPM type: */
333 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_TpmType)
334 {
335 CTrustedPlatformModule comModule = comMachine.GetTrustedPlatformModule();
336 const KTpmType enmTpmType = comModule.GetType();
337 if (enmTpmType != KTpmType_None)
338 table << UITextTableLine(QApplication::translate("UIDetails", "TPM Type", "details (system)"),
339 gpConverter->toString(enmTpmType));
340 }
341
342 /* EFI: */
343 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_Firmware)
344 {
345 CFirmwareSettings comFirmwareSettings = comMachine.GetFirmwareSettings();
346 switch (comFirmwareSettings.GetFirmwareType())
347 {
348 case KFirmwareType_EFI:
349 case KFirmwareType_EFI32:
350 case KFirmwareType_EFI64:
351 case KFirmwareType_EFIDUAL:
352 {
353 table << UITextTableLine(QApplication::translate("UIDetails", "EFI", "details (system)"),
354 QApplication::translate("UIDetails", "Enabled", "details (system/EFI)"));
355 break;
356 }
357 default:
358 {
359 // For NLS purpose:
360 QApplication::translate("UIDetails", "Disabled", "details (system/EFI)");
361 break;
362 }
363 }
364 }
365
366 /* Secure Boot: */
367 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_SecureBoot)
368 {
369 CNvramStore comStoreLvl1 = comMachine.GetNonVolatileStore();
370 if (comStoreLvl1.isNotNull())
371 {
372 CUefiVariableStore comStoreLvl2 = comStoreLvl1.GetUefiVariableStore();
373 /// @todo this comStoreLvl2.isNotNull() will never work for
374 /// now since VM reference is immutable in Details pane
375 if ( comStoreLvl2.isNotNull()
376 && comStoreLvl2.GetSecureBootEnabled())
377 {
378 table << UITextTableLine(QApplication::translate("UIDetails", "Secure Boot", "details (system)"),
379 QApplication::translate("UIDetails", "Enabled", "details (system/secure boot)"));
380 }
381 }
382 }
383
384 /* Acceleration: */
385 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_Acceleration)
386 {
387 const CPlatform comPlatform = comMachine.GetPlatform();
388 switch (comPlatform.GetArchitecture())
389 {
390 case KPlatformArchitecture_x86:
391 {
392 CPlatformX86 comPlatformX86 = comPlatform.GetX86();
393 QStringList acceleration;
394 if (uiCommon().virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx))
395 {
396 /* Nested Paging: */
397 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging))
398 acceleration << QApplication::translate("UIDetails", "Nested Paging", "details (system)");
399 }
400 /* Nested VT-x/AMD-V: */
401 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_HWVirt))
402 acceleration << QApplication::translate("UIDetails", "Nested VT-x/AMD-V", "details (system)");
403 /* PAE/NX: */
404 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE))
405 acceleration << QApplication::translate("UIDetails", "PAE/NX", "details (system)");
406
407 /* Paravirtualization provider: */
408 switch (comMachine.GetEffectiveParavirtProvider())
409 {
410 case KParavirtProvider_Minimal: acceleration << QApplication::translate("UIDetails", "Minimal Paravirtualization", "details (system)"); break;
411 case KParavirtProvider_HyperV: acceleration << QApplication::translate("UIDetails", "Hyper-V Paravirtualization", "details (system)"); break;
412 case KParavirtProvider_KVM: acceleration << QApplication::translate("UIDetails", "KVM Paravirtualization", "details (system)"); break;
413 default: break;
414 }
415 if (!acceleration.isEmpty())
416 table << UITextTableLine(QApplication::translate("UIDetails", "Acceleration", "details (system)"),
417 acceleration.join(", "));
418 break;
419 }
420
421#ifdef VBOX_WITH_VIRT_ARMV8
422 case KPlatformArchitecture_ARM:
423 {
424 /** @todo BUGBUG ARM stuff goes here. */
425 break;
426 }
427#endif
428
429 default:
430 break;
431 }
432 }
433
434 return table;
435}
436
437UITextTable UIDetailsGenerator::generateMachineInformationDisplay(CMachine &comMachine,
438 const UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay &fOptions)
439{
440 UITextTable table;
441
442 if (comMachine.isNull())
443 return table;
444
445 if (!comMachine.GetAccessible())
446 {
447 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
448 return table;
449 }
450
451 const CGraphicsAdapter comGraphics = comMachine.GetGraphicsAdapter();
452
453 /* Video memory: */
454 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay_VRAM)
455 {
456 /* Configure hovering anchor: */
457 const QString strAnchorType = QString("video_memory");
458 const int iVideoMemory = comGraphics.GetVRAMSize();
459 table << UITextTableLine(QApplication::translate("UIDetails", "Video Memory", "details (display)"),
460 QString("<a href=#%1,%2>%3</a>")
461 .arg(strAnchorType)
462 .arg(iVideoMemory)
463 .arg(QApplication::translate("UIDetails", "%1 MB").arg(iVideoMemory)));
464 }
465
466 /* Screens: */
467 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay_ScreenCount)
468 {
469 const int cGuestScreens = comGraphics.GetMonitorCount();
470 if (cGuestScreens > 1)
471 table << UITextTableLine(QApplication::translate("UIDetails", "Screens", "details (display)"),
472 QString::number(cGuestScreens));
473 }
474
475 /* Scale-factor: */
476 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay_ScaleFactor)
477 {
478 const QString strScaleFactor = comMachine.GetExtraData(UIExtraDataDefs::GUI_ScaleFactor);
479 {
480 /* Try to convert loaded data to double: */
481 bool fOk = false;
482 double dValue = strScaleFactor.toDouble(&fOk);
483 /* Invent the default value: */
484 if (!fOk || !dValue)
485 dValue = 1.0;
486 /* Append information: */
487 if (dValue != 1.0)
488 table << UITextTableLine(QApplication::translate("UIDetails", "Scale-factor", "details (display)"),
489 QString::number(dValue, 'f', 2));
490 }
491 }
492
493 /* Graphics Controller: */
494 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay_GraphicsController)
495 {
496 const QString strAnchorType = QString("graphics_controller_type");
497 const KGraphicsControllerType enmType = comGraphics.GetGraphicsControllerType();
498 table << UITextTableLine(QApplication::translate("UIDetails", "Graphics Controller", "details (display)"),
499 QString("<a href=#%1,%2>%3</a>")
500 .arg(strAnchorType)
501 .arg((int)enmType)
502 .arg(gpConverter->toString(enmType)));
503 }
504
505 /* Acceleration: */
506 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay_Acceleration)
507 {
508 QStringList acceleration;
509 /* 3D acceleration: */
510 if (comGraphics.GetAccelerate3DEnabled())
511 acceleration << QApplication::translate("UIDetails", "3D", "details (display)");
512 if (!acceleration.isEmpty())
513 table << UITextTableLine(QApplication::translate("UIDetails", "Acceleration", "details (display)"),
514 acceleration.join(", "));
515 }
516
517 /* Remote desktop server: */
518 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay_VRDE)
519 {
520 const CVRDEServer comServer = comMachine.GetVRDEServer();
521 if (!comServer.isNull())
522 {
523 if (comServer.GetEnabled())
524 table << UITextTableLine(QApplication::translate("UIDetails", "Remote Desktop Server Port", "details (display/vrde)"),
525 comServer.GetVRDEProperty("TCP/Ports"));
526 else
527 table << UITextTableLine(QApplication::translate("UIDetails", "Remote Desktop Server", "details (display/vrde)"),
528 QApplication::translate("UIDetails", "Disabled", "details (display/vrde/VRDE server)"));
529 }
530 }
531
532 /* Recording: */
533 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay_Recording)
534 {
535 CRecordingSettings comRecordingSettings = comMachine.GetRecordingSettings();
536 if (comRecordingSettings.GetEnabled())
537 {
538 /* For now all screens have the same config: */
539 const CRecordingScreenSettings comRecordingScreen0Settings = comRecordingSettings.GetScreenSettings(0);
540
541 /** @todo r=andy Refine these texts (wrt audio and/or video). */
542 table << UITextTableLine(QApplication::translate("UIDetails", "Recording File", "details (display/recording)"),
543 comRecordingScreen0Settings.GetFilename());
544 table << UITextTableLine(QApplication::translate("UIDetails", "Recording Attributes", "details (display/recording)"),
545 QApplication::translate("UIDetails", "Frame Size: %1x%2, Frame Rate: %3fps, Bit Rate: %4kbps")
546 .arg(comRecordingScreen0Settings.GetVideoWidth()).arg(comRecordingScreen0Settings.GetVideoHeight())
547 .arg(comRecordingScreen0Settings.GetVideoFPS()).arg(comRecordingScreen0Settings.GetVideoRate()));
548 }
549 else
550 {
551 table << UITextTableLine(QApplication::translate("UIDetails", "Recording", "details (display/recording)"),
552 QApplication::translate("UIDetails", "Disabled", "details (display/recording)"));
553 }
554 }
555
556 return table;
557}
558
559UITextTable UIDetailsGenerator::generateMachineInformationStorage(CMachine &comMachine,
560 const UIExtraDataMetaDefs::DetailsElementOptionTypeStorage &fOptions,
561 bool fLink /* = true */)
562{
563 UITextTable table;
564
565 if (comMachine.isNull())
566 return table;
567
568 if (!comMachine.GetAccessible())
569 {
570 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
571 return table;
572 }
573
574 /* Iterate over all the machine controllers: */
575 foreach (const CStorageController &comController, comMachine.GetStorageControllers())
576 {
577 /* Add controller information: */
578 const QString strControllerName = QApplication::translate("UIMachineSettingsStorage", "Controller: %1");
579 table << UITextTableLine(strControllerName.arg(comController.GetName()), QString());
580 /* Populate map (its sorted!): */
581 QMap<StorageSlot, QString> attachmentsMap;
582 foreach (const CMediumAttachment &attachment, comMachine.GetMediumAttachmentsOfController(comController.GetName()))
583 {
584 /* Acquire device type first of all: */
585 const KDeviceType enmDeviceType = attachment.GetType();
586
587 /* Ignore restricted device types: */
588 if ( ( !(fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeStorage_HardDisks)
589 && enmDeviceType == KDeviceType_HardDisk)
590 || ( !(fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeStorage_OpticalDevices)
591 && enmDeviceType == KDeviceType_DVD)
592 || ( !(fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeStorage_FloppyDevices)
593 && enmDeviceType == KDeviceType_Floppy))
594 continue;
595
596 /* Prepare current storage slot: */
597 const StorageSlot attachmentSlot(comController.GetBus(), attachment.GetPort(), attachment.GetDevice());
598 AssertMsg(comController.isOk(),
599 ("Unable to acquire controller data: %s\n",
600 UIErrorString::formatRC(comController.lastRC()).toUtf8().constData()));
601 if (!comController.isOk())
602 continue;
603
604 /* Prepare attachment information: */
605 QString strAttachmentInfo = uiCommon().storageDetails(attachment.GetMedium(), false, false);
606 /* That hack makes sure 'Inaccessible' word is always bold: */
607 { // hack
608 const QString strInaccessibleString(UICommon::tr("Inaccessible", "medium"));
609 const QString strBoldInaccessibleString(QString("<b>%1</b>").arg(strInaccessibleString));
610 strAttachmentInfo.replace(strInaccessibleString, strBoldInaccessibleString);
611 } // hack
612
613 /* Append 'device slot name' with 'device type name' for optical devices only: */
614 QString strDeviceType = enmDeviceType == KDeviceType_DVD
615 ? QApplication::translate("UIDetails", "[Optical Drive]", "details (storage)")
616 : QString();
617 if (!strDeviceType.isNull())
618 strDeviceType.append(' ');
619
620 /* Insert that attachment information into the map: */
621 if (!strAttachmentInfo.isNull())
622 {
623 /* Configure hovering anchors: */
624 const QString strAnchorType = enmDeviceType == KDeviceType_DVD || enmDeviceType == KDeviceType_Floppy ? QString("mount") :
625 enmDeviceType == KDeviceType_HardDisk ? QString("attach") : QString();
626 const CMedium medium = attachment.GetMedium();
627 const QString strMediumLocation = medium.isNull() ? QString() : medium.GetLocation();
628 if (fLink)
629 attachmentsMap.insert(attachmentSlot,
630 QString("<a href=#%1,%2,%3,%4>%5</a>")
631 .arg(strAnchorType,
632 comController.GetName(),
633 gpConverter->toString(attachmentSlot),
634 strMediumLocation,
635 strDeviceType + strAttachmentInfo));
636 else
637 attachmentsMap.insert(attachmentSlot,
638 QString("%1")
639 .arg(strDeviceType + strAttachmentInfo));
640 }
641 }
642
643 /* Iterate over the sorted map: */
644 const QList<StorageSlot> storageSlots = attachmentsMap.keys();
645 const QList<QString> storageInfo = attachmentsMap.values();
646 for (int i = 0; i < storageSlots.size(); ++i)
647 table << UITextTableLine(QString(" ") + gpConverter->toString(storageSlots[i]), storageInfo[i]);
648 }
649 if (table.isEmpty())
650 table << UITextTableLine(QApplication::translate("UIDetails", "Not Attached", "details (storage)"), QString());
651
652 return table;
653}
654
655UITextTable UIDetailsGenerator::generateMachineInformationAudio(CMachine &comMachine,
656 const UIExtraDataMetaDefs::DetailsElementOptionTypeAudio &fOptions)
657{
658 UITextTable table;
659
660 if (comMachine.isNull())
661 return table;
662
663 if (!comMachine.GetAccessible())
664 {
665 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
666 return table;
667 }
668
669 const CAudioSettings comAudioSettings = comMachine.GetAudioSettings();
670 const CAudioAdapter comAdapter = comAudioSettings.GetAdapter();
671 if (comAdapter.GetEnabled())
672 {
673 /* Host driver: */
674 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeAudio_Driver)
675 {
676 const QString strAnchorType = QString("audio_host_driver_type");
677 const KAudioDriverType enmType = comAdapter.GetAudioDriver();
678 table << UITextTableLine(QApplication::translate("UIDetails", "Host Driver", "details (audio)"),
679 QString("<a href=#%1,%2>%3</a>")
680 .arg(strAnchorType)
681 .arg((int)enmType)
682 .arg(gpConverter->toString(enmType)));
683 }
684
685 /* Controller: */
686 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeAudio_Controller)
687 {
688 const QString strAnchorType = QString("audio_controller_type");
689 const KAudioControllerType enmType = comAdapter.GetAudioController();
690 table << UITextTableLine(QApplication::translate("UIDetails", "Controller", "details (audio)"),
691 QString("<a href=#%1,%2>%3</a>")
692 .arg(strAnchorType)
693 .arg((int)enmType)
694 .arg(gpConverter->toString(enmType)));
695 }
696
697#ifdef VBOX_WITH_AUDIO_INOUT_INFO
698 /* Audio I/O: */
699 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeAudio_IO)
700 {
701 table << UITextTableLine(QApplication::translate("UIDetails", "Audio Input", "details (audio)"),
702 comAdapter.GetEnabledIn() ?
703 QApplication::translate("UIDetails", "Enabled", "details (audio/input)") :
704 QApplication::translate("UIDetails", "Disabled", "details (audio/input)"));
705 table << UITextTableLine(QApplication::translate("UIDetails", "Audio Output", "details (audio)"),
706 comAdapter.GetEnabledOut() ?
707 QApplication::translate("UIDetails", "Enabled", "details (audio/output)") :
708 QApplication::translate("UIDetails", "Disabled", "details (audio/output)"));
709 }
710#endif /* VBOX_WITH_AUDIO_INOUT_INFO */
711 }
712 else
713 table << UITextTableLine(QApplication::translate("UIDetails", "Disabled", "details (audio)"),
714 QString());
715
716 return table;
717}
718
719QString summarizeGenericProperties(const CNetworkAdapter &comAdapter)
720{
721 QVector<QString> names;
722 QVector<QString> props;
723 props = comAdapter.GetProperties(QString(), names);
724 QString strResult;
725 for (int i = 0; i < names.size(); ++i)
726 {
727 strResult += names[i] + "=" + props[i];
728 if (i < names.size() - 1)
729 strResult += ", ";
730 }
731 return strResult;
732}
733
734UITextTable UIDetailsGenerator::generateMachineInformationNetwork(CMachine &comMachine,
735 const UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork &fOptions)
736{
737 UITextTable table;
738
739 if (comMachine.isNull())
740 return table;
741
742 if (!comMachine.GetAccessible())
743 {
744 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
745 return table;
746 }
747
748 /* Iterate over all the adapters: */
749 CPlatform comPlatform = comMachine.GetPlatform();
750 const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
751 const KChipsetType enmChipsetType = comPlatform.GetChipsetType();
752 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
753 const ulong cMaxNetworkAdapters = comProperties.GetMaxNetworkAdapters(enmChipsetType);
754 for (ulong uSlot = 0; uSlot < cMaxNetworkAdapters; ++uSlot)
755 {
756 const QString strAnchorType = QString("network_attachment_type");
757 const CNetworkAdapter comAdapter = comMachine.GetNetworkAdapter(uSlot);
758
759 /* Skip disabled adapters: */
760 if (!comAdapter.GetEnabled())
761 continue;
762
763 /* Gather adapter information: */
764 const KNetworkAttachmentType enmAttachmentType = comAdapter.GetAttachmentType();
765 const QString strAttachmentTemplate = gpConverter->toString(comAdapter.GetAdapterType()).replace(QRegularExpression("\\s\\(.+\\)"),
766 " (<a href=#%1,%2;%3;%4>%5</a>)");
767 QString strAttachmentType;
768 switch (enmAttachmentType)
769 {
770 case KNetworkAttachmentType_NAT:
771 {
772 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NAT)
773 strAttachmentType = strAttachmentTemplate
774 .arg(strAnchorType)
775 .arg(uSlot)
776 .arg((int)KNetworkAttachmentType_NAT)
777 .arg(QString())
778 .arg(gpConverter->toString(KNetworkAttachmentType_NAT));
779 break;
780 }
781 case KNetworkAttachmentType_Bridged:
782 {
783 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_BridgedAdapter)
784 {
785 const QString strName = comAdapter.GetBridgedInterface();
786 strAttachmentType = strAttachmentTemplate
787 .arg(strAnchorType)
788 .arg(uSlot)
789 .arg((int)KNetworkAttachmentType_Bridged)
790 .arg(strName)
791 .arg(QApplication::translate("UIDetails", "Bridged Adapter, %1", "details (network)")
792 .arg(strName));
793 }
794 break;
795 }
796 case KNetworkAttachmentType_Internal:
797 {
798 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_InternalNetwork)
799 {
800 const QString strName = comAdapter.GetInternalNetwork();
801 strAttachmentType = strAttachmentTemplate
802 .arg(strAnchorType)
803 .arg(uSlot)
804 .arg((int)KNetworkAttachmentType_Internal)
805 .arg(strName)
806 .arg(QApplication::translate("UIDetails", "Internal Network, '%1'", "details (network)")
807 .arg(strName));
808 }
809 break;
810 }
811 case KNetworkAttachmentType_HostOnly:
812 {
813 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyAdapter)
814 {
815 const QString strName = comAdapter.GetHostOnlyInterface();
816 strAttachmentType = strAttachmentTemplate
817 .arg(strAnchorType)
818 .arg(uSlot)
819 .arg((int)KNetworkAttachmentType_HostOnly)
820 .arg(strName)
821 .arg(QApplication::translate("UIDetails", "Host-only Adapter, '%1'", "details (network)")
822 .arg(strName));
823 }
824 break;
825 }
826#ifdef VBOX_WITH_VMNET
827 case KNetworkAttachmentType_HostOnlyNetwork:
828 {
829 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyNetwork)
830 {
831 const QString strName = comAdapter.GetHostOnlyNetwork();
832 strAttachmentType = strAttachmentTemplate
833 .arg(strAnchorType)
834 .arg(uSlot)
835 .arg((int)KNetworkAttachmentType_HostOnly)
836 .arg(strName)
837 .arg(QApplication::translate("UIDetails", "Host-only Network, '%1'", "details (network)")
838 .arg(strName));
839 }
840 break;
841 }
842#endif /* VBOX_WITH_VMNET */
843 case KNetworkAttachmentType_Generic:
844 {
845 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_GenericDriver)
846 {
847 const QString strName = comAdapter.GetGenericDriver();
848 const QString strGenericDriverProperties(summarizeGenericProperties(comAdapter));
849 strAttachmentType = strGenericDriverProperties.isNull()
850 ? strAttachmentTemplate
851 .arg(strAnchorType)
852 .arg(uSlot)
853 .arg((int)KNetworkAttachmentType_Generic)
854 .arg(strName)
855 .arg(QApplication::translate("UIDetails", "Generic Driver, '%1'", "details (network)")
856 .arg(strName))
857 : strAttachmentTemplate
858 .arg(strAnchorType)
859 .arg(uSlot)
860 .arg((int)KNetworkAttachmentType_Generic)
861 .arg(strName)
862 .arg(QApplication::translate("UIDetails", "Generic Driver, '%1' { %2 }", "details (network)")
863 .arg(strName, strGenericDriverProperties));
864 }
865 break;
866 }
867 case KNetworkAttachmentType_NATNetwork:
868 {
869 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NATNetwork)
870 {
871 const QString strName = comAdapter.GetNATNetwork();
872 strAttachmentType = strAttachmentTemplate
873 .arg(strAnchorType)
874 .arg(uSlot)
875 .arg((int)KNetworkAttachmentType_NATNetwork)
876 .arg(strName)
877 .arg(QApplication::translate("UIDetails", "NAT Network, '%1'", "details (network)")
878 .arg(strName));
879 }
880 break;
881 }
882 default:
883 {
884 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NotAttached)
885 strAttachmentType = strAttachmentTemplate
886 .arg(strAnchorType)
887 .arg(uSlot)
888 .arg((int)enmAttachmentType)
889 .arg(QString())
890 .arg(gpConverter->toString(enmAttachmentType));
891 break;
892 }
893 }
894 if (!strAttachmentType.isNull())
895 table << UITextTableLine(QApplication::translate("UIDetails", "Adapter %1", "details (network)").arg(comAdapter.GetSlot() + 1), strAttachmentType);
896 }
897 if (table.isEmpty())
898 table << UITextTableLine(QApplication::translate("UIDetails", "Disabled", "details (network/adapter)"), QString());
899
900 return table;
901}
902
903UITextTable UIDetailsGenerator::generateMachineInformationSerial(CMachine &comMachine,
904 const UIExtraDataMetaDefs::DetailsElementOptionTypeSerial &fOptions)
905{
906 UITextTable table;
907
908 if (comMachine.isNull())
909 return table;
910
911 if (!comMachine.GetAccessible())
912 {
913 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
914 return table;
915 }
916
917 /* Iterate over all the ports: */
918 CPlatform comPlatform = comMachine.GetPlatform();
919 const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
920 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
921 const ulong cMaxSerialPorts = comProperties.GetSerialPortCount();
922 for (ulong uSlot = 0; uSlot < cMaxSerialPorts; ++uSlot)
923 {
924 const CSerialPort comPort = comMachine.GetSerialPort(uSlot);
925
926 /* Skip disabled adapters: */
927 if (!comPort.GetEnabled())
928 continue;
929
930 /* Gather port information: */
931 const KPortMode enmMode = comPort.GetHostMode();
932 const QString strModeTemplate = UITranslator::toCOMPortName(comPort.GetIRQ(), comPort.GetIOAddress()) + ", ";
933 QString strModeType;
934 switch (enmMode)
935 {
936 case KPortMode_HostPipe:
937 {
938 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSerial_HostPipe)
939 strModeType = strModeTemplate + QString("%1 (%2)").arg(gpConverter->toString(enmMode)).arg(QDir::toNativeSeparators(comPort.GetPath()));
940 break;
941 }
942 case KPortMode_HostDevice:
943 {
944 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSerial_HostDevice)
945 strModeType = strModeTemplate + QString("%1 (%2)").arg(gpConverter->toString(enmMode)).arg(QDir::toNativeSeparators(comPort.GetPath()));
946 break;
947 }
948 case KPortMode_RawFile:
949 {
950 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSerial_RawFile)
951 strModeType = strModeTemplate + QString("%1 (%2)").arg(gpConverter->toString(enmMode)).arg(QDir::toNativeSeparators(comPort.GetPath()));
952 break;
953 }
954 case KPortMode_TCP:
955 {
956 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSerial_TCP)
957 strModeType = strModeTemplate + QString("%1 (%2)").arg(gpConverter->toString(enmMode)).arg(QDir::toNativeSeparators(comPort.GetPath()));
958 break;
959 }
960 default:
961 {
962 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSerial_Disconnected)
963 strModeType = strModeTemplate + gpConverter->toString(enmMode);
964 break;
965 }
966 }
967 if (!strModeType.isNull())
968 table << UITextTableLine(QApplication::translate("UIDetails", "Port %1", "details (serial)").arg(comPort.GetSlot() + 1), strModeType);
969 }
970 if (table.isEmpty())
971 table << UITextTableLine(QApplication::translate("UIDetails", "Disabled", "details (serial)"), QString());
972
973 return table;
974}
975
976UITextTable UIDetailsGenerator::generateMachineInformationUSB(CMachine &comMachine,
977 const UIExtraDataMetaDefs::DetailsElementOptionTypeUsb &fOptions)
978{
979 UITextTable table;
980
981 if (comMachine.isNull())
982 return table;
983
984 if (!comMachine.GetAccessible())
985 {
986 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
987 return table;
988 }
989
990 /* Iterate over all the USB filters: */
991 const CUSBDeviceFilters comFilterObject = comMachine.GetUSBDeviceFilters();
992 if (!comFilterObject.isNull() && comMachine.GetUSBProxyAvailable())
993 {
994 const QString strAnchorType = QString("usb_controller_type");
995 const CUSBControllerVector controllers = comMachine.GetUSBControllers();
996 if (!controllers.isEmpty())
997 {
998 /* USB controllers: */
999 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeUsb_Controller)
1000 {
1001 QStringList controllerInternal;
1002 QStringList controllersReadable;
1003 foreach (const CUSBController &comController, controllers)
1004 {
1005 const KUSBControllerType enmType = comController.GetType();
1006 controllerInternal << QString::number((int)enmType);
1007 controllersReadable << gpConverter->toString(enmType);
1008 }
1009 table << UITextTableLine(QApplication::translate("UIDetails", "USB Controller", "details (usb)"),
1010 QString("<a href=#%1,%2>%3</a>")
1011 .arg(strAnchorType)
1012 .arg(controllerInternal.join(';'))
1013 .arg(controllersReadable.join(", ")));
1014 }
1015
1016 /* Device filters: */
1017 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeUsb_DeviceFilters)
1018 {
1019 const CUSBDeviceFilterVector filters = comFilterObject.GetDeviceFilters();
1020 uint uActive = 0;
1021 for (int i = 0; i < filters.size(); ++i)
1022 if (filters.at(i).GetActive())
1023 ++uActive;
1024 table << UITextTableLine(QApplication::translate("UIDetails", "Device Filters", "details (usb)"),
1025 QApplication::translate("UIDetails", "%1 (%2 active)", "details (usb)").arg(filters.size()).arg(uActive));
1026 }
1027 }
1028 else
1029 table << UITextTableLine(QString("<a href=#%1,%2>%3</a>")
1030 .arg(strAnchorType)
1031 .arg(QString::number((int)KUSBControllerType_Null))
1032 .arg(QApplication::translate("UIDetails", "Disabled", "details (usb)")),
1033 QString());
1034 }
1035 else
1036 table << UITextTableLine(QApplication::translate("UIDetails", "USB Controller Inaccessible", "details (usb)"), QString());
1037
1038 return table;
1039}
1040
1041UITextTable UIDetailsGenerator::generateMachineInformationSharedFolders(CMachine &comMachine,
1042 const UIExtraDataMetaDefs::DetailsElementOptionTypeSharedFolders &fOptions)
1043{
1044 Q_UNUSED(fOptions);
1045
1046 UITextTable table;
1047
1048 if (comMachine.isNull())
1049 return table;
1050
1051 if (!comMachine.GetAccessible())
1052 {
1053 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
1054 return table;
1055 }
1056
1057 /* Summary: */
1058 const ulong uCount = comMachine.GetSharedFolders().size();
1059 if (uCount > 0)
1060 table << UITextTableLine(QApplication::translate("UIDetails", "Shared Folders", "details (shared folders)"), QString::number(uCount));
1061 else
1062 table << UITextTableLine(QApplication::translate("UIDetails", "None", "details (shared folders)"), QString());
1063
1064 return table;
1065}
1066
1067UITextTable UIDetailsGenerator::generateMachineInformationUI(CMachine &comMachine,
1068 const UIExtraDataMetaDefs::DetailsElementOptionTypeUserInterface &fOptions)
1069{
1070 UITextTable table;
1071
1072 if (comMachine.isNull())
1073 return table;
1074
1075 if (!comMachine.GetAccessible())
1076 {
1077 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
1078 return table;
1079 }
1080
1081 /* Visual state: */
1082 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeUserInterface_VisualState)
1083 {
1084 const QString strAnchorType = QString("visual_state");
1085 const QString strEnabledFullscreen = comMachine.GetExtraData(UIExtraDataDefs::GUI_Fullscreen);
1086 const QString strEnabledSeamless = comMachine.GetExtraData(UIExtraDataDefs::GUI_Seamless);
1087 const QString strEnabledScale = comMachine.GetExtraData(UIExtraDataDefs::GUI_Scale);
1088 UIVisualStateType enmType = UIVisualStateType_Normal;
1089 if ( strEnabledFullscreen.compare("true", Qt::CaseInsensitive) == 0
1090 || strEnabledFullscreen.compare("yes", Qt::CaseInsensitive) == 0
1091 || strEnabledFullscreen.compare("on", Qt::CaseInsensitive) == 0
1092 || strEnabledFullscreen == "1")
1093 enmType = UIVisualStateType_Fullscreen;
1094 else
1095 if ( strEnabledSeamless.compare("true", Qt::CaseInsensitive) == 0
1096 || strEnabledSeamless.compare("yes", Qt::CaseInsensitive) == 0
1097 || strEnabledSeamless.compare("on", Qt::CaseInsensitive) == 0
1098 || strEnabledSeamless == "1")
1099 enmType = UIVisualStateType_Seamless;
1100 else
1101 if ( strEnabledScale.compare("true", Qt::CaseInsensitive) == 0
1102 || strEnabledScale.compare("yes", Qt::CaseInsensitive) == 0
1103 || strEnabledScale.compare("on", Qt::CaseInsensitive) == 0
1104 || strEnabledScale == "1")
1105 enmType = UIVisualStateType_Scale;
1106 const QString strVisualState = gpConverter->toString(enmType);
1107 table << UITextTableLine(QApplication::translate("UIDetails", "Visual State", "details (user interface)"),
1108 QString("<a href=#%1,%2>%3</a>")
1109 .arg(strAnchorType)
1110 .arg(enmType)
1111 .arg(strVisualState));
1112 }
1113
1114#ifndef VBOX_WS_MAC
1115 /* Menu-bar: */
1116 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeUserInterface_MenuBar)
1117 {
1118 const QString strAnchorType = QString("menu_bar");
1119 const QString strMenubarEnabled = comMachine.GetExtraData(UIExtraDataDefs::GUI_MenuBar_Enabled);
1120 const bool fEnabled = !( strMenubarEnabled.compare("false", Qt::CaseInsensitive) == 0
1121 || strMenubarEnabled.compare("no", Qt::CaseInsensitive) == 0
1122 || strMenubarEnabled.compare("off", Qt::CaseInsensitive) == 0
1123 || strMenubarEnabled == "0");
1124 table << UITextTableLine(QApplication::translate("UIDetails", "Menu-bar", "details (user interface)"),
1125 QString("<a href=#%1,%2>%3</a>")
1126 .arg(strAnchorType)
1127 .arg((int)fEnabled)
1128 .arg(fEnabled ? QApplication::translate("UIDetails", "Enabled", "details (user interface/menu-bar)")
1129 : QApplication::translate("UIDetails", "Disabled", "details (user interface/menu-bar)")));
1130 }
1131#endif /* !VBOX_WS_MAC */
1132
1133 /* Status-bar: */
1134 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeUserInterface_StatusBar)
1135 {
1136 const QString strAnchorType = QString("status_bar");
1137 const QString strStatusbarEnabled = comMachine.GetExtraData(UIExtraDataDefs::GUI_StatusBar_Enabled);
1138 const bool fEnabled = !( strStatusbarEnabled.compare("false", Qt::CaseInsensitive) == 0
1139 || strStatusbarEnabled.compare("no", Qt::CaseInsensitive) == 0
1140 || strStatusbarEnabled.compare("off", Qt::CaseInsensitive) == 0
1141 || strStatusbarEnabled == "0");
1142 table << UITextTableLine(QApplication::translate("UIDetails", "Status-bar", "details (user interface)"),
1143 QString("<a href=#%1,%2>%3</a>")
1144 .arg(strAnchorType)
1145 .arg((int)fEnabled)
1146 .arg(fEnabled ? QApplication::translate("UIDetails", "Enabled", "details (user interface/status-bar)")
1147 : QApplication::translate("UIDetails", "Disabled", "details (user interface/status-bar)")));
1148 }
1149
1150#ifndef VBOX_WS_MAC
1151 /* Mini-toolbar: */
1152 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeUserInterface_MiniToolbar)
1153 {
1154 const QString strAnchorType = QString("mini_toolbar");
1155 const QString strMiniToolbarEnabled = comMachine.GetExtraData(UIExtraDataDefs::GUI_ShowMiniToolBar);
1156 const bool fEnabled = !( strMiniToolbarEnabled.compare("false", Qt::CaseInsensitive) == 0
1157 || strMiniToolbarEnabled.compare("no", Qt::CaseInsensitive) == 0
1158 || strMiniToolbarEnabled.compare("off", Qt::CaseInsensitive) == 0
1159 || strMiniToolbarEnabled == "0");
1160 if (fEnabled)
1161 {
1162 /* Get mini-toolbar position: */
1163 const QString strMiniToolbarPosition = comMachine.GetExtraData(UIExtraDataDefs::GUI_MiniToolBarAlignment);
1164 {
1165 /* Try to convert loaded data to alignment: */
1166 switch (gpConverter->fromInternalString<MiniToolbarAlignment>(strMiniToolbarPosition))
1167 {
1168 case MiniToolbarAlignment_Top:
1169 table << UITextTableLine(QApplication::translate("UIDetails", "Mini-toolbar Position", "details (user interface)"),
1170 QString("<a href=#%1,%2>%3</a>")
1171 .arg(strAnchorType)
1172 .arg((int)MiniToolbarAlignment_Top)
1173 .arg(QApplication::translate("UIDetails", "Top", "details (user interface/mini-toolbar position)")));
1174 break;
1175 case MiniToolbarAlignment_Bottom:
1176 table << UITextTableLine(QApplication::translate("UIDetails", "Mini-toolbar Position", "details (user interface)"),
1177 QString("<a href=#%1,%2>%3</a>")
1178 .arg(strAnchorType)
1179 .arg((int)MiniToolbarAlignment_Bottom)
1180 .arg(QApplication::translate("UIDetails", "Bottom", "details (user interface/mini-toolbar position)")));
1181 break;
1182 default:
1183 break;
1184 }
1185 }
1186 }
1187 else
1188 table << UITextTableLine(QApplication::translate("UIDetails", "Mini-toolbar", "details (user interface)"),
1189 QString("<a href=#%1,%2>%3</a>")
1190 .arg(strAnchorType)
1191 .arg((int)MiniToolbarAlignment_Disabled)
1192 .arg(QApplication::translate("UIDetails", "Disabled", "details (user interface/mini-toolbar)")));
1193 }
1194#endif /* !VBOX_WS_MAC */
1195
1196 return table;
1197}
1198
1199UITextTable UIDetailsGenerator::generateMachineInformationDescription(CMachine &comMachine,
1200 const UIExtraDataMetaDefs::DetailsElementOptionTypeDescription &fOptions)
1201{
1202 Q_UNUSED(fOptions);
1203
1204 UITextTable table;
1205
1206 if (comMachine.isNull())
1207 return table;
1208
1209 if (!comMachine.GetAccessible())
1210 {
1211 table << UITextTableLine(QApplication::translate("UIDetails", "Information Inaccessible", "details"), QString());
1212 return table;
1213 }
1214
1215 /* Summary: */
1216 const QString strDescription = comMachine.GetDescription();
1217 if (!strDescription.isEmpty())
1218 table << UITextTableLine(strDescription, QString());
1219 else
1220 table << UITextTableLine(QApplication::translate("UIDetails", "None", "details (description)"), QString());
1221
1222 return table;
1223}
1224
1225void UIDetailsGenerator::acquireHardDiskStatusInfo(CMachine &comMachine, QString &strInfo,
1226 bool &fAttachmentsPresent)
1227{
1228 /* Enumerate all the controllers: */
1229 foreach (const CStorageController &comController, comMachine.GetStorageControllers())
1230 {
1231 /* Enumerate all the attachments: */
1232 QString strAttData;
1233 foreach (const CMediumAttachment &comAttachment, comMachine.GetMediumAttachmentsOfController(comController.GetName()))
1234 {
1235 /* Skip unrelated attachments: */
1236 if (comAttachment.GetType() != KDeviceType_HardDisk)
1237 continue;
1238 /* Append attachment data: */
1239 strAttData += e_strTableRow3
1240 .arg(gpConverter->toString(StorageSlot(comController.GetBus(), comAttachment.GetPort(), comAttachment.GetDevice())))
1241 .arg(UIMedium(comAttachment.GetMedium(), UIMediumDeviceType_HardDisk).location());
1242 fAttachmentsPresent = true;
1243 }
1244 /* Append controller data: */
1245 if (!strAttData.isNull())
1246 strInfo += e_strTableRow1.arg(comController.GetName()) + strAttData;
1247 }
1248}
1249
1250void UIDetailsGenerator::acquireOpticalDiskStatusInfo(CMachine &comMachine, QString &strInfo,
1251 bool &fAttachmentsPresent, bool &fAttachmentsMounted)
1252{
1253 /* Enumerate all the controllers: */
1254 foreach (const CStorageController &comController, comMachine.GetStorageControllers())
1255 {
1256 QString strAttData;
1257 /* Enumerate all the attachments: */
1258 foreach (const CMediumAttachment &comAttachment, comMachine.GetMediumAttachmentsOfController(comController.GetName()))
1259 {
1260 /* Skip unrelated attachments: */
1261 if (comAttachment.GetType() != KDeviceType_DVD)
1262 continue;
1263 /* Append attachment data: */
1264 UIMedium vboxMedium(comAttachment.GetMedium(), UIMediumDeviceType_DVD);
1265 strAttData += e_strTableRow3
1266 .arg(gpConverter->toString(StorageSlot(comController.GetBus(), comAttachment.GetPort(), comAttachment.GetDevice())))
1267 .arg(vboxMedium.isNull() || vboxMedium.isHostDrive() ? vboxMedium.name() : vboxMedium.location());
1268 fAttachmentsPresent = true;
1269 if (!vboxMedium.isNull())
1270 fAttachmentsMounted = true;
1271 }
1272 /* Append controller data: */
1273 if (!strAttData.isNull())
1274 strInfo += e_strTableRow1.arg(comController.GetName()) + strAttData;
1275 }
1276}
1277
1278void UIDetailsGenerator::acquireFloppyDiskStatusInfo(CMachine &comMachine, QString &strInfo,
1279 bool &fAttachmentsPresent, bool &fAttachmentsMounted)
1280{
1281 /* Enumerate all the controllers: */
1282 foreach (const CStorageController &comController, comMachine.GetStorageControllers())
1283 {
1284 QString strAttData;
1285 /* Enumerate all the attachments: */
1286 foreach (const CMediumAttachment &comAttachment, comMachine.GetMediumAttachmentsOfController(comController.GetName()))
1287 {
1288 /* Skip unrelated attachments: */
1289 if (comAttachment.GetType() != KDeviceType_Floppy)
1290 continue;
1291 /* Append attachment data: */
1292 UIMedium vboxMedium(comAttachment.GetMedium(), UIMediumDeviceType_Floppy);
1293 strAttData += e_strTableRow3
1294 .arg(gpConverter->toString(StorageSlot(comController.GetBus(), comAttachment.GetPort(), comAttachment.GetDevice())))
1295 .arg(vboxMedium.isNull() || vboxMedium.isHostDrive() ? vboxMedium.name() : vboxMedium.location());
1296 fAttachmentsPresent = true;
1297 if (!vboxMedium.isNull())
1298 fAttachmentsMounted = true;
1299 }
1300 /* Append controller data: */
1301 if (!strAttData.isNull())
1302 strInfo += e_strTableRow1.arg(comController.GetName()) + strAttData;
1303 }
1304}
1305
1306void UIDetailsGenerator::acquireAudioStatusInfo(CMachine &comMachine, QString &strInfo,
1307 bool &fAudioEnabled, bool &fEnabledOutput, bool &fEnabledInput)
1308{
1309 /* Get audio settings & adapter: */
1310 const CAudioSettings comAudioSettings = comMachine.GetAudioSettings();
1311 const CAudioAdapter comAdapter = comAudioSettings.GetAdapter();
1312 fAudioEnabled = comAdapter.GetEnabled();
1313 if (fAudioEnabled)
1314 {
1315 fEnabledOutput = comAdapter.GetEnabledOut();
1316 fEnabledInput = comAdapter.GetEnabledIn();
1317 strInfo = QString(e_strTableRow2).arg(QApplication::translate("UIDetails", "Audio Output", "details (audio)"),
1318 fEnabledOutput ?
1319 QApplication::translate("UIDetails", "Enabled", "details (audio/output)") :
1320 QApplication::translate("UIDetails", "Disabled", "details (audio/output)"))
1321 + QString(e_strTableRow2).arg(QApplication::translate("UIDetails", "Audio Input", "details (audio)"),
1322 fEnabledInput ?
1323 QApplication::translate("UIDetails", "Enabled", "details (audio/input)") :
1324 QApplication::translate("UIDetails", "Disabled", "details (audio/input)"));
1325 }
1326}
1327
1328void UIDetailsGenerator::acquireNetworkStatusInfo(CMachine &comMachine, QString &strInfo,
1329 bool &fAdaptersPresent, bool &fCablesDisconnected)
1330{
1331 /* Determine max amount of network adapters: */
1332 CPlatform comPlatform = comMachine.GetPlatform();
1333 const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
1334 const KChipsetType enmChipsetType = comPlatform.GetChipsetType();
1335 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
1336 const ulong cMaxNetworkAdapters = comProperties.GetMaxNetworkAdapters(enmChipsetType);
1337
1338 /* Gather adapter properties: */
1339 RTTIMESPEC time;
1340 uint64_t u64Now = RTTimeSpecGetNano(RTTimeNow(&time));
1341 QString strFlags, strCount;
1342 LONG64 iTimestamp;
1343 comMachine.GetGuestProperty("/VirtualBox/GuestInfo/Net/Count", strCount, iTimestamp, strFlags);
1344 bool fPropsValid = (u64Now - iTimestamp < UINT64_C(60000000000)); /* timeout beacon */
1345 QStringList ipList, macList;
1346 if (fPropsValid)
1347 {
1348 const ulong cAdapters = qMin(strCount.toULong(), cMaxNetworkAdapters);
1349 for (ulong i = 0; i < cAdapters; ++i)
1350 {
1351 ipList << comMachine.GetGuestPropertyValue(QString("/VirtualBox/GuestInfo/Net/%1/V4/IP").arg(i));
1352 macList << comMachine.GetGuestPropertyValue(QString("/VirtualBox/GuestInfo/Net/%1/MAC").arg(i));
1353 }
1354 }
1355
1356 /* Enumerate up to cMaxNetworkAdapters adapters: */
1357 for (ulong uSlot = 0; uSlot < cMaxNetworkAdapters; ++uSlot)
1358 {
1359 const CNetworkAdapter &comAdapter = comMachine.GetNetworkAdapter(uSlot);
1360 if (comMachine.isOk() && !comAdapter.isNull() && comAdapter.GetEnabled())
1361 {
1362 fAdaptersPresent = true;
1363 QString strGuestIp;
1364 if (fPropsValid)
1365 {
1366 const QString strGuestMac = comAdapter.GetMACAddress();
1367 const int iIp = macList.indexOf(strGuestMac);
1368 if (iIp >= 0)
1369 strGuestIp = ipList.at(iIp);
1370 }
1371 /* Check if the adapter's cable is connected: */
1372 const bool fCableConnected = comAdapter.GetCableConnected();
1373 if (fCablesDisconnected && fCableConnected)
1374 fCablesDisconnected = false;
1375 /* Append adapter data: */
1376 strInfo += e_strTableRow1
1377 .arg(QApplication::translate("UIIndicatorsPool", "Adapter %1 (%2)", "Network tooltip")
1378 .arg(uSlot + 1).arg(gpConverter->toString(comAdapter.GetAttachmentType())));
1379 if (!strGuestIp.isEmpty())
1380 strInfo += e_strTableRow3
1381 .arg(QApplication::translate("UIIndicatorsPool", "IP", "Network tooltip"), strGuestIp);
1382 strInfo += e_strTableRow3
1383 .arg(QApplication::translate("UIIndicatorsPool", "Cable", "Network tooltip"))
1384 .arg(fCableConnected ?
1385 QApplication::translate("UIIndicatorsPool", "Connected", "cable (Network tooltip)") :
1386 QApplication::translate("UIIndicatorsPool", "Disconnected", "cable (Network tooltip)"));
1387 }
1388 }
1389}
1390
1391void UIDetailsGenerator::acquireUsbStatusInfo(CMachine &comMachine, CConsole &comConsole,
1392 QString &strInfo, bool &fUsbEnabled)
1393{
1394 /* Check whether there is at least one USB controller with an available proxy: */
1395 fUsbEnabled = !comMachine.GetUSBDeviceFilters().isNull()
1396 && !comMachine.GetUSBControllers().isEmpty()
1397 && comMachine.GetUSBProxyAvailable();
1398 if (fUsbEnabled)
1399 {
1400 /* Enumerate all the USB devices: */
1401 foreach (const CUSBDevice &comUsbDevice, comConsole.GetUSBDevices())
1402 strInfo += e_strTableRow1.arg(uiCommon().usbDetails(comUsbDevice));
1403 /* Handle 'no-usb-devices' case: */
1404 if (strInfo.isNull())
1405 strInfo = e_strTableRow1
1406 .arg(QApplication::translate("UIIndicatorsPool", "No USB devices attached", "USB tooltip"));
1407 }
1408}
1409
1410void UIDetailsGenerator::acquireSharedFoldersStatusInfo(CMachine &comMachine, CConsole &comConsole, CGuest &comGuest,
1411 QString &strInfo, bool &fFoldersPresent)
1412{
1413 /* Enumerate all the folders: */
1414 QMap<QString, QString> folders;
1415 foreach (const CSharedFolder &comPermanentFolder, comMachine.GetSharedFolders())
1416 folders.insert(comPermanentFolder.GetName(), comPermanentFolder.GetHostPath());
1417 foreach (const CSharedFolder &comTemporaryFolder, comConsole.GetSharedFolders())
1418 folders.insert(comTemporaryFolder.GetName(), comTemporaryFolder.GetHostPath());
1419 fFoldersPresent = !folders.isEmpty();
1420
1421 /* Append attachment data: */
1422 for (QMap<QString, QString>::const_iterator it = folders.constBegin(); it != folders.constEnd(); ++it)
1423 {
1424 /* Select slashes depending on the OS type: */
1425 if (UIGuestOSTypeManager::isDOSType(comGuest.GetOSTypeId()))
1426 strInfo += e_strTableRow2.arg(QString("<b>\\\\vboxsvr\\%1</b>").arg(it.key()), it.value());
1427 else
1428 strInfo += e_strTableRow2.arg(QString("<b>%1</b>").arg(it.key()), it.value());
1429 }
1430
1431 /* Handle 'no-folders' case: */
1432 if (!fFoldersPresent)
1433 strInfo = e_strTableRow1
1434 .arg(QApplication::translate("UIIndicatorsPool", "No shared folders", "Shared folders tooltip"));
1435}
1436
1437void UIDetailsGenerator::acquireDisplayStatusInfo(CMachine &comMachine, QString &strInfo,
1438 bool &fAcceleration3D)
1439{
1440 /* Get graphics adapter: */
1441 CGraphicsAdapter comGraphics = comMachine.GetGraphicsAdapter();
1442
1443 /* Video Memory: */
1444 const ULONG uVRAMSize = comGraphics.GetVRAMSize();
1445 const QString strVRAMSize = UICommon::tr("<nobr>%1 MB</nobr>", "details report").arg(uVRAMSize);
1446 strInfo += e_strTableRow2
1447 .arg(QApplication::translate("UIIndicatorsPool", "Video memory", "Display tooltip"), strVRAMSize);
1448
1449 /* Monitor Count: */
1450 const ULONG uMonitorCount = comGraphics.GetMonitorCount();
1451 if (uMonitorCount > 1)
1452 {
1453 const QString strMonitorCount = QString::number(uMonitorCount);
1454 strInfo += e_strTableRow2
1455 .arg(QApplication::translate("UIIndicatorsPool", "Screens", "Display tooltip"), strMonitorCount);
1456 }
1457
1458 /* 3D acceleration: */
1459 fAcceleration3D = comGraphics.GetAccelerate3DEnabled();
1460 if (fAcceleration3D)
1461 {
1462 const QString strAcceleration3D = fAcceleration3D
1463 ? UICommon::tr("Enabled", "details report (3D Acceleration)")
1464 : UICommon::tr("Disabled", "details report (3D Acceleration)");
1465 strInfo += e_strTableRow2
1466 .arg(QApplication::translate("UIIndicatorsPool", "3D acceleration", "Display tooltip"), strAcceleration3D);
1467 }
1468}
1469
1470void UIDetailsGenerator::acquireRecordingStatusInfo(CMachine &comMachine, QString &strInfo,
1471 bool &fRecordingEnabled)
1472{
1473 /* Get recording settings: */
1474 CRecordingSettings comRecordingSettings = comMachine.GetRecordingSettings();
1475 fRecordingEnabled = comRecordingSettings.GetEnabled();
1476 if (fRecordingEnabled)
1477 {
1478 /* For now all screens have the same config: */
1479 CRecordingScreenSettings comRecordingScreen0Settings = comRecordingSettings.GetScreenSettings(0);
1480 const bool fVideoEnabled = comRecordingScreen0Settings.IsFeatureEnabled(KRecordingFeature_Video);
1481 const bool fAudioEnabled = comRecordingScreen0Settings.IsFeatureEnabled(KRecordingFeature_Audio);
1482
1483 /* Compose tool-tip: */
1484 QString strToolTip;
1485 if (fVideoEnabled && fAudioEnabled)
1486 strToolTip = QApplication::translate("UIIndicatorsPool", "Video/audio recording file", "Recording tooltip");
1487 else if (fAudioEnabled)
1488 strToolTip = QApplication::translate("UIIndicatorsPool", "Audio recording file", "Recording tooltip");
1489 else if (fVideoEnabled)
1490 strToolTip = QApplication::translate("UIIndicatorsPool", "Video recording file", "Recording tooltip");
1491 strInfo += e_strTableRow2
1492 .arg(strToolTip)
1493 .arg(comRecordingScreen0Settings.GetFilename());
1494 }
1495 /* Handle 'no-recording' case: */
1496 else
1497 {
1498 strInfo += e_strTableRow1
1499 .arg(QApplication::translate("UIIndicatorsPool", "Recording disabled", "Recording tooltip"));
1500 }
1501}
1502
1503void UIDetailsGenerator::acquireFeaturesStatusInfo(CMachine &comMachine, QString &strInfo,
1504 KVMExecutionEngine &enmEngine,
1505 bool fNestedPagingEnabled, bool fUxEnabled,
1506 KParavirtProvider enmProvider)
1507{
1508 /* VT-x/AMD-V feature: */
1509 QString strExecutionEngine;
1510 switch (enmEngine)
1511 {
1512 case KVMExecutionEngine_Interpreter:
1513 strExecutionEngine = "IEM (Interpreter)"; /* no translation */
1514 break;
1515 case KVMExecutionEngine_Recompiler:
1516 strExecutionEngine = "IEM (Recompiler)"; /* no translation */
1517 break;
1518 case KVMExecutionEngine_HwVirt:
1519 strExecutionEngine = "VT-x/AMD-V"; /* no translation */
1520 break;
1521 case KVMExecutionEngine_NativeApi:
1522 strExecutionEngine = "native API"; /* no translation */
1523 break;
1524 default:
1525 AssertFailed();
1526 enmEngine = KVMExecutionEngine_NotSet;
1527 RT_FALL_THRU();
1528 case KVMExecutionEngine_NotSet:
1529 strExecutionEngine = UICommon::tr("not set", "details report (execution engine)");
1530 break;
1531 }
1532
1533 /* Nested Paging feature: */
1534 const QString strNestedPaging = fNestedPagingEnabled
1535 ? UICommon::tr("Active", "details report (Nested Paging)")
1536 : UICommon::tr("Inactive", "details report (Nested Paging)");
1537
1538 /* Unrestricted Execution feature: */
1539 const QString strUnrestrictExec = fUxEnabled
1540 ? UICommon::tr("Active", "details report (Unrestricted Execution)")
1541 : UICommon::tr("Inactive", "details report (Unrestricted Execution)");
1542
1543 /* CPU Execution Cap feature: */
1544 const QString strCPUExecCap = QString::number(comMachine.GetCPUExecutionCap());
1545
1546 /* Paravirtualization feature: */
1547 const QString strParavirt = gpConverter->toString(enmProvider);
1548
1549 /* Compose tool-tip: */
1550 strInfo += e_strTableRow2.arg(UICommon::tr("Execution engine", "details report"), strExecutionEngine);
1551 strInfo += e_strTableRow2.arg(UICommon::tr("Nested Paging"), strNestedPaging);
1552 strInfo += e_strTableRow2.arg(UICommon::tr("Unrestricted Execution"), strUnrestrictExec);
1553 strInfo += e_strTableRow2.arg(UICommon::tr("Execution Cap", "details report"), strCPUExecCap);
1554 strInfo += e_strTableRow2.arg(UICommon::tr("Paravirtualization Interface", "details report"), strParavirt);
1555
1556 /* Add CPU count optional info: */
1557 const int cCpuCount = comMachine.GetCPUCount();
1558 if (cCpuCount > 1)
1559 strInfo += e_strTableRow2.arg(UICommon::tr("Processors", "details report"), QString::number(cCpuCount));
1560}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette