UIConverterBackendCOM.cpp revision 6a746127f59129bb9f153ddf45a1ac093bc48ec2
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* $Id$ */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/** @file
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync *
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * VBox frontends: Qt GUI ("VirtualBox"):
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * UIConverterBackend implementation
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/*
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * Copyright (C) 2012 Oracle Corporation
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync *
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * available from http://www.virtualbox.org. This file is free software;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * you can redistribute it and/or modify it under the terms of the GNU
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * General Public License (GPL) as published by the Free Software
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* Qt includes: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync#include <QApplication>
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync#include <QHash>
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* GUI includes: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync#include "UIConverterBackend.h"
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* COM includes: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync#include "COMEnums.h"
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* Determines if <Object of type X> can be converted to object of other type.
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync * These functions returns 'true' for all allowed conversions. */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KMachineState>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KSessionState>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KDeviceType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KClipboardMode>() { return true; }
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsynctemplate<> bool canConvert<KDragAndDropMode>() { return true; }
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsynctemplate<> bool canConvert<KPointingHIDType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KMediumType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KMediumVariant>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KNetworkAttachmentType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KNetworkAdapterType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KNetworkAdapterPromiscModePolicy>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KPortMode>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KUSBDeviceState>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KUSBDeviceFilterAction>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KAudioDriverType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KAudioControllerType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KAuthType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KStorageBus>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KStorageControllerType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KChipsetType>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> bool canConvert<KNATProtocol>() { return true; }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QColor <= KMachineState: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QColor toColor(const KMachineState &state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_PoweredOff: return QColor(Qt::gray);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Saved: return QColor(Qt::yellow);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Aborted: return QColor(Qt::darkRed);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Teleported: return QColor(Qt::red);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Running: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Paused: return QColor(Qt::darkGreen);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Stuck: return QColor(Qt::darkMagenta);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Teleporting: return QColor(Qt::blue);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_LiveSnapshotting: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Starting: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Stopping: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Saving: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Restoring: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_TeleportingPausedVM: return QColor(Qt::blue);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_TeleportingIn: return QColor(Qt::blue);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_FaultTolerantSyncing:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_DeletingSnapshotOnline: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_DeletingSnapshotPaused: return QColor(Qt::darkGreen);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_RestoringSnapshot: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_DeletingSnapshot: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_SettingUp: return QColor(Qt::green);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_FirstOnline:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_LastOnline:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_FirstTransient:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_LastTransient:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default: AssertMsgFailed(("No color for %d", state)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QColor();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QPixmap <= KMachineState: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QPixmap toPixmap(const KMachineState &state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_PoweredOff: return QPixmap(":/state_powered_off_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Saved: return QPixmap(":/state_saved_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Aborted: return QPixmap(":/state_aborted_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Teleported: return QPixmap(":/state_saved_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Running: return QPixmap(":/state_running_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Paused: return QPixmap(":/state_paused_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Stuck: return QPixmap(":/state_stuck_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Teleporting: return QPixmap(":/state_running_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_LiveSnapshotting: return QPixmap(":/state_running_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Starting: return QPixmap(":/state_running_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Stopping: return QPixmap(":/state_running_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Saving: return QPixmap(":/state_saving_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Restoring: return QPixmap(":/state_restoring_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_TeleportingPausedVM: return QPixmap(":/state_saving_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_TeleportingIn: return QPixmap(":/state_restoring_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_FaultTolerantSyncing:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_DeletingSnapshotOnline: return QPixmap(":/state_discarding_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_DeletingSnapshotPaused: return QPixmap(":/state_discarding_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_RestoringSnapshot: return QPixmap(":/state_discarding_16px.png");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_DeletingSnapshot: return QPixmap(":/state_discarding_16px.png");
aee625e805c79f14fbefcf212d05e4c41c266f01vboxsync case KMachineState_SettingUp: return QPixmap(":/vm_settings_16px.png"); // TODO: Change icon!
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_FirstOnline:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_LastOnline:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_FirstTransient:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_LastTransient:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default: AssertMsgFailed(("No pixmap for %d", state)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QPixmap();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KMachineState: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KMachineState &state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_PoweredOff: return QApplication::translate("VBoxGlobal", "Powered Off", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Saved: return QApplication::translate("VBoxGlobal", "Saved", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Aborted: return QApplication::translate("VBoxGlobal", "Aborted", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Teleported: return QApplication::translate("VBoxGlobal", "Teleported", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Running: return QApplication::translate("VBoxGlobal", "Running", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Paused: return QApplication::translate("VBoxGlobal", "Paused", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Stuck: return QApplication::translate("VBoxGlobal", "Guru Meditation", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Teleporting: return QApplication::translate("VBoxGlobal", "Teleporting", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_LiveSnapshotting: return QApplication::translate("VBoxGlobal", "Taking Live Snapshot", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Starting: return QApplication::translate("VBoxGlobal", "Starting", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Stopping: return QApplication::translate("VBoxGlobal", "Stopping", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Saving: return QApplication::translate("VBoxGlobal", "Saving", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_Restoring: return QApplication::translate("VBoxGlobal", "Restoring", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_TeleportingPausedVM: return QApplication::translate("VBoxGlobal", "Teleporting Paused VM", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_TeleportingIn: return QApplication::translate("VBoxGlobal", "Teleporting", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_FaultTolerantSyncing: return QApplication::translate("VBoxGlobal", "Fault Tolerant Syncing", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_DeletingSnapshotOnline: return QApplication::translate("VBoxGlobal", "Deleting Snapshot", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_DeletingSnapshotPaused: return QApplication::translate("VBoxGlobal", "Deleting Snapshot", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_RestoringSnapshot: return QApplication::translate("VBoxGlobal", "Restoring Snapshot", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_DeletingSnapshot: return QApplication::translate("VBoxGlobal", "Deleting Snapshot", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMachineState_SettingUp: return QApplication::translate("VBoxGlobal", "Setting Up", "MachineState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_FirstOnline:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_LastOnline:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_FirstTransient:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KMachineState_LastTransient:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default: AssertMsgFailed(("No text for %d", state)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KSessionState: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KSessionState &state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KSessionState_Unlocked: return QApplication::translate("VBoxGlobal", "Unlocked", "SessionState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KSessionState_Locked: return QApplication::translate("VBoxGlobal", "Locked", "SessionState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KSessionState_Spawning: return QApplication::translate("VBoxGlobal", "Spawning", "SessionState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KSessionState_Unlocking: return QApplication::translate("VBoxGlobal", "Unlocking", "SessionState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default: AssertMsgFailed(("No text for %d", state)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KDeviceType: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KDeviceType &type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KDeviceType_Null: return QApplication::translate("VBoxGlobal", "None", "DeviceType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KDeviceType_Floppy: return QApplication::translate("VBoxGlobal", "Floppy", "DeviceType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KDeviceType_DVD: return QApplication::translate("VBoxGlobal", "CD/DVD-ROM", "DeviceType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KDeviceType_HardDisk: return QApplication::translate("VBoxGlobal", "Hard Disk", "DeviceType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KDeviceType_Network: return QApplication::translate("VBoxGlobal", "Network", "DeviceType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KDeviceType_USB: return QApplication::translate("VBoxGlobal", "USB", "DeviceType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KDeviceType_SharedFolder: return QApplication::translate("VBoxGlobal", "Shared Folder", "DeviceType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default: AssertMsgFailed(("No text for %d", type)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KClipboardMode: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KClipboardMode &mode)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (mode)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KClipboardMode_Disabled: return QApplication::translate("VBoxGlobal", "Disabled", "ClipboardType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KClipboardMode_HostToGuest: return QApplication::translate("VBoxGlobal", "Host To Guest", "ClipboardType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KClipboardMode_GuestToHost: return QApplication::translate("VBoxGlobal", "Guest To Host", "ClipboardType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KClipboardMode_Bidirectional: return QApplication::translate("VBoxGlobal", "Bidirectional", "ClipboardType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default: AssertMsgFailed(("No text for %d", mode)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync/* QString <= KDragAndDropMode: */
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsynctemplate<> QString toString(const KDragAndDropMode &mode)
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync{
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync switch (mode)
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync {
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync case KDragAndDropMode_Disabled: return QApplication::translate("VBoxGlobal", "Disabled", "DragAndDropType");
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync case KDragAndDropMode_HostToGuest: return QApplication::translate("VBoxGlobal", "Host To Guest", "DragAndDropType");
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync case KDragAndDropMode_GuestToHost: return QApplication::translate("VBoxGlobal", "Guest To Host", "DragAndDropType");
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync case KDragAndDropMode_Bidirectional: return QApplication::translate("VBoxGlobal", "Bidirectional", "DragAndDropType");
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync default: AssertMsgFailed(("No text for %d", mode)); break;
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync }
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync return QString();
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync}
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync/* QString <= KPointingHIDType: */
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsynctemplate<> QString toString(const KPointingHIDType &type)
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync{
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync switch (type)
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync {
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync case KPointingHIDType_PS2Mouse: return QApplication::translate("VBoxGlobal", "PS/2 Mouse", "PointingHIDType");
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync case KPointingHIDType_USBMouse: return QApplication::translate("VBoxGlobal", "USB Mouse", "PointingHIDType");
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync case KPointingHIDType_USBTablet: return QApplication::translate("VBoxGlobal", "USB Mouse/Tablet", "PointingHIDType");
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync case KPointingHIDType_ComboMouse: return QApplication::translate("VBoxGlobal", "PS/2 and USB Mouse", "PointingHIDType");
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync case KPointingHIDType_USBMultiTouch: return QApplication::translate("VBoxGlobal", "USB Multi-Touch Mouse/Tablet", "PointingHIDType");
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync default: AssertMsgFailed(("No text for %d", type)); break;
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync }
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync return QString();
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync}
19cdc739ce4ec66bb50d9871dd87d9fbc170a7b8vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KMediumType: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KMediumType &type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMediumType_Normal: return QApplication::translate("VBoxGlobal", "Normal", "MediumType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMediumType_Immutable: return QApplication::translate("VBoxGlobal", "Immutable", "MediumType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMediumType_Writethrough: return QApplication::translate("VBoxGlobal", "Writethrough", "MediumType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMediumType_Shareable: return QApplication::translate("VBoxGlobal", "Shareable", "MediumType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMediumType_Readonly: return QApplication::translate("VBoxGlobal", "Readonly", "MediumType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMediumType_MultiAttach: return QApplication::translate("VBoxGlobal", "Multi-attach", "MediumType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default: AssertMsgFailed(("No text for %d", type)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KMediumVariant: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KMediumVariant &variant)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync /* Note: KMediumVariant_Diff and KMediumVariant_Fixed are so far mutually exclusive: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (variant)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KMediumVariant_Standard:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Dynamically allocated storage", "MediumVariant");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_Diff):
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Dynamically allocated differencing storage", "MediumVariant");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_Fixed):
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Fixed size storage", "MediumVariant");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_VmdkSplit2G):
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Dynamically allocated storage split into files of less than 2GB", "MediumVariant");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_VmdkSplit2G | KMediumVariant_Diff):
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Dynamically allocated differencing storage split into files of less than 2GB", "MediumVariant");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_Fixed | KMediumVariant_VmdkSplit2G):
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Fixed size storage split into files of less than 2GB", "MediumVariant");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_VmdkStreamOptimized):
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Dynamically allocated compressed storage", "MediumVariant");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_VmdkStreamOptimized | KMediumVariant_Diff):
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Dynamically allocated differencing compressed storage", "MediumVariant");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_Fixed | KMediumVariant_VmdkESX):
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Fixed size ESX storage", "MediumVariant");
18ea1c7ca44de49bf0ab0832146153fe6cdfa91avboxsync case (KMediumVariant)(KMediumVariant_Standard | KMediumVariant_Fixed | KMediumVariant_VmdkRawDisk):
18ea1c7ca44de49bf0ab0832146153fe6cdfa91avboxsync return QApplication::translate("VBoxGlobal", "Fixed size storage on raw disk", "MediumVariant");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", variant)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KNetworkAttachmentType: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KNetworkAttachmentType &type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAttachmentType_Null: return QApplication::translate("VBoxGlobal", "Not attached", "NetworkAttachmentType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAttachmentType_NAT: return QApplication::translate("VBoxGlobal", "NAT", "NetworkAttachmentType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAttachmentType_Bridged: return QApplication::translate("VBoxGlobal", "Bridged Adapter", "NetworkAttachmentType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAttachmentType_Internal: return QApplication::translate("VBoxGlobal", "Internal Network", "NetworkAttachmentType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAttachmentType_HostOnly: return QApplication::translate("VBoxGlobal", "Host-only Adapter", "NetworkAttachmentType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAttachmentType_Generic: return QApplication::translate("VBoxGlobal", "Generic Driver", "NetworkAttachmentType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default: AssertMsgFailed(("No text for %d", type)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KNetworkAdapterType: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KNetworkAdapterType &type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAdapterType_Am79C970A: return QApplication::translate("VBoxGlobal", "PCnet-PCI II (Am79C970A)", "NetworkAdapterType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAdapterType_Am79C973: return QApplication::translate("VBoxGlobal", "PCnet-FAST III (Am79C973)", "NetworkAdapterType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAdapterType_I82540EM: return QApplication::translate("VBoxGlobal", "Intel PRO/1000 MT Desktop (82540EM)", "NetworkAdapterType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAdapterType_I82543GC: return QApplication::translate("VBoxGlobal", "Intel PRO/1000 T Server (82543GC)", "NetworkAdapterType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAdapterType_I82545EM: return QApplication::translate("VBoxGlobal", "Intel PRO/1000 MT Server (82545EM)", "NetworkAdapterType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync#ifdef VBOX_WITH_VIRTIO
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAdapterType_Virtio: return QApplication::translate("VBoxGlobal", "Paravirtualized Network (virtio-net)", "NetworkAdapterType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync#endif /* VBOX_WITH_VIRTIO */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default: AssertMsgFailed(("No text for %d", type)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KNetworkAdapterPromiscModePolicy: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KNetworkAdapterPromiscModePolicy &policy)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (policy)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAdapterPromiscModePolicy_Deny:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Deny", "NetworkAdapterPromiscModePolicy");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAdapterPromiscModePolicy_AllowNetwork:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Allow VMs", "NetworkAdapterPromiscModePolicy");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNetworkAdapterPromiscModePolicy_AllowAll:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QApplication::translate("VBoxGlobal", "Allow All", "NetworkAdapterPromiscModePolicy");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync default:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", policy)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KPortMode: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KPortMode &mode)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (mode)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KPortMode_Disconnected: return QApplication::translate("VBoxGlobal", "Disconnected", "PortMode");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KPortMode_HostPipe: return QApplication::translate("VBoxGlobal", "Host Pipe", "PortMode");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KPortMode_HostDevice: return QApplication::translate("VBoxGlobal", "Host Device", "PortMode");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KPortMode_RawFile: return QApplication::translate("VBoxGlobal", "Raw File", "PortMode");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", mode)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KUSBDeviceState: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KUSBDeviceState &state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (state)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KUSBDeviceState_NotSupported: return QApplication::translate("VBoxGlobal", "Not supported", "USBDeviceState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KUSBDeviceState_Unavailable: return QApplication::translate("VBoxGlobal", "Unavailable", "USBDeviceState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KUSBDeviceState_Busy: return QApplication::translate("VBoxGlobal", "Busy", "USBDeviceState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KUSBDeviceState_Available: return QApplication::translate("VBoxGlobal", "Available", "USBDeviceState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KUSBDeviceState_Held: return QApplication::translate("VBoxGlobal", "Held", "USBDeviceState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KUSBDeviceState_Captured: return QApplication::translate("VBoxGlobal", "Captured", "USBDeviceState");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", state)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KUSBDeviceFilterAction: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KUSBDeviceFilterAction &action)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (action)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KUSBDeviceFilterAction_Ignore: return QApplication::translate("VBoxGlobal", "Ignore", "USBDeviceFilterAction");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KUSBDeviceFilterAction_Hold: return QApplication::translate("VBoxGlobal", "Hold", "USBDeviceFilterAction");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", action)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KAudioDriverType: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KAudioDriverType &type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioDriverType_Null: return QApplication::translate("VBoxGlobal", "Null Audio Driver", "AudioDriverType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioDriverType_WinMM: return QApplication::translate("VBoxGlobal", "Windows Multimedia", "AudioDriverType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioDriverType_OSS: return QApplication::translate("VBoxGlobal", "OSS Audio Driver", "AudioDriverType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioDriverType_ALSA: return QApplication::translate("VBoxGlobal", "ALSA Audio Driver", "AudioDriverType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioDriverType_DirectSound: return QApplication::translate("VBoxGlobal", "Windows DirectSound", "AudioDriverType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioDriverType_CoreAudio: return QApplication::translate("VBoxGlobal", "CoreAudio", "AudioDriverType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // case KAudioDriverType_MMPM:
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioDriverType_Pulse: return QApplication::translate("VBoxGlobal", "PulseAudio", "AudioDriverType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioDriverType_SolAudio: return QApplication::translate("VBoxGlobal", "Solaris Audio", "AudioDriverType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", type)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KAudioControllerType: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KAudioControllerType &type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioControllerType_AC97: return QApplication::translate("VBoxGlobal", "ICH AC97", "AudioControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioControllerType_SB16: return QApplication::translate("VBoxGlobal", "SoundBlaster 16", "AudioControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAudioControllerType_HDA: return QApplication::translate("VBoxGlobal", "Intel HD Audio", "AudioControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", type)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KAuthType: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KAuthType &type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAuthType_Null: return QApplication::translate("VBoxGlobal", "Null", "AuthType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAuthType_External: return QApplication::translate("VBoxGlobal", "External", "AuthType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KAuthType_Guest: return QApplication::translate("VBoxGlobal", "Guest", "AuthType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", type)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KStorageBus: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KStorageBus &bus)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (bus)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageBus_IDE: return QApplication::translate("VBoxGlobal", "IDE", "StorageBus");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageBus_SATA: return QApplication::translate("VBoxGlobal", "SATA", "StorageBus");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageBus_SCSI: return QApplication::translate("VBoxGlobal", "SCSI", "StorageBus");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageBus_Floppy: return QApplication::translate("VBoxGlobal", "Floppy", "StorageBus");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageBus_SAS: return QApplication::translate("VBoxGlobal", "SAS", "StorageBus");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", bus)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KStorageControllerType: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KStorageControllerType &type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageControllerType_LsiLogic: return QApplication::translate("VBoxGlobal", "Lsilogic", "StorageControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageControllerType_BusLogic: return QApplication::translate("VBoxGlobal", "BusLogic", "StorageControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageControllerType_IntelAhci: return QApplication::translate("VBoxGlobal", "AHCI", "StorageControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageControllerType_PIIX3: return QApplication::translate("VBoxGlobal", "PIIX3", "StorageControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageControllerType_PIIX4: return QApplication::translate("VBoxGlobal", "PIIX4", "StorageControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageControllerType_ICH6: return QApplication::translate("VBoxGlobal", "ICH6", "StorageControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageControllerType_I82078: return QApplication::translate("VBoxGlobal", "I82078", "StorageControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KStorageControllerType_LsiLogicSas: return QApplication::translate("VBoxGlobal", "LsiLogic SAS", "StorageControllerType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", type)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KChipsetType: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KChipsetType &type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (type)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KChipsetType_PIIX3: return QApplication::translate("VBoxGlobal", "PIIX3", "ChipsetType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KChipsetType_ICH9: return QApplication::translate("VBoxGlobal", "ICH9", "ChipsetType");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", type)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* QString <= KNATProtocol: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> QString toString(const KNATProtocol &protocol)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync switch (protocol)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNATProtocol_UDP: return QApplication::translate("VBoxGlobal", "UDP", "NATProtocol");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync case KNATProtocol_TCP: return QApplication::translate("VBoxGlobal", "TCP", "NATProtocol");
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No text for %d", protocol)); break;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return QString();
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync/* QString <= KNATProtocol: */
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsynctemplate<> QString toInternalString(const KNATProtocol &protocol)
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync{
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync QString strResult;
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync switch (protocol)
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync {
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync case KNATProtocol_UDP: strResult = "udp"; break;
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync case KNATProtocol_TCP: strResult = "tcp"; break;
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync default:
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync {
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync AssertMsgFailed(("No text for protocol type=%d", protocol));
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync break;
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync }
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync }
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync return strResult;
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync}
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync/* KNATProtocol <= QString: */
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsynctemplate<> KNATProtocol fromInternalString<KNATProtocol>(const QString &strProtocol)
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync{
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync /* Here we have some fancy stuff allowing us
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync * to search through the keys using 'case-insensitive' rule: */
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync QStringList keys; QList<KNATProtocol> values;
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync keys << "udp"; values << KNATProtocol_UDP;
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync keys << "tcp"; values << KNATProtocol_TCP;
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync /* Invalid type for unknown words: */
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync if (!keys.contains(strProtocol, Qt::CaseInsensitive))
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync {
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync AssertMsgFailed(("No value for '%s'"));
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync return KNATProtocol_UDP;
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync }
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync /* Corresponding type for known words: */
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync return values.at(keys.indexOf(QRegExp(strProtocol, Qt::CaseInsensitive)));
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync}
6a746127f59129bb9f153ddf45a1ac093bc48ec2vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* KPortMode <= QString: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> KPortMode fromString<KPortMode>(const QString &strMode)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync QHash<QString, KPortMode> list;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Disconnected", "PortMode"), KPortMode_Disconnected);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Host Pipe", "PortMode"), KPortMode_HostPipe);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Host Device", "PortMode"), KPortMode_HostDevice);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Raw File", "PortMode"), KPortMode_RawFile);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync if (!list.contains(strMode))
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No value for '%s'", strMode.toAscii().constData()));
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return list.value(strMode, KPortMode_Disconnected);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* KUSBDeviceFilterAction <= QString: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> KUSBDeviceFilterAction fromString<KUSBDeviceFilterAction>(const QString &strAction)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync QHash<QString, KUSBDeviceFilterAction> list;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Ignore", "USBDeviceFilterAction"), KUSBDeviceFilterAction_Ignore);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Hold", "USBDeviceFilterAction"), KUSBDeviceFilterAction_Hold);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync if (!list.contains(strAction))
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No value for '%s'", strAction.toAscii().constData()));
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return list.value(strAction, KUSBDeviceFilterAction_Null);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* KAudioDriverType <= QString: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> KAudioDriverType fromString<KAudioDriverType>(const QString &strType)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync QHash<QString, KAudioDriverType> list;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Null Audio Driver", "AudioDriverType"), KAudioDriverType_Null);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Windows Multimedia", "AudioDriverType"), KAudioDriverType_WinMM);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "OSS Audio Driver", "AudioDriverType"), KAudioDriverType_OSS);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "ALSA Audio Driver", "AudioDriverType"), KAudioDriverType_ALSA);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Windows DirectSound", "AudioDriverType"), KAudioDriverType_DirectSound);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "CoreAudio", "AudioDriverType"), KAudioDriverType_CoreAudio);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync // list.insert(..., KAudioDriverType_MMPM);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "PulseAudio", "AudioDriverType"), KAudioDriverType_Pulse);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Solaris Audio", "AudioDriverType"), KAudioDriverType_SolAudio);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync if (!list.contains(strType))
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No value for '%s'", strType.toAscii().constData()));
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return list.value(strType, KAudioDriverType_Null);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* KAudioControllerType <= QString: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> KAudioControllerType fromString<KAudioControllerType>(const QString &strType)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync QHash<QString, KAudioControllerType> list;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "ICH AC97", "AudioControllerType"), KAudioControllerType_AC97);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "SoundBlaster 16", "AudioControllerType"), KAudioControllerType_SB16);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Intel HD Audio", "AudioControllerType"), KAudioControllerType_HDA);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync if (!list.contains(strType))
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No value for '%s'", strType.toAscii().constData()));
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return list.value(strType, KAudioControllerType_AC97);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* KAuthType <= QString: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> KAuthType fromString<KAuthType>(const QString &strType)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync QHash<QString, KAuthType> list;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Null", "AuthType"), KAuthType_Null);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "External", "AuthType"), KAuthType_External);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Guest", "AuthType"), KAuthType_Guest);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync if (!list.contains(strType))
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No value for '%s'", strType.toAscii().constData()));
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return list.value(strType, KAuthType_Null);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync/* KStorageControllerType <= QString: */
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsynctemplate<> KStorageControllerType fromString<KStorageControllerType>(const QString &strType)
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync{
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync QHash<QString, KStorageControllerType> list;
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "Lsilogic", "StorageControllerType"), KStorageControllerType_LsiLogic);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "BusLogic", "StorageControllerType"), KStorageControllerType_BusLogic);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "AHCI", "StorageControllerType"), KStorageControllerType_IntelAhci);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "PIIX3", "StorageControllerType"), KStorageControllerType_PIIX3);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "PIIX4", "StorageControllerType"), KStorageControllerType_PIIX4);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "ICH6", "StorageControllerType"), KStorageControllerType_ICH6);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "I82078", "StorageControllerType"), KStorageControllerType_I82078);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync list.insert(QApplication::translate("VBoxGlobal", "LsiLogic SAS", "StorageControllerType"), KStorageControllerType_LsiLogicSas);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync if (!list.contains(strType))
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync {
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync AssertMsgFailed(("No value for '%s'", strType.toAscii().constData()));
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync }
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync return list.value(strType, KStorageControllerType_Null);
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync}
1c88e893e641d60853d1c2b516f8b01c767f6667vboxsync