VirtualBox

Changeset 108664 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 20, 2025 4:39:19 PM (4 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168077
Message:

FE/Qt: bugref:10814: VBox Manager: Switch everything from hamburger Machine tools to tool-bar Machine tools; Corresponding cleanup still required in Chooser pane.

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

Legend:

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

    r108356 r108664  
    292292        case UIToolType_Machines:
    293293        case UIToolType_Managers:
    294         case UIToolType_Extensions:
    295         case UIToolType_Media:
    296         case UIToolType_Network:
    297         case UIToolType_Cloud:
    298         case UIToolType_CloudConsole:
    299         case UIToolType_Activities:
    300294            return UIToolClass_Global;
    301295        case UIToolType_Error:
     
    306300        case UIToolType_FileManager:
    307301            return UIToolClass_Machine;
     302        case UIToolType_Extensions:
     303        case UIToolType_Media:
     304        case UIToolType_Network:
     305        case UIToolType_Cloud:
     306        case UIToolType_CloudConsole:
     307        case UIToolType_Activities:
     308            return UIToolClass_Management;
    308309        default:
    309310            break;
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r108356 r108664  
    958958    UIToolType_Machines,
    959959    UIToolType_Managers,
    960     UIToolType_Extensions,
    961     UIToolType_Media,
    962     UIToolType_Network,
    963     UIToolType_Cloud,
    964     UIToolType_CloudConsole,
    965     UIToolType_Activities,
    966960    /* Machine types: */
    967961    UIToolType_Error,
     
    970964    UIToolType_Logs,
    971965    UIToolType_VMActivity,
    972     UIToolType_FileManager
     966    UIToolType_FileManager,
     967    /* Management types: */
     968    UIToolType_Extensions,
     969    UIToolType_Media,
     970    UIToolType_Network,
     971    UIToolType_Cloud,
     972    UIToolType_CloudConsole,
     973    UIToolType_Activities
    973974};
    974975Q_DECLARE_METATYPE(UIToolType);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.cpp

    r108663 r108664  
    125125    toolPaneManagement()->setActive(enmType == UIToolType_Managers);
    126126
    127     /* Special handling for Activities Global tool,
    128      * start unconditionally updating all cloud VMs: */
    129     if (enmType == UIToolType_Activities)
    130     {
    131         chooser()->setKeepCloudNodesUpdated(true);
    132         toolPane()->setCloudMachineItems(chooser()->cloudMachineItems());
    133     }
    134     /* Otherwise, stop unconditionally updating all cloud VMs,
    135      * (tho they will still be updated if selected) */
    136     else
    137         chooser()->setKeepCloudNodesUpdated(false);
    138 
    139127    /* Let the parent know: */
    140128    emit sigToolTypeChange();
     
    196184void UIGlobalToolsWidget::sltHandleCloudProfileStateChange(const QString &, const QString &)
    197185{
    198     /* If Global Activities tool is currently chosen: */
    199     AssertPtrReturnVoid(toolPane());
    200     if (toolType() == UIToolType_Activities)
    201     {
    202         /* Propagate a set of cloud machine items to Global tool-pane: */
    203         toolPane()->setCloudMachineItems(chooser()->cloudMachineItems());
     186    /* If Management Activities tool is currently chosen: */
     187    AssertPtrReturnVoid(toolPaneManagement());
     188    if (toolPaneManagement()->currentTool() == UIToolType_Activities)
     189    {
     190        /* Propagate a set of cloud machine items to Management tool-pane: */
     191        toolPaneManagement()->setCloudMachineItems(chooser()->cloudMachineItems());
    204192    }
    205193}
    206194
    207195void UIGlobalToolsWidget::sltHandleGlobalToolMenuUpdate()
     196{
     197    /* Prepare tool restrictions: */
     198    QSet<UIToolType> restrictedTypes;
     199
     200    /* Make sure Machines tool is hidden for empty Chooser-pane: */
     201    if (chooser()->isNavigationListEmpty())
     202        restrictedTypes << UIToolType_Machines;
     203
     204    /* Make sure no restricted tool is selected: */
     205    if (restrictedTypes.contains(toolMenu()->toolsType(UIToolClass_Global)))
     206        setMenuToolType(UIToolType_Home);
     207
     208    /* Hide restricted tools in the menu: */
     209    const QList restrictions(restrictedTypes.begin(), restrictedTypes.end());
     210    toolMenu()->setRestrictedToolTypes(UIToolClass_Global, restrictions);
     211
     212    /* Close all restricted tools (besides the Machines and Management): */
     213    foreach (const UIToolType &enmRestrictedType, restrictedTypes)
     214        if (   enmRestrictedType != UIToolType_Machines
     215            && enmRestrictedType != UIToolType_Managers)
     216            toolPane()->closeTool(enmRestrictedType);
     217}
     218
     219void UIGlobalToolsWidget::sltHandleMachineToolMenuUpdate(UIVirtualMachineItem *pItem)
     220{
     221    /* Prepare tool restrictions: */
     222    QSet<UIToolType> restrictedTypes;
     223
     224    /* Restrict some types for Basic mode: */
     225    const bool fExpertMode = gEDataManager->isSettingsInExpertMode();
     226    if (!fExpertMode)
     227        restrictedTypes << UIToolType_FileManager;
     228
     229    /* Make sure local VM tools are hidden for cloud VMs: */
     230    if (pItem && pItem->itemType() != UIVirtualMachineItemType_Local)
     231        restrictedTypes << UIToolType_Snapshots
     232                        << UIToolType_Logs
     233                        << UIToolType_FileManager;
     234
     235    /* Make sure no restricted tool is selected: */
     236    if (restrictedTypes.contains(toolMenu()->toolsType(UIToolClass_Machine)))
     237        setMenuToolType(UIToolType_Details);
     238
     239    /* Hide restricted tools in the menu: */
     240    const QList restrictions(restrictedTypes.begin(), restrictedTypes.end());
     241    toolMenu()->setRestrictedToolTypes(UIToolClass_Machine, restrictions);
     242
     243    /// @todo finish that
     244    // /* Disable even unrestricted tools for inacccessible VMs: */
     245    // const bool fCurrentItemIsOk = isItemAccessible(pItem);
     246    // toolMenu()->setItemsEnabled(fCurrentItemIsOk);
     247
     248    /* Close all restricted tools: */
     249    foreach (const UIToolType &enmRestrictedType, restrictedTypes)
     250        toolPaneMachine()->closeTool(enmRestrictedType);
     251}
     252
     253void UIGlobalToolsWidget::sltHandleManagementToolMenuUpdate()
    208254{
    209255    /* Prepare tool restrictions: */
     
    216262                        << UIToolType_Network;
    217263
    218     /* Make sure Machines tool is hidden for empty Chooser-pane: */
    219     if (chooser()->isNavigationListEmpty())
    220         restrictedTypes << UIToolType_Machines;
    221 
    222     /* Make sure no restricted tool is selected: */
    223     if (restrictedTypes.contains(toolMenu()->toolsType(UIToolClass_Global)))
    224         setMenuToolType(UIToolType_Home);
    225 
    226     /* Hide restricted tools in the menu: */
    227     const QList restrictions(restrictedTypes.begin(), restrictedTypes.end());
    228     toolMenu()->setRestrictedToolTypes(UIToolClass_Global, restrictions);
    229 
    230     /* Close all restricted tools (besides the Machines and Management): */
    231     foreach (const UIToolType &enmRestrictedType, restrictedTypes)
    232         if (   enmRestrictedType != UIToolType_Machines
    233             && enmRestrictedType != UIToolType_Managers)
    234             toolPane()->closeTool(enmRestrictedType);
    235 }
    236 
    237 void UIGlobalToolsWidget::sltHandleMachineToolMenuUpdate(UIVirtualMachineItem *pItem)
    238 {
    239     /* Prepare tool restrictions: */
    240     QSet<UIToolType> restrictedTypes;
    241 
    242     /* Restrict some types for Basic mode: */
    243     const bool fExpertMode = gEDataManager->isSettingsInExpertMode();
    244     if (!fExpertMode)
    245         restrictedTypes << UIToolType_FileManager;
    246 
    247     /* Make sure local VM tools are hidden for cloud VMs: */
    248     if (pItem && pItem->itemType() != UIVirtualMachineItemType_Local)
    249         restrictedTypes << UIToolType_Snapshots
    250                         << UIToolType_Logs
    251                         << UIToolType_FileManager;
    252 
    253     /* Make sure no restricted tool is selected: */
    254     if (restrictedTypes.contains(toolMenu()->toolsType(UIToolClass_Machine)))
    255         setMenuToolType(UIToolType_Details);
    256 
    257     /* Hide restricted tools in the menu: */
    258     const QList restrictions(restrictedTypes.begin(), restrictedTypes.end());
    259     toolMenu()->setRestrictedToolTypes(UIToolClass_Machine, restrictions);
    260 
    261     /// @todo finish that
    262     // /* Disable even unrestricted tools for inacccessible VMs: */
    263     // const bool fCurrentItemIsOk = isItemAccessible(pItem);
    264     // toolMenu()->setItemsEnabled(fCurrentItemIsOk);
    265 
    266     /* Close all restricted tools: */
    267     foreach (const UIToolType &enmRestrictedType, restrictedTypes)
    268         toolPaneMachine()->closeTool(enmRestrictedType);
    269 }
    270 
    271 void UIGlobalToolsWidget::sltHandleManagementToolMenuUpdate()
    272 {
    273     /* Prepare tool restrictions: */
    274     QSet<UIToolType> restrictedTypes;
    275 
    276264    /* Make sure no restricted tool is selected: */
    277265    if (restrictedTypes.contains(toolMenu()->toolsType(UIToolClass_Management)))
     
    305293    else if (enmClass == UIToolClass_Machine)
    306294        machineToolsWidget()->switchToolTo(enmType);
    307     /* For Management tool class => switch tool-pane accordingly: */
     295    /* For Management tool class: */
    308296    else if (enmClass == UIToolClass_Management)
     297    {
     298        /* Switch tool-pane accordingly: */
    309299        managementToolsWidget()->switchToolTo(enmType);
     300
     301        /* Special handling for Activities Management tool,
     302         * start unconditionally updating all cloud VMs: */
     303        if (enmType == UIToolType_Activities)
     304        {
     305            chooser()->setKeepCloudNodesUpdated(true);
     306            toolPaneManagement()->setCloudMachineItems(chooser()->cloudMachineItems());
     307        }
     308        /* Otherwise, stop unconditionally updating all cloud VMs,
     309         * (tho they will still be updated if selected) */
     310        else
     311            chooser()->setKeepCloudNodesUpdated(false);
     312    }
     313}
     314
     315void UIGlobalToolsWidget::sltSwitchToVMActivityTool(const QUuid &uMachineId)
     316{
     317    AssertPtrReturnVoid(chooser());
     318    chooser()->setCurrentMachine(uMachineId);
     319    setMenuToolType(UIToolType_VMActivity);
    310320}
    311321
     
    336346
    337347        /* Create tool-menu: */
    338         m_pMenu = new UITools(this, UIToolClass_Global, actionPool(), Qt::Widget);
     348        m_pMenu = new UITools(this, UIToolClass_Invalid, actionPool(), Qt::Widget);
    339349        if (toolMenu())
    340350        {
     
    380390    connect(this, &UIGlobalToolsWidget::sigToolMenuUpdate,
    381391            this, &UIGlobalToolsWidget::sltHandleManagementToolMenuUpdate);
     392    connect(toolPane(), &UIToolPane::sigSwitchToMachineActivityPane,
     393            this, &UIGlobalToolsWidget::sltSwitchToVMActivityTool);
    382394    connect(machineToolsWidget(), &UIMachineToolsWidget::sigToolMenuUpdate,
    383395            this, &UIGlobalToolsWidget::sltHandleMachineToolMenuUpdate);
     
    426438    disconnect(this, &UIGlobalToolsWidget::sigToolMenuUpdate,
    427439               this, &UIGlobalToolsWidget::sltHandleManagementToolMenuUpdate);
     440    disconnect(toolPane(), &UIToolPane::sigSwitchToMachineActivityPane,
     441               this, &UIGlobalToolsWidget::sltSwitchToVMActivityTool);
    428442    disconnect(machineToolsWidget(), &UIMachineToolsWidget::sigToolMenuUpdate,
    429443               this, &UIGlobalToolsWidget::sltHandleMachineToolMenuUpdate);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.h

    r108663 r108664  
    151151        /** Handles signal requesting switch to Activities tool. */
    152152        void sltSwitchToActivitiesTool();
     153        /** Handles signal requesting switch to VM Activity tool. */
     154        void sltSwitchToVMActivityTool(const QUuid &uMachineId);
    153155    /** @} */
    154156
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.cpp

    r108663 r108664  
    3939#include "UIMachineToolsWidget.h"
    4040#include "UIToolPane.h"
    41 #include "UITools.h"
    4241#include "UITranslationEventListener.h"
    4342#include "UIVirtualBoxEventHandler.h"
     
    5251    , m_pPaneChooser(0)
    5352    , m_pPaneTools(0)
    54     , m_pMenuTools(0)
    5553    , m_enmSelectionType(SelectionType_Invalid)
    5654    , m_fSelectedMachineItemAccessible(false)
     
    135133}
    136134
    137 UIToolType UIMachineToolsWidget::menuToolType() const
    138 {
    139     AssertPtrReturn(toolMenu(), UIToolType_Invalid);
    140     return toolMenu()->toolsType(UIToolClass_Machine);
    141 }
    142 
    143 void UIMachineToolsWidget::setMenuToolType(UIToolType enmType)
    144 {
    145     /* Sanity check: */
    146     AssertReturnVoid(enmType != UIToolType_Invalid);
    147     /* Make sure new tool type is of Machine class: */
    148     AssertReturnVoid(UIToolStuff::isTypeOfClass(enmType, UIToolClass_Machine));
    149 
    150     AssertPtrReturnVoid(toolMenu());
    151     toolMenu()->setToolsType(enmType);
    152 }
    153 
    154135UIToolType UIMachineToolsWidget::toolType() const
    155136{
     
    307288    if (fCurrentItemIsOk)
    308289    {
    309         /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */
     290        /* If Error-pane is chosen currently => switch to Details: */
    310291        if (toolPane()->currentTool() == UIToolType_Error)
    311             switchToolTo(toolMenu()->toolsType(UIToolClass_Machine));
     292            switchToolTo(UIToolType_Details);
    312293
    313294        /* If we still have same item selected: */
     
    336317    /* Pass the signal further: */
    337318    emit sigCloudMachineStateChange(uId);
    338 }
    339 
    340 void UIMachineToolsWidget::sltHandleToolMenuUpdate(UIVirtualMachineItem *pItem)
    341 {
    342     /* Prepare tool restrictions: */
    343     QSet<UIToolType> restrictedTypes;
    344 
    345     /* Restrict some types for Basic mode: */
    346     const bool fExpertMode = gEDataManager->isSettingsInExpertMode();
    347     if (!fExpertMode)
    348         restrictedTypes << UIToolType_FileManager;
    349 
    350     /* Make sure local VM tools are hidden for cloud VMs: */
    351     if (pItem && pItem->itemType() != UIVirtualMachineItemType_Local)
    352         restrictedTypes << UIToolType_Snapshots
    353                         << UIToolType_Logs
    354                         << UIToolType_FileManager;
    355 
    356     /* Make sure no restricted tool is selected: */
    357     if (restrictedTypes.contains(toolMenu()->toolsType(UIToolClass_Machine)))
    358         setMenuToolType(UIToolType_Details);
    359 
    360     /* Hide restricted tools in the menu: */
    361     const QList restrictions(restrictedTypes.begin(), restrictedTypes.end());
    362     toolMenu()->setRestrictedToolTypes(UIToolClass_Machine, restrictions);
    363 
    364     /* Disable even unrestricted tools for inacccessible VMs: */
    365     const bool fCurrentItemIsOk = isItemAccessible(pItem);
    366     toolMenu()->setItemsEnabled(fCurrentItemIsOk);
    367 
    368     /* Close all restricted tools: */
    369     foreach (const UIToolType &enmRestrictedType, restrictedTypes)
    370         toolPane()->closeTool(enmRestrictedType);
    371 }
    372 
    373 void UIMachineToolsWidget::sltHandleToolMenuRequested(const QPoint &position, UIVirtualMachineItem *pItem)
    374 {
    375     /* Update tools restrictions for item specified: */
    376     AssertPtrReturnVoid(pItem);
    377     if (pItem)
    378         emit sigToolMenuUpdate(pItem);
    379 
    380     /* Compose popup-menu geometry first of all: */
    381     QRect ourGeo = QRect(position, toolMenu()->minimumSizeHint());
    382     /* Adjust location only to properly fit into available geometry space: */
    383     const QRect availableGeo = gpDesktop->availableGeometry(position);
    384     ourGeo = gpDesktop->normalizeGeometry(ourGeo, availableGeo, false /* resize? */);
    385 
    386     /* Move, resize and show: */
    387     toolMenu()->move(ourGeo.topLeft());
    388     toolMenu()->show();
    389     // WORKAROUND:
    390     // Don't want even to think why, but for Qt::Popup resize to
    391     // smaller size often being ignored until it is actually shown.
    392     toolMenu()->resize(ourGeo.size());
    393 }
    394 
    395 void UIMachineToolsWidget::sltHandleToolsMenuIndexChange(UIToolType enmType)
    396 {
    397     switchToolTo(enmType);
    398 }
    399 
    400 void UIMachineToolsWidget::sltSwitchToVMActivityTool(const QUuid &uMachineId)
    401 {
    402     AssertPtrReturnVoid(chooser());
    403     AssertPtrReturnVoid(toolMenu());
    404     chooser()->setCurrentMachine(uMachineId);
    405     toolMenu()->setToolsType(UIToolType_VMActivity);
    406319}
    407320
     
    461374            pLayout->addWidget(m_pSplitter);
    462375        }
    463 
    464         /* Create tools-menu: */
    465         m_pMenuTools = new UITools(this, UIToolClass_Machine, actionPool());
    466376    }
    467377
     
    482392            this, &UIMachineToolsWidget::sltHandleSettingsExpertModeChange);
    483393
    484     /* Parent connections: */
    485     connect(m_pParent, &UIToolPane::sigSwitchToMachineActivityPane,
    486             this, &UIMachineToolsWidget::sltSwitchToVMActivityTool);
    487 
    488394    /* Splitter connections: */
    489395    connect(m_pSplitter, &QISplitter::splitterMoved,
     
    495401    connect(chooser(), &UIChooser::sigSelectionInvalidated,
    496402            this, &UIMachineToolsWidget::sltHandleChooserPaneSelectionInvalidated);
    497     connect(chooser(), &UIChooser::sigToolMenuRequested,
    498             this, &UIMachineToolsWidget::sltHandleToolMenuRequested);
    499403    connect(chooser(), &UIChooser::sigCloudMachineStateChange,
    500404            this, &UIMachineToolsWidget::sltHandleCloudMachineStateChange);
     
    503407    connect(chooser(), &UIChooser::sigToggleFinished,
    504408            toolPane(), &UIToolPane::sigToggleFinished);
    505 
    506     /* Tools-menu connections: */
    507     connect(this, &UIMachineToolsWidget::sigToolMenuUpdate,
    508             this, &UIMachineToolsWidget::sltHandleToolMenuUpdate);
    509     connect(toolMenu(), &UITools::sigSelectionChanged,
    510             this, &UIMachineToolsWidget::sltHandleToolsMenuIndexChange);
    511409}
    512410
     
    524422        m_pSplitter->setSizes(sizes);
    525423    }
    526 
    527     /* Acquire & select tool currently chosen in the menu: */
    528     sltHandleToolsMenuIndexChange(toolMenu()->toolsType(UIToolClass_Machine));
    529424}
    530425
     
    537432               this, &UIMachineToolsWidget::sltHandleSettingsExpertModeChange);
    538433
    539     /* Parent connections: */
    540     disconnect(m_pParent, &UIToolPane::sigSwitchToMachineActivityPane,
    541                this, &UIMachineToolsWidget::sltSwitchToVMActivityTool);
    542 
    543434    /* Splitter connections: */
    544435    disconnect(m_pSplitter, &QISplitter::splitterMoved,
     
    550441    disconnect(chooser(), &UIChooser::sigSelectionInvalidated,
    551442               this, &UIMachineToolsWidget::sltHandleChooserPaneSelectionInvalidated);
    552     disconnect(chooser(), &UIChooser::sigToolMenuRequested,
    553                this, &UIMachineToolsWidget::sltHandleToolMenuRequested);
    554443    disconnect(chooser(), &UIChooser::sigCloudMachineStateChange,
    555444               this, &UIMachineToolsWidget::sltHandleCloudMachineStateChange);
     
    558447    disconnect(chooser(), &UIChooser::sigToggleFinished,
    559448               toolPane(), &UIToolPane::sigToggleFinished);
    560 
    561     /* Tools-menu connections: */
    562     disconnect(this, &UIMachineToolsWidget::sigToolMenuUpdate,
    563                this, &UIMachineToolsWidget::sltHandleToolMenuUpdate);
    564     disconnect(toolMenu(), &UITools::sigSelectionChanged,
    565                this, &UIMachineToolsWidget::sltHandleToolsMenuIndexChange);
    566 }
    567 
    568 UITools *UIMachineToolsWidget::toolMenu() const
    569 {
    570     return m_pMenuTools;
    571449}
    572450
     
    584462    if (fCurrentItemIsOk)
    585463    {
    586         /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */
     464        /* If Error-pane is chosen currently => switch to Details: */
    587465        if (toolPane()->currentTool() == UIToolType_Error)
    588             switchToolTo(toolMenu()->toolsType(UIToolClass_Machine));
     466            switchToolTo(UIToolType_Details);
    589467
    590468        /* Propagate current items to the Tools pane: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.h

    r108663 r108664  
    4545class UIChooser;
    4646class UIToolPane;
    47 class UITools;
    4847class UIVirtualMachineItem;
    4948
     
    129128        UIToolPane *toolPane() const;
    130129
    131         /** Returns menu tool type. */
    132         UIToolType menuToolType() const;
    133         /** Defines menu tool @a enmType. */
    134         void setMenuToolType(UIToolType enmType);
    135 
    136130        /** Returns pane tool type. */
    137131        UIToolType toolType() const;
     
    193187    /** @} */
    194188
    195     /** @name Tools pane stuff.
    196       * @{ */
    197         /** Handles request for tools menu update for the @a pItem specified. */
    198         void sltHandleToolMenuUpdate(UIVirtualMachineItem *pItem);
    199 
    200         /** Handles tool popup-menu request. */
    201         void sltHandleToolMenuRequested(const QPoint &position, UIVirtualMachineItem *pItem);
    202 
    203         /** Handles signal about Tools-menu index change.
    204           * @param  enmType  Brings current tool type. */
    205         void sltHandleToolsMenuIndexChange(UIToolType enmType);
    206 
    207         /** Handles signal requesting switch to VM Activity tool. */
    208         void sltSwitchToVMActivityTool(const QUuid &uMachineId);
    209     /** @} */
    210 
    211189private:
    212190
     
    234212    /** @name Tools pane stuff.
    235213      * @{ */
    236         /** Returns tool-menu instance. */
    237         UITools *toolMenu() const;
    238 
    239214        /** Recaches current machine item information.
    240215          * @param  fDontRaiseErrorPane  Brings whether we should not raise error-pane. */
     
    253228    /** Holds the Tools-pane instance. */
    254229    UIToolPane *m_pPaneTools;
    255     /** Holds the Tools-menu instance. */
    256     UITools    *m_pMenuTools;
    257230
    258231    /** Holds the last selection type. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxWidget.cpp

    r108663 r108664  
    232232{
    233233    AssertPtrReturnVoid(machineToolsWidget());
    234     machineToolsWidget()->setMenuToolType(enmType);
     234    globalToolsWidget()->setMenuToolType(enmType);
    235235}
    236236
     
    238238{
    239239    AssertPtrReturn(machineToolsWidget(), UIToolType_Invalid);
    240     return machineToolsWidget()->menuToolType();
     240    return globalToolsWidget()->menuToolType(UIToolClass_Machine);
    241241}
    242242
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp

    r108147 r108664  
    10971097{
    10981098    /* Prepare variables: */
    1099     const int iFullWidth = rectangle.width();
     1099    // const int iFullWidth = rectangle.width();
    11001100    const int iFullHeight = rectangle.height();
    11011101    const int iMarginHL = data(MachineItemData_MarginHL).toInt();
    1102     const int iMarginHR = data(MachineItemData_MarginHR).toInt();
     1102    // const int iMarginHR = data(MachineItemData_MarginHR).toInt();
    11031103    const int iMajorSpacing = data(MachineItemData_MajorSpacing).toInt();
    11041104    const int iMinorSpacing = data(MachineItemData_MinorSpacing).toInt();
    11051105    const int iMachineItemTextSpacing = data(MachineItemData_TextSpacing).toInt();
    1106     const int iButtonMargin = data(MachineItemData_ButtonMargin).toInt();
     1106    // const int iButtonMargin = data(MachineItemData_ButtonMargin).toInt();
    11071107
    11081108    /* Selected or hovered item foreground: */
     
    12441244    }
    12451245
     1246#if 0
    12461247    /* Calculate indents: */
    12471248    QGraphicsView *pView = model()->scene()->views().first();
     
    12811282                    m_toolPixmap);
    12821283    }
     1284#endif
    12831285}
    12841286
Note: See TracChangeset for help on using the changeset viewer.

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