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

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

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

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

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

示例1: Assert

void UIMachineView::cleanupFrameBuffer(){    if (m_pFrameBuffer)    {        /* Process pending frame-buffer resize events: */        QApplication::sendPostedEvents(this, VBoxDefs::ResizeEventType);#ifdef VBOX_WITH_VIDEOHWACCEL        if (m_fAccelerate2DVideo)        {            /* When 2D is enabled we do not re-create Framebuffers. This is done to             * 1. avoid 2D command loss during the time slot when no framebuffer is assigned to the display             * 2. make it easier to preserve the current 2D state */            Assert(m_pFrameBuffer == uisession()->frameBuffer(screenId()));            m_pFrameBuffer->setView(NULL);#ifdef VBOX_WITH_CROGL            /* Call SetFramebuffer to ensure 3D gets notified of view being destroyed */            CDisplay display = session().GetConsole().GetDisplay();            display.SetFramebuffer(m_uScreenId, CFramebuffer(m_pFrameBuffer));#endif        }        else#endif /* VBOX_WITH_VIDEOHWACCEL */        {            /* Warn framebuffer about its no more necessary: */            m_pFrameBuffer->setDeleted(true);            /* Detach framebuffer from Display: */            CDisplay display = session().GetConsole().GetDisplay();            display.SetFramebuffer(m_uScreenId, CFramebuffer(NULL));            /* Release the reference: */            m_pFrameBuffer->Release();//          delete m_pFrameBuffer; // TODO_NEW_CORE: possibly necessary to really cleanup            m_pFrameBuffer = NULL;        }    }}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:35,


示例2: connect

void UIMachine::prepareMachineLogic(){    /* Prepare async visual state type change handler: */    qRegisterMetaType<UIVisualStateType>();    connect(this, SIGNAL(sigRequestAsyncVisualStateChange(UIVisualStateType)),            this, SLOT(sltChangeVisualState(UIVisualStateType)),            Qt::QueuedConnection);    /* Load restricted visual states: */    UIVisualStateType restrictedVisualStates = gEDataManager->restrictedVisualStates(vboxGlobal().managedVMUuid());    /* Acquire allowed visual states: */    m_allowedVisualStates = static_cast<UIVisualStateType>(UIVisualStateType_All ^ restrictedVisualStates);    /* Load requested visual state: */    UIVisualStateType requestedVisualState = gEDataManager->requestedVisualState(vboxGlobal().managedVMUuid());    /* Check if requested visual state is allowed: */    if (isVisualStateAllowed(requestedVisualState))    {        switch (requestedVisualState)        {            /* Direct transition to scale/fullscreen mode allowed: */            case UIVisualStateType_Scale:      m_initialVisualState = UIVisualStateType_Scale; break;            case UIVisualStateType_Fullscreen: m_initialVisualState = UIVisualStateType_Fullscreen; break;            /* While to seamless is not, so we have to make request to do transition later: */            case UIVisualStateType_Seamless:   uisession()->setRequestedVisualState(UIVisualStateType_Seamless); break;            default: break;        }    }    /* Enter initial visual state: */    enterInitialVisualState();}
开发者ID:Klanly,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:32,


示例3: session

void UIMachineWindowFullscreen::prepareMiniToolBar(){    /* Get current machine: */    CMachine machine = session().GetConsole().GetMachine();    /* Check if mini tool-bar should present: */    bool fIsActive = machine.GetExtraData(VBoxDefs::GUI_ShowMiniToolBar) != "no";    if (fIsActive)    {        /* Get the mini tool-bar alignment: */        bool fIsAtTop = machine.GetExtraData(VBoxDefs::GUI_MiniToolBarAlignment) == "top";        /* Get the mini tool-bar auto-hide feature availability: */        bool fIsAutoHide = machine.GetExtraData(VBoxDefs::GUI_MiniToolBarAutoHide) != "off";        m_pMiniToolBar = new VBoxMiniToolBar(centralWidget(),                                             fIsAtTop ? VBoxMiniToolBar::AlignTop : VBoxMiniToolBar::AlignBottom,                                             true, fIsAutoHide);        m_pMiniToolBar->updateDisplay(true, true);        QList<QMenu*> menus;        QList<QAction*> actions = uisession()->newMenu()->actions();        for (int i=0; i < actions.size(); ++i)            menus << actions.at(i)->menu();        *m_pMiniToolBar << menus;        connect(m_pMiniToolBar, SIGNAL(minimizeAction()), this, SLOT(showMinimized()));        connect(m_pMiniToolBar, SIGNAL(exitAction()),                gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SLOT(trigger()));        connect(m_pMiniToolBar, SIGNAL(closeAction()),                gActionPool->action(UIActionIndexRuntime_Simple_Close), SLOT(trigger()));    }}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:28,


示例4: machineWindowWrapper

bool UIMachineViewFullscreen::eventFilter(QObject *pWatched, QEvent *pEvent){    /* Who are we watching? */    QMainWindow *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?                               qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;    if (pWatched != 0 && pWatched == pMainDialog)    {        switch (pEvent->type())        {            case QEvent::Resize:            {                /* Send guest-resize hint only if top window resizing to required dimension: */                QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent);                if (pResizeEvent->size() != workingArea().size())                    break;                /* Set the "guest needs to resize" hint.                 * This hint is acted upon when (and only when) the autoresize property is "true": */                m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics();                if (m_bIsGuestAutoresizeEnabled && m_fShouldWeDoResize)                    QTimer::singleShot(0, this, SLOT(sltPerformGuestResize()));                break;            }            default:                break;        }    }    return UIMachineView::eventFilter(pWatched, pEvent);}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:31,


示例5: actionPool

void UIMachineWindowNormal::sltHandleStatusBarConfigurationChange(const QUuid &uMachineID){    /* Skip unrelated machine IDs: */    if (vboxGlobal().managedVMUuid() != uMachineID)        return;    /* Check whether status-bar is enabled: */    const bool fEnabled = gEDataManager->statusBarEnabled(vboxGlobal().managedVMUuid());    /* Update settings action 'enable' state: */    QAction *pActionStatusBarSettings = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);    pActionStatusBarSettings->setEnabled(fEnabled);    /* Update switch action 'checked' state: */    QAction *pActionStatusBarSwitch = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);    pActionStatusBarSwitch->blockSignals(true);    pActionStatusBarSwitch->setChecked(fEnabled);    pActionStatusBarSwitch->blockSignals(false);    /* Update status-bar visibility: */    statusBar()->setVisible(pActionStatusBarSwitch->isChecked());    /* Update status-bar indicators-pool: */    m_pIndicatorsPool->setAutoUpdateIndicatorStates(statusBar()->isVisible() && uisession()->isRunning());    /* Normalize geometry without moving: */    normalizeGeometry(false /* adjust position */);}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:25,


