VirtualBox

Changeset 102814 in vbox


Ignore:
Timestamp:
Jan 10, 2024 1:10:55 PM (15 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161002
Message:

FE/Qt: A bit of cleanup for UIVirtualBoxManagerWidget; Split doxy stuff related to Common and Tools section into separate sections; A bit of corresponding reordering.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r102813 r102814  
    10831083}
    10841084
     1085void UIVirtualBoxManagerWidget::recacheCurrentMachineItemInformation(bool fDontRaiseErrorPane /* = false */)
     1086{
     1087    /* Sanity check, this method is for machine or group of machine items: */
     1088    if (!isMachineItemSelected() && !isGroupItemSelected())
     1089        return;
     1090
     1091    /* Get current item: */
     1092    UIVirtualMachineItem *pItem = currentItem();
     1093    const bool fCurrentItemIsOk = pItem && pItem->accessible();
     1094
     1095    /* If current item is Ok: */
     1096    if (fCurrentItemIsOk)
     1097    {
     1098        /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */
     1099        if (m_pPaneToolsMachine->currentTool() == UIToolType_Error)
     1100            switchMachineToolTo(m_pMenuToolsMachine->toolsType());
     1101
     1102        /* Propagate current items to the Tools pane: */
     1103        m_pPaneToolsMachine->setItems(currentItems());
     1104    }
     1105    /* Otherwise if we were not asked separately to calm down: */
     1106    else if (!fDontRaiseErrorPane)
     1107    {
     1108        /* Make sure Error pane raised: */
     1109        if (m_pPaneToolsMachine->currentTool() != UIToolType_Error)
     1110            m_pPaneToolsMachine->openTool(UIToolType_Error);
     1111
     1112        /* Propagate last access error to the Error-pane: */
     1113        if (pItem)
     1114            m_pPaneToolsMachine->setErrorDetails(pItem->accessError());
     1115    }
     1116}
     1117
    10851118void UIVirtualBoxManagerWidget::updateToolsMenuGlobal()
    10861119{
     
    11261159        m_pPaneToolsMachine->closeTool(enmRestrictedType);
    11271160}
    1128 
    1129 void UIVirtualBoxManagerWidget::recacheCurrentMachineItemInformation(bool fDontRaiseErrorPane /* = false */)
    1130 {
    1131     /* Sanity check, this method is for machine or group of machine items: */
    1132     if (!isMachineItemSelected() && !isGroupItemSelected())
    1133         return;
    1134 
    1135     /* Get current item: */
    1136     UIVirtualMachineItem *pItem = currentItem();
    1137     const bool fCurrentItemIsOk = pItem && pItem->accessible();
    1138 
    1139     /* If current item is Ok: */
    1140     if (fCurrentItemIsOk)
    1141     {
    1142         /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */
    1143         if (m_pPaneToolsMachine->currentTool() == UIToolType_Error)
    1144             switchMachineToolTo(m_pMenuToolsMachine->toolsType());
    1145 
    1146         /* Propagate current items to the Tools pane: */
    1147         m_pPaneToolsMachine->setItems(currentItems());
    1148     }
    1149     /* Otherwise if we were not asked separately to calm down: */
    1150     else if (!fDontRaiseErrorPane)
    1151     {
    1152         /* Make sure Error pane raised: */
    1153         if (m_pPaneToolsMachine->currentTool() != UIToolType_Error)
    1154             m_pPaneToolsMachine->openTool(UIToolType_Error);
    1155 
    1156         /* Propagate last access error to the Error-pane: */
    1157         if (pItem)
    1158             m_pPaneToolsMachine->setErrorDetails(pItem->accessError());
    1159     }
    1160 }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r102813 r102814  
    361361    /** @} */
    362362
    363     /** @name Tools / Common stuff.
     363    /** @name Common stuff.
     364      * @{ */
     365        /** Recaches current machine item information.
     366          * @param  fDontRaiseErrorPane  Brings whether we should not raise error-pane. */
     367        void recacheCurrentMachineItemInformation(bool fDontRaiseErrorPane = false);
     368    /** @} */
     369
     370    /** @name Tools stuff.
    364371      * @{ */
    365372        /** Updates Global tools menu. */
     
    367374        /** Updates Machine tools menu for @a pItem specified. */
    368375        void updateToolsMenuMachine(UIVirtualMachineItem *pItem);
    369 
    370         /** Recaches current machine item information.
    371           * @param  fDontRaiseErrorPane  Brings whether we should not raise error-pane. */
    372         void recacheCurrentMachineItemInformation(bool fDontRaiseErrorPane = false);
    373376    /** @} */
    374377
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