VirtualBox

Ignore:
Timestamp:
Jun 10, 2014 5:06:58 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: 6660: Advanced extra-data management framework: Integrate GUI_PassCAD.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r51591 r51595  
    405405bool UIExtraDataManager::selectorWindowToolBarVisible() const
    406406{
    407     /* Show unless feature restricted: */
     407    /* 'True' unless feature restricted: */
    408408    return !isFeatureRestricted(GUI_Toolbar);
    409409}
     
    417417bool UIExtraDataManager::selectorWindowStatusBarVisible() const
    418418{
    419     /* Show unless feature restricted: */
     419    /* 'True' unless feature restricted: */
    420420    return !isFeatureRestricted(GUI_Statusbar);
    421421}
     
    941941{
    942942    return gpConverter->fromInternalString<HiDPIOptimizationType>(extraDataString(GUI_HiDPI_Optimization, strID));
     943}
     944
     945bool UIExtraDataManager::passCADtoGuest(const QString &strID) const
     946{
     947    /* 'False' unless feature allowed: */
     948    return isFeatureAllowed(GUI_PassCAD, strID);
    943949}
    944950
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r51588 r51595  
    271271    HiDPIOptimizationType hiDPIOptimizationType(const QString &strID) const;
    272272
     273    /** Returns whether VM should pass CAD to guest. */
     274    bool passCADtoGuest(const QString &strID) const;
     275
    273276private slots:
    274277
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r51439 r51595  
    3939#include "UIMachineView.h"
    4040#include "UIHostComboEditor.h"
     41#include "UIExtraDataManager.h"
    4142
    4243/* Other VBox includes: */
     
    762763    , m_bIsHostComboAlone(false)
    763764    , m_bIsHostComboProcessed(false)
    764     , m_fPassCAD(false)
     765    , m_fPassCADtoGuest(false)
    765766    , m_fDebuggerActive(false)
    766767#if defined(Q_WS_WIN)
     
    810811    /* Extra data settings: */
    811812    {
    812         /* CAD settings: */
    813         QString passCAD = session().GetConsole().GetMachine().GetExtraData(GUI_PassCAD);
    814         if (!passCAD.isEmpty() && passCAD != "false" && passCAD != "no")
    815             m_fPassCAD = true;
     813        /* CAD setting: */
     814        m_fPassCADtoGuest = gEDataManager->passCADtoGuest(vboxGlobal().managedVMUuid());
    816815    }
    817816}
     
    12281227bool UIKeyboardHandler::keyEventCADHandled(uint8_t uScan)
    12291228{
    1230     /* Check if it's C-A-D and GUI/PassCAD is not true: */
    1231     if (!m_fPassCAD &&
     1229    /* Check if it's C-A-D and GUI/PassCAD is not set/allowed: */
     1230    if (!m_fPassCADtoGuest &&
    12321231        uScan == 0x53 /* Del */ &&
    12331232        ((m_pressedKeys[0x38] & IsKeyPressed) /* Alt */ ||
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h

    r51187 r51595  
    172172    bool m_bIsHostComboAlone : 1;
    173173    bool m_bIsHostComboProcessed : 1;
    174     bool m_fPassCAD : 1;
     174    bool m_fPassCADtoGuest : 1;
    175175    /** Whether the debugger is active.
    176176     * Currently only affects auto capturing. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette