您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vboxGlobal函数代码示例

51自学网 2021-06-03 09:34:49
  C++
这篇教程C++ vboxGlobal函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中vboxGlobal函数的典型用法代码示例。如果您正苦于以下问题:C++ vboxGlobal函数的具体用法?C++ vboxGlobal怎么用?C++ vboxGlobal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了vboxGlobal函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: vboxGlobal

/* static */void UIApplianceEditorWidget::initSystemSettings(){    if (m_minGuestRAM == -1)    {        /* We need some global defaults from the current VirtualBox           installation */        CSystemProperties sp = vboxGlobal().virtualBox().GetSystemProperties();        m_minGuestRAM        = sp.GetMinGuestRAM();        m_maxGuestRAM        = sp.GetMaxGuestRAM();        m_minGuestCPUCount   = sp.GetMinGuestCPUCount();        m_maxGuestCPUCount   = sp.GetMaxGuestCPUCount();    }}
开发者ID:virendramishra,项目名称:VirtualBox4.1.18,代码行数:14,


示例2: vboxGlobal

void UIMachineWindowScale::loadSettings(){    /* Call to base-class: */    UIMachineWindow::loadSettings();    /* Load extra-data settings: */    {        /* Load extra-data: */        QRect geo = gEDataManager->machineWindowGeometry(machineLogic()->visualStateType(),                                                         m_uScreenId, vboxGlobal().managedVMUuid());        /* If we do have proper geometry: */        if (!geo.isNull())        {            /* Restore window geometry: */            m_normalGeometry = geo;            setGeometry(m_normalGeometry);            /* Maximize (if necessary): */            if (gEDataManager->machineWindowShouldBeMaximized(machineLogic()->visualStateType(),                                                              m_uScreenId, vboxGlobal().managedVMUuid()))                setWindowState(windowState() | Qt::WindowMaximized);        }        /* If we do NOT have proper geometry: */        else        {            /* Get available geometry, for screen with (x,y) coords if possible: */            QRect availableGeo = !geo.isNull() ? QApplication::desktop()->availableGeometry(QPoint(geo.x(), geo.y())) :                                                 QApplication::desktop()->availableGeometry(this);            /* Resize to default size: */            resize(640, 480);            /* Move newly created window to the screen-center: */            m_normalGeometry = geometry();            m_normalGeometry.moveCenter(availableGeo.center());            setGeometry(m_normalGeometry);        }    }}
开发者ID:Klanly,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:39,


示例3: updateSizeToolTips

void UIWizardNewVDPage3::setMediumSize(qulonglong uMediumSize){    /* Block signals: */    m_pSizeSlider->blockSignals(true);    m_pSizeEditor->blockSignals(true);    /* Set values: */    m_pSizeSlider->setValue(sizeMBToSlider(uMediumSize, m_iSliderScale));    m_pSizeEditor->setText(vboxGlobal().formatSize(uMediumSize));    updateSizeToolTips(uMediumSize);    /* Unblock signals: */    m_pSizeSlider->blockSignals(false);    m_pSizeEditor->blockSignals(false);}
开发者ID:jeppeter,项目名称:vbox,代码行数:13,


示例4: m_pParent

