UIConverterBackendCOM.cpp revision 85847deb048f0f6e8e382b54f64d4e5699c52a48
375N/A * available from http://www.virtualbox.org. This file is free software;
375N/A# include <QApplication>
375N/A# include "UIConverterBackend.h"
375N/A# include "UIIconPool.h"
844N/A# include "COMEnums.h"
switch (state)
case KMachineState_DeletingSnapshotOnline: return UIIconPool::iconSet(":/state_discarding_16px.png");
case KMachineState_DeletingSnapshotPaused: return UIIconPool::iconSet(":/state_discarding_16px.png");
case KMachineState_SettingUp: return UIIconPool::iconSet(":/vm_settings_16px.png"); // TODO: Change icon!
return QIcon();
switch (state)
case KMachineState_PoweredOff: return QApplication::translate("VBoxGlobal", "Powered Off", "MachineState");
case KMachineState_Aborted: return QApplication::translate("VBoxGlobal", "Aborted", "MachineState");
case KMachineState_Teleported: return QApplication::translate("VBoxGlobal", "Teleported", "MachineState");
case KMachineState_Running: return QApplication::translate("VBoxGlobal", "Running", "MachineState");
case KMachineState_Stuck: return QApplication::translate("VBoxGlobal", "Guru Meditation", "MachineState");
case KMachineState_Teleporting: return QApplication::translate("VBoxGlobal", "Teleporting", "MachineState");
case KMachineState_LiveSnapshotting: return QApplication::translate("VBoxGlobal", "Taking Live Snapshot", "MachineState");
case KMachineState_Starting: return QApplication::translate("VBoxGlobal", "Starting", "MachineState");
case KMachineState_Stopping: return QApplication::translate("VBoxGlobal", "Stopping", "MachineState");
case KMachineState_Restoring: return QApplication::translate("VBoxGlobal", "Restoring", "MachineState");
case KMachineState_TeleportingPausedVM: return QApplication::translate("VBoxGlobal", "Teleporting Paused VM", "MachineState");
case KMachineState_TeleportingIn: return QApplication::translate("VBoxGlobal", "Teleporting", "MachineState");
case KMachineState_FaultTolerantSyncing: return QApplication::translate("VBoxGlobal", "Fault Tolerant Syncing", "MachineState");
case KMachineState_DeletingSnapshotOnline: return QApplication::translate("VBoxGlobal", "Deleting Snapshot", "MachineState");
case KMachineState_DeletingSnapshotPaused: return QApplication::translate("VBoxGlobal", "Deleting Snapshot", "MachineState");
case KMachineState_RestoringSnapshot: return QApplication::translate("VBoxGlobal", "Restoring Snapshot", "MachineState");
case KMachineState_DeletingSnapshot: return QApplication::translate("VBoxGlobal", "Deleting Snapshot", "MachineState");
case KMachineState_SettingUp: return QApplication::translate("VBoxGlobal", "Setting Up", "MachineState");
return QString();
switch (state)
case KSessionState_Unlocked: return QApplication::translate("VBoxGlobal", "Unlocked", "SessionState");
case KSessionState_Spawning: return QApplication::translate("VBoxGlobal", "Spawning", "SessionState");
case KSessionState_Unlocking: return QApplication::translate("VBoxGlobal", "Unlocking", "SessionState");
return QString();
switch (type)
case KParavirtProvider_None: return QApplication::translate("VBoxGlobal", "None", "ParavirtProvider");
case KParavirtProvider_Default: return QApplication::translate("VBoxGlobal", "Default", "ParavirtProvider");
case KParavirtProvider_Legacy: return QApplication::translate("VBoxGlobal", "Legacy", "ParavirtProvider");
case KParavirtProvider_Minimal: return QApplication::translate("VBoxGlobal", "Minimal", "ParavirtProvider");
case KParavirtProvider_HyperV: return QApplication::translate("VBoxGlobal", "Hyper-V", "ParavirtProvider");
case KParavirtProvider_KVM: return QApplication::translate("VBoxGlobal", "KVM", "ParavirtProvider");
return QString();
switch (type)
case KDeviceType_SharedFolder: return QApplication::translate("VBoxGlobal", "Shared Folder", "DeviceType");
return QString();
switch (mode)
case KClipboardMode_Disabled: return QApplication::translate("VBoxGlobal", "Disabled", "ClipboardType");
case KClipboardMode_HostToGuest: return QApplication::translate("VBoxGlobal", "Host To Guest", "ClipboardType");
case KClipboardMode_GuestToHost: return QApplication::translate("VBoxGlobal", "Guest To Host", "ClipboardType");
case KClipboardMode_Bidirectional: return QApplication::translate("VBoxGlobal", "Bidirectional", "ClipboardType");
return QString();
switch (mode)
case KDnDMode_Disabled: return QApplication::translate("VBoxGlobal", "Disabled", "DragAndDropType");
case KDnDMode_HostToGuest: return QApplication::translate("VBoxGlobal", "Host To Guest", "DragAndDropType");
case KDnDMode_GuestToHost: return QApplication::translate("VBoxGlobal", "Guest To Host", "DragAndDropType");
case KDnDMode_Bidirectional: return QApplication::translate("VBoxGlobal", "Bidirectional", "DragAndDropType");
return QString();
switch (type)
case KPointingHIDType_PS2Mouse: return QApplication::translate("VBoxGlobal", "PS/2 Mouse", "PointingHIDType");
case KPointingHIDType_USBMouse: return QApplication::translate("VBoxGlobal", "USB Mouse", "PointingHIDType");
case KPointingHIDType_USBTablet: return QApplication::translate("VBoxGlobal", "USB Tablet", "PointingHIDType");
case KPointingHIDType_ComboMouse: return QApplication::translate("VBoxGlobal", "PS/2 and USB Mouse", "PointingHIDType");
case KPointingHIDType_USBMultiTouch: return QApplication::translate("VBoxGlobal", "USB Multi-Touch Tablet", "PointingHIDType");
return QString();
switch (type)
case KMediumType_Immutable: return QApplication::translate("VBoxGlobal", "Immutable", "MediumType");
case KMediumType_Writethrough: return QApplication::translate("VBoxGlobal", "Writethrough", "MediumType");
case KMediumType_Shareable: return QApplication::translate("VBoxGlobal", "Shareable", "MediumType");
case KMediumType_MultiAttach: return QApplication::translate("VBoxGlobal", "Multi-attach", "MediumType");
return QString();
switch (variant)
case KMediumVariant_Standard:
return QApplication::translate("VBoxGlobal", "Dynamically allocated differencing storage", "MediumVariant");
return QApplication::translate("VBoxGlobal", "Dynamically allocated storage split into files of less than 2GB", "MediumVariant");
return QApplication::translate("VBoxGlobal", "Dynamically allocated differencing storage split into files of less than 2GB", "MediumVariant");
return QApplication::translate("VBoxGlobal", "Fixed size storage split into files of less than 2GB", "MediumVariant");
return QApplication::translate("VBoxGlobal", "Dynamically allocated compressed storage", "MediumVariant");
case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_VmdkStreamOptimized | KMediumVariant_Diff):
return QApplication::translate("VBoxGlobal", "Dynamically allocated differencing compressed storage", "MediumVariant");
return QString();
switch (type)
case KNetworkAttachmentType_Null: return QApplication::translate("VBoxGlobal", "Not attached", "NetworkAttachmentType");
case KNetworkAttachmentType_NAT: return QApplication::translate("VBoxGlobal", "NAT", "NetworkAttachmentType");
case KNetworkAttachmentType_Bridged: return QApplication::translate("VBoxGlobal", "Bridged Adapter", "NetworkAttachmentType");
case KNetworkAttachmentType_Internal: return QApplication::translate("VBoxGlobal", "Internal Network", "NetworkAttachmentType");
case KNetworkAttachmentType_HostOnly: return QApplication::translate("VBoxGlobal", "Host-only Adapter", "NetworkAttachmentType");
case KNetworkAttachmentType_Generic: return QApplication::translate("VBoxGlobal", "Generic Driver", "NetworkAttachmentType");
case KNetworkAttachmentType_NATNetwork: return QApplication::translate("VBoxGlobal", "NAT Network", "NetworkAttachmentType");
return QString();
switch (type)
case KNetworkAdapterType_Am79C970A: return QApplication::translate("VBoxGlobal", "PCnet-PCI II (Am79C970A)", "NetworkAdapterType");
case KNetworkAdapterType_Am79C973: return QApplication::translate("VBoxGlobal", "PCnet-FAST III (Am79C973)", "NetworkAdapterType");
case KNetworkAdapterType_I82540EM: return QApplication::translate("VBoxGlobal", "Intel PRO/1000 MT Desktop (82540EM)", "NetworkAdapterType");
case KNetworkAdapterType_I82543GC: return QApplication::translate("VBoxGlobal", "Intel PRO/1000 T Server (82543GC)", "NetworkAdapterType");
case KNetworkAdapterType_I82545EM: return QApplication::translate("VBoxGlobal", "Intel PRO/1000 MT Server (82545EM)", "NetworkAdapterType");
#ifdef VBOX_WITH_VIRTIO
case KNetworkAdapterType_Virtio: return QApplication::translate("VBoxGlobal", "Paravirtualized Network (virtio-net)", "NetworkAdapterType");
return QString();
switch (policy)
return QString();
switch (mode)
case KPortMode_Disconnected: return QApplication::translate("VBoxGlobal", "Disconnected", "PortMode");
return QString();
switch (type)
case KUSBControllerType_OHCI: return QApplication::translate("VBoxGlobal", "OHCI", "USBControllerType");
case KUSBControllerType_EHCI: return QApplication::translate("VBoxGlobal", "EHCI", "USBControllerType");
case KUSBControllerType_XHCI: return QApplication::translate("VBoxGlobal", "xHCI", "USBControllerType");
return QString();
switch (state)
case KUSBDeviceState_NotSupported: return QApplication::translate("VBoxGlobal", "Not supported", "USBDeviceState");
case KUSBDeviceState_Unavailable: return QApplication::translate("VBoxGlobal", "Unavailable", "USBDeviceState");
case KUSBDeviceState_Available: return QApplication::translate("VBoxGlobal", "Available", "USBDeviceState");
case KUSBDeviceState_Captured: return QApplication::translate("VBoxGlobal", "Captured", "USBDeviceState");
return QString();
switch (action)
case KUSBDeviceFilterAction_Ignore: return QApplication::translate("VBoxGlobal", "Ignore", "USBDeviceFilterAction");
case KUSBDeviceFilterAction_Hold: return QApplication::translate("VBoxGlobal", "Hold", "USBDeviceFilterAction");
return QString();
switch (type)
case KAudioDriverType_Null: return QApplication::translate("VBoxGlobal", "Null Audio Driver", "AudioDriverType");
case KAudioDriverType_WinMM: return QApplication::translate("VBoxGlobal", "Windows Multimedia", "AudioDriverType");
case KAudioDriverType_OSS: return QApplication::translate("VBoxGlobal", "OSS Audio Driver", "AudioDriverType");
case KAudioDriverType_ALSA: return QApplication::translate("VBoxGlobal", "ALSA Audio Driver", "AudioDriverType");
case KAudioDriverType_DirectSound: return QApplication::translate("VBoxGlobal", "Windows DirectSound", "AudioDriverType");
case KAudioDriverType_CoreAudio: return QApplication::translate("VBoxGlobal", "CoreAudio", "AudioDriverType");
case KAudioDriverType_Pulse: return QApplication::translate("VBoxGlobal", "PulseAudio", "AudioDriverType");
case KAudioDriverType_SolAudio: return QApplication::translate("VBoxGlobal", "Solaris Audio", "AudioDriverType");
return QString();
switch (type)
case KAudioControllerType_AC97: return QApplication::translate("VBoxGlobal", "ICH AC97", "AudioControllerType");
case KAudioControllerType_SB16: return QApplication::translate("VBoxGlobal", "SoundBlaster 16", "AudioControllerType");
case KAudioControllerType_HDA: return QApplication::translate("VBoxGlobal", "Intel HD Audio", "AudioControllerType");
return QString();
switch (type)
return QString();
switch (bus)
return QString();
switch (type)
case KStorageControllerType_LsiLogic: return QApplication::translate("VBoxGlobal", "Lsilogic", "StorageControllerType");
case KStorageControllerType_BusLogic: return QApplication::translate("VBoxGlobal", "BusLogic", "StorageControllerType");
case KStorageControllerType_IntelAhci: return QApplication::translate("VBoxGlobal", "AHCI", "StorageControllerType");
case KStorageControllerType_PIIX3: return QApplication::translate("VBoxGlobal", "PIIX3", "StorageControllerType");
case KStorageControllerType_PIIX4: return QApplication::translate("VBoxGlobal", "PIIX4", "StorageControllerType");
case KStorageControllerType_ICH6: return QApplication::translate("VBoxGlobal", "ICH6", "StorageControllerType");
case KStorageControllerType_I82078: return QApplication::translate("VBoxGlobal", "I82078", "StorageControllerType");
case KStorageControllerType_LsiLogicSas: return QApplication::translate("VBoxGlobal", "LsiLogic SAS", "StorageControllerType");
case KStorageControllerType_USB: return QApplication::translate("VBoxGlobal", "USB", "StorageControllerType");
return QString();
switch (type)
return QString();
switch (protocol)
return QString();
switch (protocol)
return strResult;
return KNATProtocol_UDP;
list.insert(QApplication::translate("VBoxGlobal", "Disconnected", "PortMode"), KPortMode_Disconnected);
list.insert(QApplication::translate("VBoxGlobal", "Host Device", "PortMode"), KPortMode_HostDevice);
list.insert(QApplication::translate("VBoxGlobal", "Ignore", "USBDeviceFilterAction"), KUSBDeviceFilterAction_Ignore);
list.insert(QApplication::translate("VBoxGlobal", "Hold", "USBDeviceFilterAction"), KUSBDeviceFilterAction_Hold);
list.insert(QApplication::translate("VBoxGlobal", "Null Audio Driver", "AudioDriverType"), KAudioDriverType_Null);
list.insert(QApplication::translate("VBoxGlobal", "Windows Multimedia", "AudioDriverType"), KAudioDriverType_WinMM);
list.insert(QApplication::translate("VBoxGlobal", "OSS Audio Driver", "AudioDriverType"), KAudioDriverType_OSS);
list.insert(QApplication::translate("VBoxGlobal", "ALSA Audio Driver", "AudioDriverType"), KAudioDriverType_ALSA);
list.insert(QApplication::translate("VBoxGlobal", "Windows DirectSound", "AudioDriverType"), KAudioDriverType_DirectSound);
list.insert(QApplication::translate("VBoxGlobal", "CoreAudio", "AudioDriverType"), KAudioDriverType_CoreAudio);
list.insert(QApplication::translate("VBoxGlobal", "PulseAudio", "AudioDriverType"), KAudioDriverType_Pulse);
list.insert(QApplication::translate("VBoxGlobal", "Solaris Audio", "AudioDriverType"), KAudioDriverType_SolAudio);
list.insert(QApplication::translate("VBoxGlobal", "ICH AC97", "AudioControllerType"), KAudioControllerType_AC97);
list.insert(QApplication::translate("VBoxGlobal", "SoundBlaster 16", "AudioControllerType"), KAudioControllerType_SB16);
list.insert(QApplication::translate("VBoxGlobal", "Intel HD Audio", "AudioControllerType"), KAudioControllerType_HDA);
list.insert(QApplication::translate("VBoxGlobal", "Lsilogic", "StorageControllerType"), KStorageControllerType_LsiLogic);
list.insert(QApplication::translate("VBoxGlobal", "BusLogic", "StorageControllerType"), KStorageControllerType_BusLogic);
list.insert(QApplication::translate("VBoxGlobal", "AHCI", "StorageControllerType"), KStorageControllerType_IntelAhci);
list.insert(QApplication::translate("VBoxGlobal", "PIIX3", "StorageControllerType"), KStorageControllerType_PIIX3);
list.insert(QApplication::translate("VBoxGlobal", "PIIX4", "StorageControllerType"), KStorageControllerType_PIIX4);
list.insert(QApplication::translate("VBoxGlobal", "ICH6", "StorageControllerType"), KStorageControllerType_ICH6);
list.insert(QApplication::translate("VBoxGlobal", "I82078", "StorageControllerType"), KStorageControllerType_I82078);
list.insert(QApplication::translate("VBoxGlobal", "LsiLogic SAS", "StorageControllerType"), KStorageControllerType_LsiLogicSas);
list.insert(QApplication::translate("VBoxGlobal", "USB", "StorageControllerType"), KStorageControllerType_USB);