示例6: checkAvailability

bool UIMachineLogicSeamless::checkAvailability(){    /* Check if there is enough physical memory to enter seamless: */    if (uisession()->isGuestSupportsSeamless())    {        quint64 availBits = machine().GetVRAMSize() /* VRAM */ * _1M /* MiB to bytes */ * 8 /* to bits */;        quint64 usedBits = m_pScreenLayout->memoryRequirements();        if (availBits < usedBits)        {            msgCenter().cannotEnterSeamlessMode(0, 0, 0,                                                (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M);            return false;        }    }    /* Show the info message. */    const UIShortcut &shortcut =            gShortcutPool->shortcut(actionPool()->shortcutsExtraDataID(),                                    actionPool()->action(UIActionIndexRT_M_View_T_Seamless)->shortcutExtraDataID());    const QString strHotKey = QString("Host+%1").arg(shortcut.toString());    if (!msgCenter().confirmGoingSeamless(strHotKey))        return false;    return true;}
开发者ID:miguelinux,项目名称:vbox,代码行数:25,


示例7: AssertReturnVoid

void UIMachineWindowFullscreen::sltEnterNativeFullscreen(UIMachineWindow *pMachineWindow){    /* Make sure this slot is called only under ML and next: */    AssertReturnVoid(vboxGlobal().osRelease() > MacOSXRelease_Lion);    /* Make sure it is NULL or 'this' window passed: */    if (pMachineWindow && pMachineWindow != this)        return;    /* Make sure this window has fullscreen logic: */    UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic());    AssertPtrReturnVoid(pFullscreenLogic);    /* Make sure this window should be shown and mapped to host-screen: */    if (!uisession()->isScreenVisible(m_uScreenId) ||        !pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId))        return;    /* Mark window 'transitioned to fullscreen': */    m_fIsInFullscreenTransition = true;    /* Enter native fullscreen mode if necessary: */    if (   (pFullscreenLogic->screensHaveSeparateSpaces() || m_uScreenId == 0)        && !darwinIsInFullscreenMode(this))        darwinToggleFullscreenMode(this);}
开发者ID:stefano-garzarella,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:26,