/* UIMachineSettingsSerial stuff */UIMachineSettingsSerial::UIMachineSettingsSerial(UIMachineSettingsSerialPage *pParent)    : QIWithRetranslateUI<QWidget> (0)    , m_pParent(pParent)    , mValidator(0)    , m_iSlot(-1){    /* Apply UI decorations */    Ui::UIMachineSettingsSerial::setupUi (this);    /* Setup validation */    mLeIRQ->setValidator (new QIULongValidator (0, 255, this));    mLeIOPort->setValidator (new QIULongValidator (0, 0xFFFF, this));    mLePath->setValidator (new QRegExpValidator (QRegExp (".+"), this));    /* Setup constraints */    mLeIRQ->setFixedWidth (mLeIRQ->fontMetrics().width ("8888"));    mLeIOPort->setFixedWidth (mLeIOPort->fontMetrics().width ("8888888"));    /* Set initial values */    /* Note: If you change one of the following don't forget retranslateUi. */    mCbNumber->insertItem (0, vboxGlobal().toCOMPortName (0, 0));    mCbNumber->insertItems (0, vboxGlobal().COMPortNames());    mCbMode->addItem (""); /* KPortMode_Disconnected */    mCbMode->addItem (""); /* KPortMode_HostPipe */    mCbMode->addItem (""); /* KPortMode_HostDevice */    mCbMode->addItem (""); /* KPortMode_RawFile */    /* Setup connections */    connect (mGbSerial, SIGNAL (toggled (bool)),             this, SLOT (mGbSerialToggled (bool)));    connect (mCbNumber, SIGNAL (activated (const QString &)),             this, SLOT (mCbNumberActivated (const QString &)));    connect (mCbMode, SIGNAL (activated (const QString &)),             this, SLOT (mCbModeActivated (const QString &)));    /* Applying language settings */    retranslateUi();}
开发者ID:mutoso-mirrors,项目名称:vbox,代码行数:40,


示例5: vboxGlobal

void UIMachineSettingsSerial::mCbNumberActivated (const QString &aText){    ulong IRQ, IOBase;    bool std = vboxGlobal().toCOMPortNumbers (aText, IRQ, IOBase);    mLeIRQ->setEnabled (!std);    mLeIOPort->setEnabled (!std);    if (std)    {        mLeIRQ->setText (QString::number (IRQ));        mLeIOPort->setText ("0x" + QString::number (IOBase, 16).toUpper());    }}
开发者ID:mutoso-mirrors,项目名称:vbox,代码行数:13,


示例6: AssertReturnVoid

void UIMachineWindowFullscreen::handleNativeNotification(const QString &strNativeNotificationName){    /* Make sure this method is only used for ML and next: */    AssertReturnVoid(vboxGlobal().osRelease() > MacOSXRelease_Lion);    /* Log all arrived notifications: */    LogRel(("UIMachineWindowFullscreen::handleNativeNotification: Notification '%s' received./n",            strNativeNotificationName.toAscii().constData()));    /* Handle 'NSWindowWillEnterFullScreenNotification' notification: */    if (strNativeNotificationName == "NSWindowWillEnterFullScreenNotification")    {        LogRel(("UIMachineWindowFullscreen::handleNativeNotification: "                "Native fullscreen mode about to enter, notifying listener.../n"));        emit sigNotifyAboutNativeFullscreenWillEnter();    }    /* Handle 'NSWindowDidEnterFullScreenNotification' notification: */    else if (strNativeNotificationName == "NSWindowDidEnterFullScreenNotification")    {        /* Mark window transition complete: */        m_fIsInFullscreenTransition = false;        LogRel(("UIMachineWindowFullscreen::handleNativeNotification: "                "Native fullscreen mode entered, notifying listener.../n"));        emit sigNotifyAboutNativeFullscreenDidEnter();    }    /* Handle 'NSWindowWillExitFullScreenNotification' notification: */    else if (strNativeNotificationName == "NSWindowWillExitFullScreenNotification")    {        LogRel(("UIMachineWindowFullscreen::handleNativeNotification: "                "Native fullscreen mode about to exit, notifying listener.../n"));        emit sigNotifyAboutNativeFullscreenWillExit();    }    /* Handle 'NSWindowDidExitFullScreenNotification' notification: */    else if (strNativeNotificationName == "NSWindowDidExitFullScreenNotification")    {        /* Mark window transition complete: */        m_fIsInFullscreenTransition = false;        LogRel(("UIMachineWindowFullscreen::handleNativeNotification: "                "Native fullscreen mode exited, notifying listener.../n"));        emit sigNotifyAboutNativeFullscreenDidExit();    }    /* Handle 'NSWindowDidFailToEnterFullScreenNotification' notification: */    else if (strNativeNotificationName == "NSWindowDidFailToEnterFullScreenNotification")    {        /* Mark window transition complete: */        m_fIsInFullscreenTransition = false;        LogRel(("UIMachineWindowFullscreen::handleNativeNotification: "                "Native fullscreen mode fail to enter, notifying listener.../n"));        emit sigNotifyAboutNativeFullscreenFailToEnter();    }}
开发者ID:stefano-garzarella,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:51,


示例7: field

bool UIWizardCloneVD::copyVirtualDisk(){    /* Gather attributes: */    CMedium sourceVirtualDisk = field("sourceVirtualDisk").value<CMedium>();    CMediumFormat mediumFormat = field("mediumFormat").value<CMediumFormat>();    qulonglong uVariant = field("mediumVariant").toULongLong();    QString strMediumPath = field("mediumPath").toString();    qulonglong uSize = field("mediumSize").toULongLong();    /* Check attributes: */    AssertReturn(!strMediumPath.isNull(), false);    AssertReturn(uSize > 0, false);    /* Get VBox object: */    CVirtualBox vbox = vboxGlobal().virtualBox();    /* Create new virtual-disk: */    CMedium virtualDisk = vbox.CreateHardDisk(mediumFormat.GetName(), strMediumPath);    CProgress progress;    if (!vbox.isOk())    {        msgCenter().cannotCreateHardDiskStorage(this, vbox, strMediumPath, virtualDisk, progress);        return false;    }    /* Copy existing virtual-disk to the new virtual-disk: */    progress = sourceVirtualDisk.CloneTo(virtualDisk, uVariant, CMedium());    if (!virtualDisk.isOk())    {        msgCenter().cannotCreateHardDiskStorage(this, vbox, strMediumPath, virtualDisk, progress);        return false;    }    /* Show creation progress: */    msgCenter().showModalProgressDialog(progress, windowTitle(), ":/progress_media_create_90px.png", this, true);    if (progress.GetCanceled())        return false;    if (!progress.isOk() || progress.GetResultCode() != 0)    {        msgCenter().cannotCreateHardDiskStorage(this, vbox, strMediumPath, virtualDisk, progress);        return false;    }    /* Remember created virtual-disk: */    m_virtualDisk = virtualDisk;    /* Just close the created medium, it is not necessary yet: */    m_virtualDisk.Close();    return true;}
开发者ID:VirtualMonitor,项目名称:VirtualMonitor,代码行数:50,


示例8: prepareVisualState

void UIMachineWindowScale::prepareVisualState(){    /* Call to base-class: */    UIMachineWindow::prepareVisualState();    /* Beta label? */    if (vboxGlobal().isBeta())    {        QPixmap betaLabel = ::betaLabel(QSize(100, 16));        ::darwinLabelWindow(this, &betaLabel, true);    }    /* For 'Yosemite' and above: */    if (vboxGlobal().osRelease() >= MacOSXRelease_Yosemite)    {        /* Enable fullscreen support for every screen which requires it: */        if (darwinScreensHaveSeparateSpaces() || m_uScreenId == 0)            darwinEnableFullscreenSupport(this);        /* Register 'Zoom' button to use our full-screen: */        UICocoaApplication::instance()->registerCallbackForStandardWindowButton(this, StandardWindowButtonType_Zoom,                                                                                UIMachineWindow::handleStandardWindowButtonCallback);    }}
开发者ID:miguelinux,项目名称:vbox,代码行数:23,


示例9: QVBoxLayout

