Index: /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.cpp	(revision 41850)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.cpp	(revision 41850)
@@ -0,0 +1,48 @@
+/* $Id$ */
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * UIConverter implementation
+ */
+
+/*
+ * Copyright (C) 2012 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/* GUI includes: */
+#include "UIConverter.h"
+
+/* static */
+UIConverter* UIConverter::m_spInstance = 0;
+
+/* static */
+void UIConverter::prepare()
+{
+    /* Make sure instance WAS NOT created yet: */
+    if (m_spInstance)
+        return;
+
+    /* Prepare instance: */
+    m_spInstance = new UIConverter;
+}
+
+/* static */
+void UIConverter::cleanup()
+{
+    /* Make sure instance WAS NOT destroyed yet: */
+    if (!m_spInstance)
+        return;
+
+    /* Cleanup instance: */
+    delete m_spInstance;
+    m_spInstance = 0;
+}
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.h	(revision 41850)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.h	(revision 41850)
@@ -0,0 +1,79 @@
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * UIConverter declaration
+ */
+
+/*
+ * Copyright (C) 2012 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifndef __UIConverter_h__
+#define __UIConverter_h__
+
+/* GUI includes: */
+#include "UIConverterBackend.h"
+
+/* High-level interface for different conversions between GUI classes: */
+class UIConverter
+{
+public:
+
+    /* Singleton instance: */
+    static UIConverter* instance() { return m_spInstance; }
+
+    /* Prepare/cleanup: */
+    static void prepare();
+    static void cleanup();
+
+    /* QColor <= template class: */
+    template<class T> QColor toColor(const T &data) const
+    {
+        if (canConvert<T>())
+            return ::toColor(data);
+        Assert(0); return QColor();
+    }
+
+    /* QPixmap <= template class: */
+    template<class T> QPixmap toPixmap(const T &data) const
+    {
+        if (canConvert<T>())
+            return ::toPixmap(data);
+        Assert(0); return QPixmap();
+    }
+
+    /* QString <= template class: */
+    template<class T> QString toString(const T &data) const
+    {
+        if (canConvert<T>())
+            return ::toString(data);
+        Assert(0); return QString();
+    }
+    /* Template class <= QString: */
+    template<class T> T fromString(const QString &strData) const
+    {
+        if (canConvert<T>())
+            return ::fromString<T>(strData);
+        Assert(0); return T();
+    }
+
+private:
+
+    /* Constructor: */
+    UIConverter() {}
+
+    /* Static instance: */
+    static UIConverter *m_spInstance;
+};
+#define gpConverter UIConverter::instance()
+
+#endif /* __UIConverter_h__ */
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h	(revision 41850)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h	(revision 41850)
@@ -0,0 +1,107 @@
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * UIConverterBackend declaration
+ */
+
+/*
+ * Copyright (C) 2012 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifndef __UIConverterBackend_h__
+#define __UIConverterBackend_h__
+
+/* Qt includes: */
+#include <QString>
+#include <QColor>
+#include <QPixmap>
+
+/* GUI includes: */
+#include "UIDefs.h"
+
+/* Determines if 'Object of type X' can be converted to object of other type.
+ * This function always returns 'false' until re-determined for specific object type. */
+template<class X> bool canConvert() { return false; }
+
+/* Converts passed 'Object X' to QColor.
+ * This function returns null QColor for any object type until re-determined for specific one. */
+template<class X> QColor toColor(const X & /* xobject */) { Assert(0); return QColor(); }
+
+/* Converts passed 'Object X' to QPixmap.
+ * This function returns null QPixmap for any object type until re-determined for specific one. */
+template<class X> QPixmap toPixmap(const X & /* xobject */) { Assert(0); return QPixmap(); }
+
+/* Converts passed 'Object of type X' to QString.
+ * This function returns null QString for any object type until re-determined for specific one. */
+template<class X> QString toString(const X & /* xobject */) { Assert(0); return QString(); }
+/* Converts passed QString to 'Object of type X'.
+ * This function returns default constructed object for any object type until re-determined for specific one. */
+template<class X> X fromString(const QString & /* strData */) { Assert(0); return X(); }
+
+/* Declare global canConvert specializations: */
+template<> bool canConvert<StorageSlot>();
+
+/* Declare COM canConvert specializations: */
+template<> bool canConvert<KMachineState>();
+template<> bool canConvert<KSessionState>();
+template<> bool canConvert<KDeviceType>();
+template<> bool canConvert<KClipboardMode>();
+template<> bool canConvert<KMediumType>();
+template<> bool canConvert<KMediumVariant>();
+template<> bool canConvert<KNetworkAttachmentType>();
+template<> bool canConvert<KNetworkAdapterType>();
+template<> bool canConvert<KNetworkAdapterPromiscModePolicy>();
+template<> bool canConvert<KPortMode>();
+template<> bool canConvert<KUSBDeviceState>();
+template<> bool canConvert<KUSBDeviceFilterAction>();
+template<> bool canConvert<KAudioDriverType>();
+template<> bool canConvert<KAudioControllerType>();
+template<> bool canConvert<KAuthType>();
+template<> bool canConvert<KStorageBus>();
+template<> bool canConvert<KStorageControllerType>();
+template<> bool canConvert<KChipsetType>();
+template<> bool canConvert<KNATProtocol>();
+
+/* Declare global conversion specializations: */
+template<> QString toString(const StorageSlot &storageSlot);
+template<> StorageSlot fromString<StorageSlot>(const QString &strStorageSlot);
+
+/* Declare COM conversion specializations: */
+template<> QColor toColor(const KMachineState &state);
+template<> QPixmap toPixmap(const KMachineState &state);
+template<> QString toString(const KMachineState &state);
+template<> QString toString(const KSessionState &state);
+template<> QString toString(const KDeviceType &type);
+template<> QString toString(const KClipboardMode &mode);
+template<> QString toString(const KMediumType &type);
+template<> QString toString(const KMediumVariant &variant);
+template<> QString toString(const KNetworkAttachmentType &type);
+template<> QString toString(const KNetworkAdapterType &type);
+template<> QString toString(const KNetworkAdapterPromiscModePolicy &policy);
+template<> QString toString(const KPortMode &mode);
+template<> QString toString(const KUSBDeviceState &state);
+template<> QString toString(const KUSBDeviceFilterAction &action);
+template<> QString toString(const KAudioDriverType &type);
+template<> QString toString(const KAudioControllerType &type);
+template<> QString toString(const KAuthType &type);
+template<> QString toString(const KStorageBus &bus);
+template<> QString toString(const KStorageControllerType &type);
+template<> QString toString(const KChipsetType &type);
+template<> QString toString(const KNATProtocol &protocol);
+template<> KPortMode fromString<KPortMode>(const QString &strMode);
+template<> KUSBDeviceFilterAction fromString<KUSBDeviceFilterAction>(const QString &strAction);
+template<> KAudioDriverType fromString<KAudioDriverType>(const QString &strType);
+template<> KAudioControllerType fromString<KAudioControllerType>(const QString &strType);
+template<> KAuthType fromString<KAuthType>(const QString &strType);
+template<> KStorageControllerType fromString<KStorageControllerType>(const QString &strType);
+
+#endif /* __UIConverterBackend_h__ */
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp	(revision 41850)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp	(revision 41850)
@@ -0,0 +1,537 @@
+/* $Id$ */
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * UIConverterBackend implementation
+ */
+
+/*
+ * Copyright (C) 2012 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/* Qt includes: */
+#include <QApplication>
+#include <QHash>
+
+/* GUI includes: */
+#include "UIConverterBackend.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+
+/* Determines if <Object of type X> can be converted to object of other type.
+ * These functions returns 'true' for all allowed conversions. */
+template<> bool canConvert<KMachineState>() { return true; }
+template<> bool canConvert<KSessionState>() { return true; }
+template<> bool canConvert<KDeviceType>() { return true; }
+template<> bool canConvert<KClipboardMode>() { return true; }
+template<> bool canConvert<KMediumType>() { return true; }
+template<> bool canConvert<KMediumVariant>() { return true; }
+template<> bool canConvert<KNetworkAttachmentType>() { return true; }
+template<> bool canConvert<KNetworkAdapterType>() { return true; }
+template<> bool canConvert<KNetworkAdapterPromiscModePolicy>() { return true; }
+template<> bool canConvert<KPortMode>() { return true; }
+template<> bool canConvert<KUSBDeviceState>() { return true; }
+template<> bool canConvert<KUSBDeviceFilterAction>() { return true; }
+template<> bool canConvert<KAudioDriverType>() { return true; }
+template<> bool canConvert<KAudioControllerType>() { return true; }
+template<> bool canConvert<KAuthType>() { return true; }
+template<> bool canConvert<KStorageBus>() { return true; }
+template<> bool canConvert<KStorageControllerType>() { return true; }
+template<> bool canConvert<KChipsetType>() { return true; }
+template<> bool canConvert<KNATProtocol>() { return true; }
+
+/* QColor <= KMachineState: */
+template<> QColor toColor(const KMachineState &state)
+{
+    switch (state)
+    {
+        case KMachineState_PoweredOff:             return QColor(Qt::gray);
+        case KMachineState_Saved:                  return QColor(Qt::yellow);
+        case KMachineState_Aborted:                return QColor(Qt::darkRed);
+        case KMachineState_Teleported:             return QColor(Qt::red);
+        case KMachineState_Running:                return QColor(Qt::green);
+        case KMachineState_Paused:                 return QColor(Qt::darkGreen);
+        case KMachineState_Stuck:                  return QColor(Qt::darkMagenta);
+        case KMachineState_Teleporting:            return QColor(Qt::blue);
+        case KMachineState_LiveSnapshotting:       return QColor(Qt::green);
+        case KMachineState_Starting:               return QColor(Qt::green);
+        case KMachineState_Stopping:               return QColor(Qt::green);
+        case KMachineState_Saving:                 return QColor(Qt::green);
+        case KMachineState_Restoring:              return QColor(Qt::green);
+        case KMachineState_TeleportingPausedVM:    return QColor(Qt::blue);
+        case KMachineState_TeleportingIn:          return QColor(Qt::blue);
+        // case KMachineState_FaultTolerantSyncing:
+        case KMachineState_DeletingSnapshotOnline: return QColor(Qt::green);
+        case KMachineState_DeletingSnapshotPaused: return QColor(Qt::darkGreen);
+        case KMachineState_RestoringSnapshot:      return QColor(Qt::green);
+        case KMachineState_DeletingSnapshot:       return QColor(Qt::green);
+        case KMachineState_SettingUp:              return QColor(Qt::green);
+        // case KMachineState_FirstOnline:
+        // case KMachineState_LastOnline:
+        // case KMachineState_FirstTransient:
+        // case KMachineState_LastTransient:
+        default: AssertMsgFailed(("No color for %d", state)); break;
+    }
+    return QColor();
+}
+
+/* QPixmap <= KMachineState: */
+template<> QPixmap toPixmap(const KMachineState &state)
+{
+    switch (state)
+    {
+        case KMachineState_PoweredOff:             return QPixmap(":/state_powered_off_16px.png");
+        case KMachineState_Saved:                  return QPixmap(":/state_saved_16px.png");
+        case KMachineState_Aborted:                return QPixmap(":/state_aborted_16px.png");
+        case KMachineState_Teleported:             return QPixmap(":/state_saved_16px.png");
+        case KMachineState_Running:                return QPixmap(":/state_running_16px.png");
+        case KMachineState_Paused:                 return QPixmap(":/state_paused_16px.png");
+        case KMachineState_Stuck:                  return QPixmap(":/state_stuck_16px.png");
+        case KMachineState_Teleporting:            return QPixmap(":/state_running_16px.png");
+        case KMachineState_LiveSnapshotting:       return QPixmap(":/state_running_16px.png");
+        case KMachineState_Starting:               return QPixmap(":/state_running_16px.png");
+        case KMachineState_Stopping:               return QPixmap(":/state_running_16px.png");
+        case KMachineState_Saving:                 return QPixmap(":/state_saving_16px.png");
+        case KMachineState_Restoring:              return QPixmap(":/state_restoring_16px.png");
+        case KMachineState_TeleportingPausedVM:    return QPixmap(":/state_saving_16px.png");
+        case KMachineState_TeleportingIn:          return QPixmap(":/state_restoring_16px.png");
+        // case KMachineState_FaultTolerantSyncing:
+        case KMachineState_DeletingSnapshotOnline: return QPixmap(":/state_discarding_16px.png");
+        case KMachineState_DeletingSnapshotPaused: return QPixmap(":/state_discarding_16px.png");
+        case KMachineState_RestoringSnapshot:      return QPixmap(":/state_discarding_16px.png");
+        case KMachineState_DeletingSnapshot:       return QPixmap(":/state_discarding_16px.png");
+        case KMachineState_SettingUp:              return QPixmap(":/settings_16px.png");
+        // case KMachineState_FirstOnline:
+        // case KMachineState_LastOnline:
+        // case KMachineState_FirstTransient:
+        // case KMachineState_LastTransient:
+        default: AssertMsgFailed(("No pixmap for %d", state)); break;
+    }
+    return QPixmap();
+}
+
+/* QString <= KMachineState: */
+template<> QString toString(const KMachineState &state)
+{
+    switch (state)
+    {
+        case KMachineState_PoweredOff:             return QApplication::translate("VBoxGlobal", "Powered Off", "MachineState");
+        case KMachineState_Saved:                  return QApplication::translate("VBoxGlobal", "Saved", "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_Paused:                 return QApplication::translate("VBoxGlobal", "Paused", "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_Saving:                 return QApplication::translate("VBoxGlobal", "Saving", "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");
+        // case KMachineState_FirstOnline:
+        // case KMachineState_LastOnline:
+        // case KMachineState_FirstTransient:
+        // case KMachineState_LastTransient:
+        default: AssertMsgFailed(("No text for %d", state)); break;
+    }
+    return QString();
+}
+
+/* QString <= KSessionState: */
+template<> QString toString(const KSessionState &state)
+{
+    switch (state)
+    {
+        case KSessionState_Unlocked:  return QApplication::translate("VBoxGlobal", "Unlocked", "SessionState");
+        case KSessionState_Locked:    return QApplication::translate("VBoxGlobal", "Locked", "SessionState");
+        case KSessionState_Spawning:  return QApplication::translate("VBoxGlobal", "Spawning", "SessionState");
+        case KSessionState_Unlocking: return QApplication::translate("VBoxGlobal", "Unlocking", "SessionState");
+        default: AssertMsgFailed(("No text for %d", state)); break;
+    }
+    return QString();
+}
+
+/* QString <= KDeviceType: */
+template<> QString toString(const KDeviceType &type)
+{
+    switch (type)
+    {
+        case KDeviceType_Null:         return QApplication::translate("VBoxGlobal", "None", "DeviceType");
+        case KDeviceType_Floppy:       return QApplication::translate("VBoxGlobal", "Floppy", "DeviceType");
+        case KDeviceType_DVD:          return QApplication::translate("VBoxGlobal", "CD/DVD-ROM", "DeviceType");
+        case KDeviceType_HardDisk:     return QApplication::translate("VBoxGlobal", "Hard Disk", "DeviceType");
+        case KDeviceType_Network:      return QApplication::translate("VBoxGlobal", "Network", "DeviceType");
+        case KDeviceType_USB:          return QApplication::translate("VBoxGlobal", "USB", "DeviceType");
+        case KDeviceType_SharedFolder: return QApplication::translate("VBoxGlobal", "Shared Folder", "DeviceType");
+        default: AssertMsgFailed(("No text for %d", type)); break;
+    }
+    return QString();
+}
+
+/* QString <= KClipboardMode: */
+template<> QString toString(const KClipboardMode &mode)
+{
+    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");
+        default: AssertMsgFailed(("No text for %d", mode)); break;
+    }
+    return QString();
+}
+
+/* QString <= KMediumType: */
+template<> QString toString(const KMediumType &type)
+{
+    switch (type)
+    {
+        case KMediumType_Normal:       return QApplication::translate("VBoxGlobal", "Normal", "MediumType");
+        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_Readonly:     return QApplication::translate("VBoxGlobal", "Readonly", "MediumType");
+        case KMediumType_MultiAttach:  return QApplication::translate("VBoxGlobal", "Multi-attach", "MediumType");
+        default: AssertMsgFailed(("No text for %d", type)); break;
+    }
+    return QString();
+}
+
+/* QString <= KMediumVariant: */
+template<> QString toString(const KMediumVariant &variant)
+{
+    /* Note: KMediumVariant_Diff and KMediumVariant_Fixed are so far mutually exclusive: */
+    switch (variant)
+    {
+        case KMediumVariant_Standard:
+            return QApplication::translate("VBoxGlobal", "Dynamically allocated storage", "MediumVariant");
+        case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_Diff):
+            return QApplication::translate("VBoxGlobal", "Dynamically allocated differencing storage", "MediumVariant");
+        case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_Fixed):
+            return QApplication::translate("VBoxGlobal", "Fixed size storage", "MediumVariant");
+        case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_VmdkSplit2G):
+            return QApplication::translate("VBoxGlobal", "Dynamically allocated storage split into files of less than 2GB", "MediumVariant");
+        case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_VmdkSplit2G | KMediumVariant_Diff):
+            return QApplication::translate("VBoxGlobal", "Dynamically allocated differencing storage split into files of less than 2GB", "MediumVariant");
+        case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_Fixed | KMediumVariant_VmdkSplit2G):
+            return QApplication::translate("VBoxGlobal", "Fixed size storage split into files of less than 2GB", "MediumVariant");
+        case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_VmdkStreamOptimized):
+            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");
+        case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_Fixed | KMediumVariant_VmdkESX):
+            return QApplication::translate("VBoxGlobal", "Fixed size ESX storage", "MediumVariant");
+        default:
+            AssertMsgFailed(("No text for %d", variant)); break;
+    }
+    return QString();
+}
+
+/* QString <= KNetworkAttachmentType: */
+template<> QString toString(const KNetworkAttachmentType &type)
+{
+    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");
+        default: AssertMsgFailed(("No text for %d", type)); break;
+    }
+    return QString();
+}
+
+/* QString <= KNetworkAdapterType: */
+template<> QString toString(const KNetworkAdapterType &type)
+{
+    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");
+#endif /* VBOX_WITH_VIRTIO */
+        default: AssertMsgFailed(("No text for %d", type)); break;
+    }
+    return QString();
+}
+
+/* QString <= KNetworkAdapterPromiscModePolicy: */
+template<> QString toString(const KNetworkAdapterPromiscModePolicy &policy)
+{
+    switch (policy)
+    {
+        case KNetworkAdapterPromiscModePolicy_Deny:
+            return QApplication::translate("VBoxGlobal", "Deny", "NetworkAdapterPromiscModePolicy");
+        case KNetworkAdapterPromiscModePolicy_AllowNetwork:
+            return QApplication::translate("VBoxGlobal", "Allow VMs", "NetworkAdapterPromiscModePolicy");
+        case KNetworkAdapterPromiscModePolicy_AllowAll:
+            return QApplication::translate("VBoxGlobal", "Allow All", "NetworkAdapterPromiscModePolicy");
+        default:
+            AssertMsgFailed(("No text for %d", policy)); break;
+    }
+    return QString();
+}
+
+/* QString <= KPortMode: */
+template<> QString toString(const KPortMode &mode)
+{
+    switch (mode)
+    {
+        case KPortMode_Disconnected: return QApplication::translate("VBoxGlobal", "Disconnected", "PortMode");
+        case KPortMode_HostPipe:     return QApplication::translate("VBoxGlobal", "Host Pipe", "PortMode");
+        case KPortMode_HostDevice:   return QApplication::translate("VBoxGlobal", "Host Device", "PortMode");
+        case KPortMode_RawFile:      return QApplication::translate("VBoxGlobal", "Raw File", "PortMode");
+        AssertMsgFailed(("No text for %d", mode)); break;
+    }
+    return QString();
+}
+
+/* QString <= KUSBDeviceState: */
+template<> QString toString(const KUSBDeviceState &state)
+{
+    switch (state)
+    {
+        case KUSBDeviceState_NotSupported: return QApplication::translate("VBoxGlobal", "Not supported", "USBDeviceState");
+        case KUSBDeviceState_Unavailable:  return QApplication::translate("VBoxGlobal", "Unavailable", "USBDeviceState");
+        case KUSBDeviceState_Busy:         return QApplication::translate("VBoxGlobal", "Busy", "USBDeviceState");
+        case KUSBDeviceState_Available:    return QApplication::translate("VBoxGlobal", "Available", "USBDeviceState");
+        case KUSBDeviceState_Held:         return QApplication::translate("VBoxGlobal", "Held", "USBDeviceState");
+        case KUSBDeviceState_Captured:     return QApplication::translate("VBoxGlobal", "Captured", "USBDeviceState");
+        AssertMsgFailed(("No text for %d", state)); break;
+    }
+    return QString();
+}
+
+/* QString <= KUSBDeviceFilterAction: */
+template<> QString toString(const KUSBDeviceFilterAction &action)
+{
+    switch (action)
+    {
+        case KUSBDeviceFilterAction_Ignore: return QApplication::translate("VBoxGlobal", "Ignore", "USBDeviceFilterAction");
+        case KUSBDeviceFilterAction_Hold:   return QApplication::translate("VBoxGlobal", "Hold", "USBDeviceFilterAction");
+        AssertMsgFailed(("No text for %d", action)); break;
+    }
+    return QString();
+}
+
+/* QString <= KAudioDriverType: */
+template<> QString toString(const KAudioDriverType &type)
+{
+    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_MMPM:
+        case KAudioDriverType_Pulse:       return QApplication::translate("VBoxGlobal", "PulseAudio", "AudioDriverType");
+        case KAudioDriverType_SolAudio:    return QApplication::translate("VBoxGlobal", "Solaris Audio", "AudioDriverType");
+        AssertMsgFailed(("No text for %d", type)); break;
+    }
+    return QString();
+}
+
+/* QString <= KAudioControllerType: */
+template<> QString toString(const KAudioControllerType &type)
+{
+    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");
+        AssertMsgFailed(("No text for %d", type)); break;
+    }
+    return QString();
+}
+
+/* QString <= KAuthType: */
+template<> QString toString(const KAuthType &type)
+{
+    switch (type)
+    {
+        case KAuthType_Null:     return QApplication::translate("VBoxGlobal", "Null", "AuthType");
+        case KAuthType_External: return QApplication::translate("VBoxGlobal", "External", "AuthType");
+        case KAuthType_Guest:    return QApplication::translate("VBoxGlobal", "Guest", "AuthType");
+        AssertMsgFailed(("No text for %d", type)); break;
+    }
+    return QString();
+}
+
+/* QString <= KStorageBus: */
+template<> QString toString(const KStorageBus &bus)
+{
+    switch (bus)
+    {
+        case KStorageBus_IDE:    return QApplication::translate("VBoxGlobal", "IDE", "StorageBus");
+        case KStorageBus_SATA:   return QApplication::translate("VBoxGlobal", "SATA", "StorageBus");
+        case KStorageBus_SCSI:   return QApplication::translate("VBoxGlobal", "SCSI", "StorageBus");
+        case KStorageBus_Floppy: return QApplication::translate("VBoxGlobal", "Floppy", "StorageBus");
+        case KStorageBus_SAS:    return QApplication::translate("VBoxGlobal", "SAS", "StorageBus");
+        AssertMsgFailed(("No text for %d", bus)); break;
+    }
+    return QString();
+}
+
+/* QString <= KStorageControllerType: */
+template<> QString toString(const KStorageControllerType &type)
+{
+    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");
+        AssertMsgFailed(("No text for %d", type)); break;
+    }
+    return QString();
+}
+
+/* QString <= KChipsetType: */
+template<> QString toString(const KChipsetType &type)
+{
+    switch (type)
+    {
+        case KChipsetType_PIIX3: return QApplication::translate("VBoxGlobal", "PIIX3", "ChipsetType");
+        case KChipsetType_ICH9:  return QApplication::translate("VBoxGlobal", "ICH9", "ChipsetType");
+        AssertMsgFailed(("No text for %d", type)); break;
+    }
+    return QString();
+}
+
+/* QString <= KNATProtocol: */
+template<> QString toString(const KNATProtocol &protocol)
+{
+    switch (protocol)
+    {
+        case KNATProtocol_UDP: return QApplication::translate("VBoxGlobal", "UDP", "NATProtocol");
+        case KNATProtocol_TCP: return QApplication::translate("VBoxGlobal", "TCP", "NATProtocol");
+        AssertMsgFailed(("No text for %d", protocol)); break;
+    }
+    return QString();
+}
+
+/* KPortMode <= QString: */
+template<> KPortMode fromString<KPortMode>(const QString &strMode)
+{
+    QHash<QString, KPortMode> list;
+    list.insert(QApplication::translate("VBoxGlobal", "Disconnected", "PortMode"), KPortMode_Disconnected);
+    list.insert(QApplication::translate("VBoxGlobal", "Host Pipe", "PortMode"),    KPortMode_HostPipe);
+    list.insert(QApplication::translate("VBoxGlobal", "Host Device", "PortMode"),  KPortMode_HostDevice);
+    list.insert(QApplication::translate("VBoxGlobal", "Raw File", "PortMode"),     KPortMode_RawFile);
+    if (!list.contains(strMode))
+    {
+        AssertMsgFailed(("No value for '%s'", strMode.toAscii().constData()));
+    }
+    return list.value(strMode, KPortMode_Disconnected);
+}
+
+/* KUSBDeviceFilterAction <= QString: */
+template<> KUSBDeviceFilterAction fromString<KUSBDeviceFilterAction>(const QString &strAction)
+{
+    QHash<QString, KUSBDeviceFilterAction> list;
+    list.insert(QApplication::translate("VBoxGlobal", "Ignore", "USBDeviceFilterAction"), KUSBDeviceFilterAction_Ignore);
+    list.insert(QApplication::translate("VBoxGlobal", "Hold", "USBDeviceFilterAction"),   KUSBDeviceFilterAction_Hold);
+    if (!list.contains(strAction))
+    {
+        AssertMsgFailed(("No value for '%s'", strAction.toAscii().constData()));
+    }
+    return list.value(strAction, KUSBDeviceFilterAction_Null);
+}
+
+/* KAudioDriverType <= QString: */
+template<> KAudioDriverType fromString<KAudioDriverType>(const QString &strType)
+{
+    QHash<QString, KAudioDriverType> list;
+    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(..., KAudioDriverType_MMPM);
+    list.insert(QApplication::translate("VBoxGlobal", "PulseAudio", "AudioDriverType"),          KAudioDriverType_Pulse);
+    list.insert(QApplication::translate("VBoxGlobal", "Solaris Audio", "AudioDriverType"),       KAudioDriverType_SolAudio);
+    if (!list.contains(strType))
+    {
+        AssertMsgFailed(("No value for '%s'", strType.toAscii().constData()));
+    }
+    return list.value(strType, KAudioDriverType_Null);
+}
+
+/* KAudioControllerType <= QString: */
+template<> KAudioControllerType fromString<KAudioControllerType>(const QString &strType)
+{
+    QHash<QString, KAudioControllerType> list;
+    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);
+    if (!list.contains(strType))
+    {
+        AssertMsgFailed(("No value for '%s'", strType.toAscii().constData()));
+    }
+    return list.value(strType, KAudioControllerType_AC97);
+}
+
+/* KAuthType <= QString: */
+template<> KAuthType fromString<KAuthType>(const QString &strType)
+{
+    QHash<QString, KAuthType> list;
+    list.insert(QApplication::translate("VBoxGlobal", "Null", "AuthType"),     KAuthType_Null);
+    list.insert(QApplication::translate("VBoxGlobal", "External", "AuthType"), KAuthType_External);
+    list.insert(QApplication::translate("VBoxGlobal", "Guest", "AuthType"),    KAuthType_Guest);
+    if (!list.contains(strType))
+    {
+        AssertMsgFailed(("No value for '%s'", strType.toAscii().constData()));
+    }
+    return list.value(strType, KAuthType_Null);
+}
+
+/* KStorageControllerType <= QString: */
+template<> KStorageControllerType fromString<KStorageControllerType>(const QString &strType)
+{
+    QHash<QString, KStorageControllerType> list;
+    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);
+    if (!list.contains(strType))
+    {
+        AssertMsgFailed(("No value for '%s'", strType.toAscii().constData()));
+    }
+    return list.value(strType, KStorageControllerType_Null);
+}
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp	(revision 41850)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp	(revision 41850)
@@ -0,0 +1,262 @@
+/* $Id$ */
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * UIConverterBackendGlobal implementation
+ */
+
+/*
+ * Copyright (C) 2012 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/* Qt includes: */
+#include <QApplication>
+#include <QHash>
+
+/* GUI includes: */
+#include "UIConverterBackend.h"
+#include "VBoxGlobal.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
+
+/* Determines if <Object of type X> can be converted to object of other type.
+ * These functions returns 'true' for all allowed conversions. */
+template<> bool canConvert<StorageSlot>() { return true; }
+
+/* QString <= StorageSlot: */
+template<> QString toString(const StorageSlot &storageSlot)
+{
+    QString strResult;
+    switch (storageSlot.bus)
+    {
+        case KStorageBus_IDE:
+        {
+            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);
+            int iMaxDevice = vboxGlobal().virtualBox().GetSystemProperties().GetMaxDevicesPerPortForStorageBus(storageSlot.bus);
+            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d", storageSlot.bus, storageSlot.port));
+                break;
+            }
+            if (storageSlot.device < 0 || storageSlot.device > iMaxDevice)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d & device=%d", storageSlot.bus, storageSlot.port, storageSlot.device));
+                break;
+            }
+            if (storageSlot.port == 0 && storageSlot.device == 0)
+                strResult = QApplication::translate("VBoxGlobal", "IDE Primary Master", "StorageSlot");
+            else if (storageSlot.port == 0 && storageSlot.device == 1)
+                strResult = QApplication::translate("VBoxGlobal", "IDE Primary Slave", "StorageSlot");
+            else if (storageSlot.port == 1 && storageSlot.device == 0)
+                strResult = QApplication::translate("VBoxGlobal", "IDE Secondary Master", "StorageSlot");
+            else if (storageSlot.port == 1 && storageSlot.device == 1)
+                strResult = QApplication::translate("VBoxGlobal", "IDE Secondary Slave", "StorageSlot");
+            break;
+        }
+        case KStorageBus_SATA:
+        {
+            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);
+            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d", storageSlot.bus, storageSlot.port));
+                break;
+            }
+            if (storageSlot.device != 0)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d & device=%d", storageSlot.bus, storageSlot.port, storageSlot.device));
+                break;
+            }
+            strResult = QApplication::translate("VBoxGlobal", "SATA Port %1", "StorageSlot").arg(storageSlot.port);
+            break;
+        }
+        case KStorageBus_SCSI:
+        {
+            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);
+            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d", storageSlot.bus, storageSlot.port));
+                break;
+            }
+            if (storageSlot.device != 0)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d & device=%d", storageSlot.bus, storageSlot.port, storageSlot.device));
+                break;
+            }
+            strResult = QApplication::translate("VBoxGlobal", "SCSI Port %1", "StorageSlot").arg(storageSlot.port);
+            break;
+        }
+        case KStorageBus_SAS:
+        {
+            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);
+            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d", storageSlot.bus, storageSlot.port));
+                break;
+            }
+            if (storageSlot.device != 0)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d & device=%d", storageSlot.bus, storageSlot.port, storageSlot.device));
+                break;
+            }
+            strResult = QApplication::translate("VBoxGlobal", "SAS Port %1", "StorageSlot").arg(storageSlot.port);
+            break;
+        }
+        case KStorageBus_Floppy:
+        {
+            int iMaxDevice = vboxGlobal().virtualBox().GetSystemProperties().GetMaxDevicesPerPortForStorageBus(storageSlot.bus);
+            if (storageSlot.port != 0)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d", storageSlot.bus, storageSlot.port));
+                break;
+            }
+            if (storageSlot.device < 0 || storageSlot.device > iMaxDevice)
+            {
+                AssertMsgFailed(("No text for bus=%d & port=%d & device=%d", storageSlot.bus, storageSlot.port, storageSlot.device));
+                break;
+            }
+            strResult = QApplication::translate("VBoxGlobal", "Floppy Device %1", "StorageSlot").arg(storageSlot.device);
+            break;
+        }
+        default:
+        {
+            AssertMsgFailed(("No text for bus=%d & port=% & device=%d", storageSlot.bus, storageSlot.port, storageSlot.device));
+            break;
+        }
+    }
+    return strResult;
+}
+
+/* StorageSlot <= QString: */
+template<> StorageSlot fromString<StorageSlot>(const QString &strStorageSlot)
+{
+    QHash<int, QString> list;
+    list[0] = QApplication::translate("VBoxGlobal", "IDE Primary Master", "StorageSlot");
+    list[1] = QApplication::translate("VBoxGlobal", "IDE Primary Slave", "StorageSlot");
+    list[2] = QApplication::translate("VBoxGlobal", "IDE Secondary Master", "StorageSlot");
+    list[3] = QApplication::translate("VBoxGlobal", "IDE Secondary Slave", "StorageSlot");
+    list[4] = QApplication::translate("VBoxGlobal", "SATA Port %1", "StorageSlot");
+    list[5] = QApplication::translate("VBoxGlobal", "SCSI Port %1", "StorageSlot");
+    list[6] = QApplication::translate("VBoxGlobal", "SAS Port %1", "StorageSlot");
+    list[7] = QApplication::translate("VBoxGlobal", "Floppy Device %1", "StorageSlot");
+    int index = -1;
+    QRegExp regExp;
+    for (int i = 0; i < list.size(); ++i)
+    {
+        regExp = QRegExp(i >= 0 && i <= 3 ? list[i] : list[i].arg("(\\d+)"));
+        if (regExp.indexIn(strStorageSlot) != -1)
+        {
+            index = i;
+            break;
+        }
+    }
+
+    StorageSlot result;
+    switch (index)
+    {
+        case 0:
+        case 1:
+        case 2:
+        case 3:
+        {
+            KStorageBus bus = KStorageBus_IDE;
+            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(bus);
+            int iMaxDevice = vboxGlobal().virtualBox().GetSystemProperties().GetMaxDevicesPerPortForStorageBus(bus);
+            LONG iPort = index / iMaxPort;
+            LONG iDevice = index % iMaxPort;
+            if (iPort < 0 || iPort > iMaxPort)
+            {
+                AssertMsgFailed(("No storage slot for text='%s'", strStorageSlot.toAscii().constData()));
+                break;
+            }
+            if (iDevice < 0 || iDevice > iMaxDevice)
+            {
+                AssertMsgFailed(("No storage slot for text='%s'", strStorageSlot.toAscii().constData()));
+                break;
+            }
+            result.bus = bus;
+            result.port = iPort;
+            result.device = iDevice;
+            break;
+        }
+        case 4:
+        {
+            KStorageBus bus = KStorageBus_SATA;
+            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(bus);
+            LONG iPort = regExp.cap(1).toInt();
+            LONG iDevice = 0;
+            if (iPort < 0 || iPort > iMaxPort)
+            {
+                AssertMsgFailed(("No storage slot for text='%s'", strStorageSlot.toAscii().constData()));
+                break;
+            }
+            result.bus = bus;
+            result.port = iPort;
+            result.device = iDevice;
+            break;
+        }
+        case 5:
+        {
+            KStorageBus bus = KStorageBus_SCSI;
+            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(bus);
+            LONG iPort = regExp.cap(1).toInt();
+            LONG iDevice = 0;
+            if (iPort < 0 || iPort > iMaxPort)
+            {
+                AssertMsgFailed(("No storage slot for text='%s'", strStorageSlot.toAscii().constData()));
+                break;
+            }
+            result.bus = bus;
+            result.port = iPort;
+            result.device = iDevice;
+            break;
+        }
+        case 6:
+        {
+            KStorageBus bus = KStorageBus_SAS;
+            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(bus);
+            LONG iPort = regExp.cap(1).toInt();
+            LONG iDevice = 0;
+            if (iPort < 0 || iPort > iMaxPort)
+            {
+                AssertMsgFailed(("No storage slot for text='%s'", strStorageSlot.toAscii().constData()));
+                break;
+            }
+            result.bus = bus;
+            result.port = iPort;
+            result.device = iDevice;
+            break;
+        }
+        case 7:
+        {
+            KStorageBus bus = KStorageBus_Floppy;
+            int iMaxDevice = vboxGlobal().virtualBox().GetSystemProperties().GetMaxDevicesPerPortForStorageBus(bus);
+            LONG iPort = 0;
+            LONG iDevice = regExp.cap(1).toInt();
+            if (iDevice < 0 || iDevice > iMaxDevice)
+            {
+                AssertMsgFailed(("No storage slot for text='%s'", strStorageSlot.toAscii().constData()));
+                break;
+            }
+            result.bus = bus;
+            result.port = iPort;
+            result.device = iDevice;
+            break;
+        }
+        default:
+        {
+            AssertMsgFailed(("No storage slot for text='%s'", strStorageSlot.toAscii().constData()));
+            break;
+        }
+    }
+    return result;
+}
+