示例8: switch

bool UIMachineViewSeamless::eventFilter(QObject *pWatched, QEvent *pEvent){    if (pWatched != 0 && pWatched == machineWindow())    {        switch (pEvent->type())        {            case QEvent::Resize:            {                /* Send guest-resize hint only if top window resizing to required dimension: */                QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent);                if (pResizeEvent->size() != workingArea().size())                    break;                /* Recalculate max guest size: */                setMaxGuestSize();                /* And resize guest to that size: */                if (uisession()->isGuestSupportsGraphics())                    QTimer::singleShot(0, this, SLOT(sltPerformGuestResize()));                break;            }            default:                break;        }    }    return UIMachineView::eventFilter(pWatched, pEvent);}
开发者ID:sobomax,项目名称:virtualbox_64bit_edd,代码行数:27,


示例9: sltPerformGuestResize

void UIMachineViewFullscreen::sltPerformGuestResize(const QSize &toSize){    if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())    {        /* Get machine window: */        QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?                                      qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;        /* If this slot is invoked directly then use the passed size otherwise get         * the available size for the guest display. We assume here that centralWidget()         * contains this view only and gives it all available space: */        QSize newSize(toSize.isValid() ? toSize : pMachineWindow ? pMachineWindow->centralWidget()->size() : QSize());        AssertMsg(newSize.isValid(), ("Size should be valid!/n"));        /* Do not send the same hints as we already have: */        if ((newSize.width() == storedConsoleSize().width()) && (newSize.height() == storedConsoleSize().height()))            return;        /* We only actually send the hint if either an explicit new size was given         * (e.g. if the request was triggered directly by a console resize event) or         * if no explicit size was specified but a resize is flagged as being needed         * (e.g. the autoresize was just enabled and the console was resized while it was disabled). */        if (toSize.isValid() || m_fShouldWeDoResize)        {            /* Remember the new size: */            storeConsoleSize(newSize.width(), newSize.height());            /* Send new size-hint to the guest: */            session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());        }        /* We had requested resize now, rejecting other accident requests: */        m_fShouldWeDoResize = false;    }}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:35,


示例10: machine