UIWizardNewVMPageBasic2::UIWizardNewVMPageBasic2(){    /* Create widget: */    QVBoxLayout *pMainLayout = new QVBoxLayout(this);    {        m_pLabel = new QIRichTextLabel(this);        QGridLayout *pMemoryLayout = new QGridLayout;        {            m_pRamSlider = new VBoxGuestRAMSlider(this);            {                m_pRamSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);                m_pRamSlider->setOrientation(Qt::Horizontal);            }            m_pRamEditor = new QSpinBox(this);            {                m_pRamEditor->setMinimum(m_pRamSlider->minRAM());                m_pRamEditor->setMaximum(m_pRamSlider->maxRAM());                vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pRamEditor, 5);            }            m_pRamUnits = new QLabel(this);            {                m_pRamUnits->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);            }            m_pRamMin = new QLabel(this);            {                m_pRamMin->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);            }            m_pRamMax = new QLabel(this);            {                m_pRamMax->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);            }            pMemoryLayout->addWidget(m_pRamSlider, 0, 0, 1, 3);            pMemoryLayout->addWidget(m_pRamEditor, 0, 3);            pMemoryLayout->addWidget(m_pRamUnits, 0, 4);            pMemoryLayout->addWidget(m_pRamMin, 1, 0);            pMemoryLayout->setColumnStretch(1, 1);            pMemoryLayout->addWidget(m_pRamMax, 1, 2);        }        pMainLayout->addWidget(m_pLabel);        pMainLayout->addLayout(pMemoryLayout);        pMainLayout->addStretch();    }    /* Setup connections: */    connect(m_pRamSlider, SIGNAL(valueChanged(int)), this, SLOT(sltRamSliderValueChanged()));    connect(m_pRamEditor, SIGNAL(valueChanged(int)), this, SLOT(sltRamEditorValueChanged()));    /* Register fields: */    registerField("ram", m_pRamSlider, "value", SIGNAL(valueChanged(int)));}
开发者ID:jeppeter,项目名称:vbox,代码行数:50,


示例10: UIVersion

UIDownloaderUserManual::UIDownloaderUserManual(){    /* Prepare instance: */    if (!s_pInstance)        s_pInstance = this;    /* Get version number and adjust it for test and trunk builds. The server only has official releases. */    const QString strVersion = UIVersion(vboxGlobal().vboxVersionStringNormalized()).effectiveReleasedVersion().toString();    /* Compose User Manual filename: */    QString strUserManualFullFileName = vboxGlobal().helpFile();    QString strUserManualShortFileName = QFileInfo(strUserManualFullFileName).fileName();    /* Add sources: */    QString strSource1 = QString("https://download.virtualbox.org/virtualbox/%1/").arg(strVersion) + strUserManualShortFileName;    QString strSource2 = QString("https://download.virtualbox.org/virtualbox/") + strUserManualShortFileName;    addSource(strSource1);    addSource(strSource2);    /* Set target: */    QString strUserManualDestination = QDir(vboxGlobal().homeFolder()).absoluteFilePath(strUserManualShortFileName);    setTarget(strUserManualDestination);}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:23,


示例11: foreach

    /* Insert hard-disks to the passed uimedium map.     * Get existing one from the previous map if any. */    foreach (CMedium medium, inputMediums)    {        /* If VBoxGlobal is cleaning up, abort immediately: */        if (vboxGlobal().isCleaningUp())            break;        /* Prepare uimedium on the basis of current medium: */        QString strMediumID = medium.GetId();        UIMedium uimedium = m_mediums.contains(strMediumID) ? m_mediums[strMediumID] :                                                              UIMedium(medium, mediumType);        /* Insert uimedium into map: */        outputMediums.insert(uimedium.id(), uimedium);    }
开发者ID:jeppeter,项目名称:vbox,代码行数:16,


示例12: UIGInformationElement

UIGInformationElementInterface::UIGInformationElementInterface(UIGInformationSet *pParent, DetailsElementType type, bool fOpened)    : UIGInformationElement(pParent, type, fOpened)    , m_pTask(0){    /* Assign corresponding icon: */    setIcon(gpConverter->toIcon(elementType()));    /* Listen for the global thread-pool: */    connect(vboxGlobal().threadPool(), SIGNAL(sigTaskComplete(UITask*)),            this, SLOT(sltUpdateAppearanceFinished(UITask*)));    /* Translate finally: */    retranslateUi();}
开发者ID:pombredanne,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:14,


示例13: tr

void UITextEditor::open(){    QString fileName = QIFileDialog::getOpenFileName(vboxGlobal().documentsPath(), tr("Text (*.txt);;All (*.*)"), this, tr("Select a file to open..."));    if (!fileName.isEmpty())    {        QFile file(fileName);        if (file.open(QFile::ReadOnly))        {            QTextStream in(&file);            m_pTextEdit->setPlainText(in.readAll());        }    }}
开发者ID:jeppeter,项目名称:vbox,代码行数:14,


示例14: vboxGlobal

void UIVMInformationDialog::saveSettings(){    /* Save window geometry: */    {        /* Save geometry: */#ifdef VBOX_WS_MAC        gEDataManager->setInformationWindowGeometry(m_geometry, ::darwinIsWindowMaximized(this), vboxGlobal().managedVMUuid());#else /* VBOX_WS_MAC */        gEDataManager->setInformationWindowGeometry(m_geometry, isMaximized(), vboxGlobal().managedVMUuid());#endif /* !VBOX_WS_MAC */        LogRel2(("GUI: UIVMInformationDialog: Geometry saved as: Origin=%dx%d, Size=%dx%d/n",                 m_geometry.x(), m_geometry.y(), m_geometry.width(), m_geometry.height()));    }}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:14,


示例15: vboxGlobal

/* Load data to cache from corresponding external object(s), * this task COULD be performed in other than GUI thread: */void UIGlobalSettingsExtension::loadToCacheFrom(QVariant &data){    /* Fetch data to properties & settings: */    UISettingsPageGlobal::fetchData(data);    /* Load to cache: */    const CExtPackManager &manager = vboxGlobal().virtualBox().GetExtensionPackManager();    const CExtPackVector &packages = manager.GetInstalledExtPacks();    for (int i = 0; i < packages.size(); ++i)        m_cache.m_items << fetchData(packages[i]);    /* Upload properties & settings to data: */    UISettingsPageGlobal::uploadData(data);}
开发者ID:greg100795,项目名称:virtualbox,代码行数:16,


示例16: StorageType

void UIWizardExportAppPage2::chooseDefaultStorageType(){    /* Select default storage type: */#if 0    /* Load storage-type from GUI extra data: */    bool ok;    StorageType storageType = StorageType(vboxGlobal().virtualBox().GetExtraData(GUI_Export_StorageType).toInt(&ok));    if (ok)        setStorageType(storageType);#else    /* Just select first of types: */    setStorageType(Filesystem);#endif}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:14,


示例17: darwinSetFrontMostProcess

void UIMachineLogicSeamless::prepareMachineWindows(){    /* Do not create machine-window(s) if they created already: */    if (isMachineWindowsCreated())        return;#ifdef VBOX_WS_MAC    /* We have to make sure that we are getting the front most process.     * This is necessary for Qt versions > 4.3.3: */    darwinSetFrontMostProcess();#endif /* VBOX_WS_MAC */    /* Update the multi-screen layout: */    m_pScreenLayout->update();    /* Create machine-window(s): */    for (uint cScreenId = 0; cScreenId < machine().GetMonitorCount(); ++cScreenId)        addMachineWindow(UIMachineWindow::create(this, cScreenId));    /* Listen for frame-buffer resize: */    foreach (UIMachineWindow *pMachineWindow, machineWindows())        connect(pMachineWindow, SIGNAL(sigFrameBufferResize()),                this, SIGNAL(sigFrameBufferResize()));    emit sigFrameBufferResize();    /* Connect multi-screen layout change handler: */    connect(m_pScreenLayout, SIGNAL(sigScreenLayoutChange()),            this, SLOT(sltScreenLayoutChanged()));    /* Mark machine-window(s) created: */    setMachineWindowsCreated(true);#ifdef VBOX_WS_X11    switch (vboxGlobal().typeOfWindowManager())    {        case X11WMType_GNOMEShell:        case X11WMType_Mutter:        {            // WORKAROUND:            // Under certain WMs we can loose machine-window activation due to any Qt::Tool            // overlay asynchronously shown above it. Qt is not become aware of such event.            // We are going to ask to return machine-window activation in let's say 100ms.            QTimer::singleShot(100, machineWindows().first(), SLOT(sltActivateWindow()));            break;        }        default:            break;    }#endif /* VBOX_WS_X11 */}
开发者ID:miguelinux,项目名称:vbox,代码行数:50,


示例18: createUpdateTask

void UIGInformationElementInterface::updateAppearance(){    /* Call to base-class: */    UIGInformationElement::updateAppearance();    /* Prepare/start update task: */    if (!m_pTask)    {        /* Prepare update task: */        m_pTask = createUpdateTask();        /* Post task into global thread-pool: */        vboxGlobal().threadPool()->enqueueTask(m_pTask);    }}
开发者ID:pombredanne,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:14,


示例19: vboxGlobal

void UIWizardNewVMPage3::getWithFileOpenDialog(){    /* Get opened medium id: */    QString strMediumId = vboxGlobal().openMediumWithFileOpenDialog(UIMediumType_HardDisk, thisImp());    if (!strMediumId.isNull())    {        /* Update medium-combo if necessary: */        m_pDiskSelector->setCurrentItem(strMediumId);        /* Update hard disk source: */        updateVirtualDiskSource();        /* Focus on hard disk combo: */        m_pDiskSelector->setFocus();    }}
开发者ID:miguelinux,项目名称:vbox,代码行数:14,


示例20: vboxGlobal

UIDownloaderAdditions::UIDownloaderAdditions(){    /* Prepare instance: */    if (!m_spInstance)        m_spInstance = this;    /* Get version number and adjust it for test and trunk builds, both have       odd build numbers.  The server only has official releases. */    QString strVersion = vboxGlobal().vboxVersionStringNormalized();    QChar qchLastDigit = strVersion[strVersion.length() - 1];    if (   qchLastDigit == '1'        || qchLastDigit == '3'        || qchLastDigit == '5'        || qchLastDigit == '7'        || qchLastDigit == '9')    {        if (   !strVersion.endsWith(".51")            && !strVersion.endsWith(".53")            && !strVersion.endsWith(".97")            && !strVersion.endsWith(".99"))            strVersion[strVersion.length() - 1] = qchLastDigit.toLatin1() - 1;        else        {            strVersion.chop(2);            strVersion += "10"; /* Current for 5.0.x */        }    }    /* Prepare source/target: */    const QString &strName = QString("VBoxGuestAdditions_%1.iso").arg(strVersion);    const QString &strSource = QString("http://download.virtualbox.org/virtualbox/%1/").arg(strVersion) + strName;    const QString &strTarget = QDir(vboxGlobal().homeFolder()).absoluteFilePath(strName);    /* Set source/target: */    setSource(strSource);    setTarget(strTarget);}
开发者ID:miguelinux,项目名称:vbox,代码行数:37,


示例21: AssertReturn

void VBoxSnapshotsWgt::sltRestoreSnapshot(bool fSuppressNonCriticalWarnings /* = false*/){    /* Get currently chosen item: */    SnapshotWgtItem *pItem = mTreeWidget->currentItem() ? static_cast<SnapshotWgtItem*>(mTreeWidget->currentItem()) : 0;    AssertReturn(pItem, (void)0);    /* Detemine snapshot id: */    QString strSnapshotId = pItem->snapshotId();    AssertReturn(!strSnapshotId.isNull(), (void)0);    /* Get currently desired snapshot: */    CSnapshot snapshot = mMachine.FindSnapshot(strSnapshotId);    /* Ask the user if he really wants to restore the snapshot: */    int iResultCode = AlertButton_Ok;    if (!fSuppressNonCriticalWarnings || mMachine.GetCurrentStateModified())    {        iResultCode = msgCenter().confirmSnapshotRestoring(snapshot.GetName(), mMachine.GetCurrentStateModified());        if (iResultCode & AlertButton_Cancel)            return;    }    /* If user also confirmed new snapshot creation: */    if (iResultCode & AlertOption_CheckBox)    {        /* Take snapshot of changed current state: */        mTreeWidget->setCurrentItem(curStateItem());        if (!takeSnapshot())            return;    }    /* Open a direct session (this call will handle all errors): */    CSession session = vboxGlobal().openSession(mMachineId);    if (session.isNull())        return;    /* Restore chosen snapshot: */    CConsole console = session.GetConsole();    CProgress progress = console.RestoreSnapshot(snapshot);    if (console.isOk())    {        msgCenter().showModalProgressDialog(progress, mMachine.GetName(), ":/progress_snapshot_restore_90px.png");        if (progress.GetResultCode() != 0)            msgCenter().cannotRestoreSnapshot(progress, snapshot.GetName(), mMachine.GetName());    }    else        msgCenter().cannotRestoreSnapshot(console, snapshot.GetName(), mMachine.GetName());    /* Unlock machine finally: */    session.UnlockMachine();}
开发者ID:bayasist,项目名称:vbox,代码行数:49,


示例22: familyId

void VBoxOSTypeSelectorWidget::onFamilyChanged (int aIndex){    /* Lock the signals of mCbType to prevent it's reaction on clearing */    mCbType->blockSignals (true);    mCbType->clear();    /* Populate combo-box with OS Types related to currently selected Family ID */    QString familyId (mCbFamily->itemData (aIndex, RoleTypeID).toString());    QList <CGuestOSType> types (vboxGlobal().vmGuestOSTypeList (familyId));    for (int i = 0; i < types.size(); ++ i)    {        if (types [i].GetIs64Bit() && (!m_fSupportsHWVirtEx || !m_fSupportsLongMode))            continue;        int index = mCbType->count();        mCbType->insertItem (index, types [i].GetDescription());        mCbType->setItemData (index, types [i].GetId(), RoleTypeID);    }    /* Select the most recently chosen item */    if (mCurrentIds.contains (familyId))    {        QString typeId (mCurrentIds [familyId]);        int typeIndex = mCbType->findData (typeId, RoleTypeID);        if (typeIndex != -1)            mCbType->setCurrentIndex (typeIndex);    }    /* Or select WinXP item for Windows family as default */    else if (familyId == "Windows")    {        int xpIndex = mCbType->findData ("WindowsXP", RoleTypeID);        if (xpIndex != -1)            mCbType->setCurrentIndex (xpIndex);    }    /* Or select Ubuntu item for Linux family as default */    else if (familyId == "Linux")    {        int ubIndex = mCbType->findData ("Ubuntu", RoleTypeID);        if (ubIndex != -1)            mCbType->setCurrentIndex (ubIndex);    }    /* Else simply select the first one present */    else mCbType->setCurrentIndex (0);    /* Update all the stuff with new type */    onTypeChanged (mCbType->currentIndex());    /* Unlock the signals of mCbType */    mCbType->blockSignals (false);}
开发者ID:virendramishra,项目名称:VirtualBox4.1.18,代码行数:49,


示例23: updateData

/* Load data to cache from corresponding external object(s), * this task COULD be performed in other than GUI thread: */void UIGlobalSettingsUpdate::loadToCacheFrom(QVariant &data){    /* Fetch data to properties & settings: */    UISettingsPageGlobal::fetchData(data);    /* Fill internal variables with corresponding values: */    VBoxUpdateData updateData(vboxGlobal().virtualBox().GetExtraData(GUI_UpdateDate));    m_cache.m_fCheckEnabled = !updateData.isNoNeedToCheck();    m_cache.m_periodIndex = updateData.periodIndex();    m_cache.m_branchIndex = updateData.branchIndex();    m_cache.m_strDate = updateData.date();    /* Upload properties & settings to data: */    UISettingsPageGlobal::uploadData(data);}
开发者ID:mutoso-mirrors,项目名称:vbox,代码行数:17,


示例24: vboxGlobal

void UIMachineSettingsParallel::polishTab(){    /* Polish port page: */    ulong uIRQ, uIOBase;    bool fStd = vboxGlobal().toCOMPortNumbers(mCbNumber->currentText(), uIRQ, uIOBase);    mGbParallel->setEnabled(m_pParent->isMachineOffline());    mLbNumber->setEnabled(m_pParent->isMachineOffline());    mCbNumber->setEnabled(m_pParent->isMachineOffline());    mLbIRQ->setEnabled(m_pParent->isMachineOffline());    mLeIRQ->setEnabled(!fStd && m_pParent->isMachineOffline());    mLbIOPort->setEnabled(m_pParent->isMachineOffline());    mLeIOPort->setEnabled(!fStd && m_pParent->isMachineOffline());    mLbPath->setEnabled(m_pParent->isMachineOffline());    mLePath->setEnabled(m_pParent->isMachineOffline());}
开发者ID:svn2github,项目名称:virtualbox,代码行数:15,


示例25: tr

int UINetworkReplyPrivateThread::applyProxyRules(){    /* Set thread context: */    m_strContext = tr("During proxy configuration");    /* Make sure proxy is enabled in Proxy Manager: */    UIProxyManager proxyManager(vboxGlobal().settings().proxySettings());    if (!proxyManager.proxyEnabled())        return VINF_SUCCESS;    /* Apply proxy rules: */    return applyProxyRules(m_pHttp,                           proxyManager.proxyHost(),                           proxyManager.proxyPort().toUInt());}
开发者ID:Klanly,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:15,


示例26: setDescription

UIDownloaderExtensionPack::UIDownloaderExtensionPack(){    /* Prepare instance: */    if (!m_spInstance)        m_spInstance = this;    /* Set description: */    setDescription(tr("VirtualBox Extension Pack"));    /* Prepare source/target: */    QString strExtPackUnderscoredName(QString(GUI_ExtPackName).replace(' ', '_'));    QString strTemplateSourcePath("http://download.virtualbox.org/virtualbox/%1/");    QString strTemplateSourceName(QString("%1-%2.vbox-extpack").arg(strExtPackUnderscoredName));    QString strSourcePath(strTemplateSourcePath.arg(vboxGlobal().vboxVersionStringNormalized()));    QString strSourceName(strTemplateSourceName.arg(vboxGlobal().vboxVersionStringNormalized()));    QString strSource(strSourcePath + strSourceName);    QString strTargetPath(vboxGlobal().virtualBox().GetHomeFolder());    QString strTargetName(strSourceName);    QString strTarget(QDir(strTargetPath).absoluteFilePath(strTargetName));    /* Set source/target: */    setSource(strSource);    setTarget(strTarget);}
开发者ID:ryenus,项目名称:vbox,代码行数:24,


示例27: switch

void UIVMPreviewWindow::setUpdateInterval(UpdateInterval interval, bool fSave){    switch (interval)    {        case UpdateDisabled:        {            if (fSave)                vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_PreviewUpdate, "disabled");            m_pUpdateTimer->setInterval(0);            m_pUpdateTimer->stop();            m_actions[interval]->setChecked(true);            break;        }        case Update500ms:        {            if (fSave)                vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_PreviewUpdate, "500");            m_pUpdateTimer->setInterval(500);            m_actions[interval]->setChecked(true);            break;        }        case Update1000ms:        {            if (fSave)                vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_PreviewUpdate, "1000");            m_pUpdateTimer->setInterval(1000);            m_actions[interval]->setChecked(true);            break;        }        case Update2000ms:        {            if (fSave)                vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_PreviewUpdate, "2000");            m_pUpdateTimer->setInterval(2000);            m_actions[interval]->setChecked(true);            break;        }        case Update5000ms:        {            if (fSave)                vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_PreviewUpdate, "5000");            m_pUpdateTimer->setInterval(5000);            m_actions[interval]->setChecked(true);            break;        }        case Update10000ms:        {            if (fSave)                vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_PreviewUpdate, "10000");            m_pUpdateTimer->setInterval(10000);            m_actions[interval]->setChecked(true);            break;        }        case UpdateEnd: break;    }}
开发者ID:virendramishra,项目名称:VirtualBox4.1.18,代码行数:56,



注:本文中的vboxGlobal函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ vc函数代码示例
C++ vbo_context函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。