void UIMachineWindow::updateAppearanceOf(int iElement){    /* Update window title: */    if (iElement & UIVisualElement_WindowTitle)    {        /* Get machine: */        const CMachine &m = machine();        /* Get machine state: */        KMachineState state = uisession()->machineState();        /* Prepare full name: */        QString strSnapshotName;        if (m.GetSnapshotCount() > 0)        {            CSnapshot snapshot = m.GetCurrentSnapshot();            strSnapshotName = " (" + snapshot.GetName() + ")";        }        QString strMachineName = m.GetName() + strSnapshotName;        if (state != KMachineState_Null)            strMachineName += " [" + gpConverter->toString(state) + "]";        /* Unusual on the Mac. */#ifndef Q_WS_MAC        strMachineName += " - " + defaultWindowTitle();#endif /* !Q_WS_MAC */        if (m.GetMonitorCount() > 1)            strMachineName += QString(" : %1").arg(m_uScreenId + 1);        setWindowTitle(strMachineName);    }}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:28,


示例11: cleanupSeamless

void UIMachineViewSeamless::cleanupSeamless(){    /* If machine still running: */    if (uisession()->isRunning())        /* Reset seamless feature flag of the guest: */        session().GetConsole().GetDisplay().SetSeamlessMode(false);}
开发者ID:greg100795,项目名称:virtualbox,代码行数:7,


示例12: uisession

/* Machine state-change handler: */void UIMouseHandler::sltMachineStateChanged(){    /* Get machine state: */    KMachineState state = uisession()->machineState();    /* Handle particular machine states: */    switch (state)    {        case KMachineState_Paused:        case KMachineState_TeleportingPausedVM:        case KMachineState_Stuck:        {            /* Release the mouse: */            releaseMouse();            break;        }        default:            break;    }    /* Recall reminder about paused VM input     * if we are not in paused VM state already: */    if (machineLogic()->activeMachineWindow() &&        state != KMachineState_Paused &&        state != KMachineState_TeleportingPausedVM)        popupCenter().forgetAboutPausedVMInput(machineLogic()->activeMachineWindow());    // TODO: Is it really required?    /* Notify all listeners: */    emit mouseStateChanged(mouseState());}
开发者ID:bayasist,项目名称:vbox,代码行数:31,


示例13: m_pMachineLogic

UIMachineWindow::UIMachineWindow(UIMachineLogic *pMachineLogic, ulong uScreenId)    : QIWithRetranslateUI2<QMainWindow>(0, pMachineLogic->windowFlags(uScreenId))    , m_pMachineLogic(pMachineLogic)    , m_pMachineView(0)    , m_uScreenId(uScreenId)    , m_pMainLayout(0)    , m_pTopSpacer(0)    , m_pBottomSpacer(0)    , m_pLeftSpacer(0)    , m_pRightSpacer(0){#ifndef Q_WS_MAC    /* On Mac OS X window icon referenced in info.plist is used. */    /* Set default window icon (will be changed to VM-specific icon little bit later): */    setWindowIcon(QIcon(":/VirtualBox_48px.png"));    /* Set redefined machine-window icon if any: */    QIcon *pMachineWidnowIcon = uisession()->machineWindowIcon();    if (pMachineWidnowIcon)        setWindowIcon(*pMachineWidnowIcon);    /* Or set default machine-window icon: */    else        setWindowIcon(vboxGlobal().vmGuestOSTypeIcon(machine().GetOSTypeId()));#endif /* !Q_WS_MAC */}
开发者ID:pombredanne,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:26,


示例14: uisession

void UIMouseHandler::captureMouse(ulong uScreenId){    /* Do not try to capture mouse if its captured already: */    if (uisession()->isMouseCaptured())        return;    /* If such viewport exists: */    if (m_viewports.contains(uScreenId))    {        /* Store mouse-capturing state value: */        uisession()->setMouseCaptured(true);        /* Memorize the index of machine-view-viewport captured mouse: */        m_iMouseCaptureViewIndex = uScreenId;        /* Memorize the host position where the cursor was captured: */        m_capturedMousePos = QCursor::pos();        /* Acquiring visible viewport rectangle in global coodrinates: */        QRect visibleRectangle = m_viewports[m_iMouseCaptureViewIndex]->visibleRegion().boundingRect();        QPoint visibleRectanglePos = m_views[m_iMouseCaptureViewIndex]->mapToGlobal(m_viewports[m_iMouseCaptureViewIndex]->pos());        visibleRectangle.translate(visibleRectanglePos);        visibleRectangle = visibleRectangle.intersected(QApplication::desktop()->availableGeometry(machineLogic()->machineWindows()[m_iMouseCaptureViewIndex]));#ifdef Q_WS_WIN        /* Move the mouse to the center of the visible area: */        m_lastMousePos = visibleRectangle.center();        QCursor::setPos(m_lastMousePos);        /* Update mouse clipping: */        updateMouseCursorClipping();#elif defined (Q_WS_MAC)        /* Grab all mouse events: */        ::darwinMouseGrab(m_viewports[m_iMouseCaptureViewIndex]);#else /* Q_WS_MAC */        /* Remember current mouse position: */        m_lastMousePos = QCursor::pos();        /* Grab all mouse events: */        m_viewports[m_iMouseCaptureViewIndex]->grabMouse();#endif /* !Q_WS_MAC */        /* Switch guest mouse to the relative mode: */        mouse().PutMouseEvent(0, 0, 0, 0, 0);        /* Notify all the listeners: */        emit sigStateChange(state());    }}
开发者ID:mcenirm,项目名称:vbox,代码行数:47,


示例15: setMenuBar

void UIMachineWindowNormal::prepareMenu(){    /* Call to base-class: */    UIMachineWindow::prepareMenu();    /* Prepare menu-bar: */    setMenuBar(uisession()->newMenuBar());}
开发者ID:ryenus,项目名称:vbox,代码行数:8,


示例16: workingArea

void UIMachineViewSeamless::normalizeGeometry(bool /* fAdjustPosition */){    /* Check if we should adjust guest to new size: */    if ((int)frameBuffer()->width() != workingArea().size().width() ||        (int)frameBuffer()->height() != workingArea().size().height())        if (uisession()->isGuestSupportsGraphics())            sltPerformGuestResize(workingArea().size());}
开发者ID:etiago,项目名称:vbox,代码行数:8,


示例17: uisession

void UIMachineWindowSeamless::prepareMenu(){    /* Call to base-class: */    UIMachineWindow::prepareMenu();    /* Prepare menu: */    m_pMainMenu = uisession()->newMenu();}
开发者ID:mutoso-mirrors,项目名称:vbox,代码行数:8,


示例18: cleanupFullscreen

void UIMachineViewFullscreen::cleanupFullscreen(){    /* If machine still running: */    if (uisession()->isRunning())    {        /* And guest supports advanced graphics management which is enabled: */        if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())        {            /* Rollback seamless frame-buffer size to normal: */            machineWindowWrapper()->machineWindow()->hide();            sltPerformGuestResize(guestSizeHint());            m_pSyncBlocker->exec();            /* Request to delete sync-blocker: */            m_pSyncBlocker->deleteLater();        }    }}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:18,


示例19: workingArea

void UIMachineViewSeamless::adjustGuestScreenSize(){    /* Acquire working-area size: */    const QSize workingAreaSize = workingArea().size();    /* Acquire frame-buffer size: */    QSize frameBufferSize(frameBuffer()->width(), frameBuffer()->height());    /* Take the scale-factor(s) into account: */    frameBufferSize = scaledForward(frameBufferSize);    /* Check if we should adjust guest-screen to new size: */    if (frameBuffer()->isAutoEnabled() ||        frameBufferSize != workingAreaSize)        if (uisession()->isGuestSupportsGraphics() &&            uisession()->isScreenVisible(screenId()))        {            frameBuffer()->setAutoEnabled(false);            sltPerformGuestResize(workingArea().size());        }}
开发者ID:sobomax,项目名称:virtualbox_64bit_edd,代码行数:18,


示例20: prepareMenu

void UIMachineLogicSeamless::prepareMenu(){    /* Call to base-class: */    UIMachineLogic::prepareMenu();    /* Finally update view-menu, if necessary: */    if (uisession()->allowedActionsMenuView() & RuntimeMenuViewActionType_Multiscreen)        m_pScreenLayout->setViewMenu(gActionPool->action(UIActionIndexRuntime_Menu_View)->menu());}
开发者ID:bayasist,项目名称:vbox,代码行数:9,


示例21: LogRel

void UIMachineLogicSeamless::sltMachineStateChanged(){    /* Call to base-class: */    UIMachineLogic::sltMachineStateChanged();    /* If machine-state changed from 'paused' to 'running': */    if (uisession()->isRunning() && uisession()->wasPaused())    {        LogRel(("GUI: UIMachineLogicSeamless::sltMachineStateChanged:"                "Machine-state changed from 'paused' to 'running': "                "Adjust machine-window geometry.../n"));        /* Make sure further code will be called just once: */        uisession()->forgetPreviousMachineState();        /* Adjust machine-window geometry if necessary: */        adjustMachineWindowsGeometry();    }}
开发者ID:miguelinux,项目名称:vbox,代码行数:18,


示例22: uisession

void UIMachineView::sltMachineStateChanged(){    /* Get machine state: */    KMachineState state = uisession()->machineState();    switch (state)    {        case KMachineState_Paused:        case KMachineState_TeleportingPausedVM:        {            if (   vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode                && m_pFrameBuffer                &&                (   state           != KMachineState_TeleportingPausedVM                 || m_previousState != KMachineState_Teleporting))            {                takePauseShotLive();                /* Fully repaint to pick up m_pauseShot: */                viewport()->update();            }            break;        }        case KMachineState_Restoring:        {            /* Only works with the primary screen currently. */            if (screenId() == 0)            {                takePauseShotSnapshot();                /* Fully repaint to pick up m_pauseShot: */                viewport()->update();            }            break;        }        case KMachineState_Running:        {            if (   m_previousState == KMachineState_Paused                || m_previousState == KMachineState_TeleportingPausedVM                || m_previousState == KMachineState_Restoring)            {                if (vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode && m_pFrameBuffer)                {                    /* Reset the pixmap to free memory: */                    resetPauseShot();                    /* Ask for full guest display update (it will also update                     * the viewport through IFramebuffer::NotifyUpdate): */                    CDisplay dsp = session().GetConsole().GetDisplay();                    dsp.InvalidateAndUpdate();                }            }            break;        }        default:            break;    }    m_previousState = state;}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:56,


示例23: setGuestAutoresizeEnabled

void UIMachineViewFullscreen::setGuestAutoresizeEnabled(bool fEnabled){    if (m_bIsGuestAutoresizeEnabled != fEnabled)    {        m_bIsGuestAutoresizeEnabled = fEnabled;        if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())            sltPerformGuestResize();    }}
开发者ID:miguelinux,项目名称:vbox,代码行数:10,


示例24: AssertPtrReturnVoid

void UIMachineWindowSeamless::showInNecessaryMode(){    /* Make sure this window has seamless logic: */    UIMachineLogicSeamless *pSeamlessLogic = qobject_cast<UIMachineLogicSeamless*>(machineLogic());    AssertPtrReturnVoid(pSeamlessLogic);    /* Make sure this window should be shown and mapped to some host-screen: */    if (!uisession()->isScreenVisible(m_uScreenId) ||        !pSeamlessLogic->hasHostScreenForGuestScreen(m_uScreenId))    {#ifndef Q_WS_MAC        /* If there is mini-toolbar: */        if (m_pMiniToolBar)        {            /* Just hide mini-toolbar: */            m_pMiniToolBar->hide();        }#endif /* !Q_WS_MAC */        /* Hide window: */        hide();        return;    }    /* Make sure this window is not minimized: */    if (isMinimized())        return;    /* Make sure this window is maximized and placed on valid screen: */    placeOnScreen();    /* Show in normal mode: */    show();    /* Adjust machine-view size if necessary: */    adjustMachineViewSize();#ifndef Q_WS_MAC    /* If there is mini-toolbar: */    if (m_pMiniToolBar)    {# if   defined(Q_WS_WIN)        /* Just show mini-toolbar: */        m_pMiniToolBar->show();# elif defined(Q_WS_X11)        /* Allow mini-toolbar to be located on full-screen area: */        m_pMiniToolBar->showMaximized();        /* Make sure mini-toolbar is always on top of machine-window: */        VBoxGlobal::setTransientFor(m_pMiniToolBar, this);# endif /* Q_WS_X11 */    }#endif /* !Q_WS_MAC */    /* Make sure machine-view have focus: */    m_pMachineView->setFocus();}
开发者ID:zBMNForks,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:55,



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


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