VirtualBox

Changeset 107343 in vbox


Ignore:
Timestamp:
Dec 17, 2024 3:41:29 PM (4 weeks ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10814: VBox Manager: Few more cleanup for Global and Machine tool managers; S.a. r166372 and r166373.

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

Legend:

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

    r107338 r107343  
    5959}
    6060
     61UIToolPaneGlobal *UIGlobalToolsManagerWidget::toolPane() const
     62{
     63    return m_pPane;
     64}
     65
    6166UIToolType UIGlobalToolsManagerWidget::menuToolType() const
    6267{
     
    105110
    106111    /* Special handling for Machines Global tool,
    107      * notify machine tool-pane it's active: */
     112     * notify Machine tool-pane it's active: */
    108113    if (enmType == UIToolType_Machines)
    109114    {
     
    111116        toolPaneMachine()->setActive(true);
    112117    }
    113     /* Otherwise, notify global tool-pane it's active: */
     118    /* Otherwise, notify Global tool-pane it's active: */
    114119    else
    115120    {
     
    205210        pLayout->setContentsMargins(0, 0, 0, 0);
    206211
    207         /* Create tools-menu: */
     212        /* Create tool-menu: */
    208213        m_pMenu = new UITools(this, UIToolClass_Global, actionPool());
    209214        if (toolMenu())
     
    213218        }
    214219
    215         /* Create tools-pane: */
     220        /* Create tool-pane: */
    216221        m_pPane = new UIToolPaneGlobal(actionPool());
    217222        if (toolPane())
     
    283288{
    284289    return m_pMenu;
    285 }
    286 
    287 UIToolPaneGlobal *UIGlobalToolsManagerWidget::toolPane() const
    288 {
    289     return m_pPane;
    290290}
    291291
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsManagerWidget.h

    r107339 r107343  
    4747class UIVirtualBoxManagerAdvancedWidget;
    4848
    49 /** QWidget extension used as VirtualBox Manager Widget instance. */
     49/** QWidget extension used as Global Tools Manager Widget instance. */
    5050class UIGlobalToolsManagerWidget : public QWidget
    5151{
     
    6262public:
    6363
    64     /** Constructs VirtualBox Manager widget passing @a pParent to the base-class.
     64    /** Constructs Global Tools Manager widget passing @a pParent to the base-class.
    6565      * @param  pActionPool  Brings the action-pool reference.  */
    6666    UIGlobalToolsManagerWidget(UIVirtualBoxManagerAdvancedWidget *pParent, UIActionPool *pActionPool);
    67     /** Destructs VirtualBox Manager widget. */
     67    /** Destructs Global Tools Manager widget. */
    6868    virtual ~UIGlobalToolsManagerWidget() RT_OVERRIDE;
    6969
    7070    /** @name Common stuff.
    7171      * @{ */
    72         /** Returns the action-pool instance. */
     72        /** Returns the action-pool reference. */
    7373        UIActionPool *actionPool() const { return m_pActionPool; }
    7474    /** @} */
     
    7676    /** @name Tools pane stuff.
    7777      * @{ */
     78        /** Returns tool-pane instance. */
     79        UIToolPaneGlobal *toolPane() const;
     80
    7881        /** Returns menu tool type. */
    7982        UIToolType menuToolType() const;
     
    8588        /** Returns whether pane has tool of passed @a enmType. */
    8689        bool isToolOpened(UIToolType enmType) const;
    87         /** Switches tool to passed @a enmType. */
     90        /** Switches pane to passed tool @a enmType. */
    8891        void switchToolTo(UIToolType enmType);
    89         /** Closes tool of passed @a enmType. */
     92        /** Closes pane tool of passed @a enmType. */
    9093        void closeTool(UIToolType enmType);
    9194    /** @} */
     
    105108    /** @} */
    106109
    107     /** @name CVirtualBox extra-data event handling stuff.
     110    /** @name COM event handling stuff.
    108111      * @{ */
    109112        /** Handles signal about settings expert mode change. */
     
    151154        /** Returns tool-menu instance. */
    152155        UITools *toolMenu() const;
    153         /** Returns tool-pane instance. */
    154         UIToolPaneGlobal *toolPane() const;
    155         /** Returns Machine Manager reference. */
     156       /** Returns Machine Manager reference. */
    156157        UIMachineManagerWidget *machineManager() const;
    157158        /** Returns Machine Manager's Chooser-pane reference. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineManagerWidget.cpp

    r107339 r107343  
    201201}
    202202
    203 bool UIMachineManagerWidget::isCurrentStateItemSelected() const
    204 {
    205     AssertPtrReturn(toolPane(), false);
    206     return toolPane()->isCurrentStateItemSelected();
    207 }
    208 
    209 QUuid UIMachineManagerWidget::currentSnapshotId()
    210 {
    211     AssertPtrReturn(toolPane(), QUuid());
    212     return toolPane()->currentSnapshotId();
    213 }
    214 
    215203QString UIMachineManagerWidget::currentHelpKeyword() const
    216204{
     
    328316    if (fCurrentItemIsOk)
    329317    {
    330         /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */
     318        /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */
    331319        if (toolPane()->currentTool() == UIToolType_Error)
    332320            switchToolTo(toolMenu()->toolsType());
     
    387375}
    388376
    389 void UIMachineManagerWidget::sltSwitchToVMActivityPane(const QUuid &uMachineId)
     377void UIMachineManagerWidget::sltSwitchToVMActivityTool(const QUuid &uMachineId)
    390378{
    391379    AssertPtrReturnVoid(chooser());
     
    427415        if (m_pSplitter)
    428416        {
    429             /* Create Chooser-pane: */
     417            /* Create chooser-pane: */
    430418            m_pPaneChooser = new UIChooser(this, actionPool());
    431419            if (chooser())
     
    435423            }
    436424
    437             /* Create Tools-pane: */
     425            /* Create tool-pane: */
    438426            m_pPaneTools = new UIToolPaneMachine(actionPool());
    439427            if (toolPane())
     
    454442        }
    455443
    456         /* Create Tools-menu: */
     444        /* Create tools-menu: */
    457445        m_pMenuTools = new UITools(this, UIToolClass_Machine, actionPool());
    458446    }
     
    476464    /* Parent connections: */
    477465    connect(m_pParent, &UIToolPaneGlobal::sigSwitchToMachineActivityPane,
    478             this, &UIMachineManagerWidget::sltSwitchToVMActivityPane);
     466            this, &UIMachineManagerWidget::sltSwitchToVMActivityTool);
    479467
    480468    /* Splitter connections: */
     
    519507    }
    520508
    521     /* Open tool last chosen in Tools-menu: */
     509    /* Open tool last chosen in tools-menu: */
    522510    switchToolTo(toolMenu()->toolsType());
    523511}
     
    572560    if (fCurrentItemIsOk)
    573561    {
    574         /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */
     562        /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */
    575563        if (toolPane()->currentTool() == UIToolType_Error)
    576564            switchToolTo(toolMenu()->toolsType());
     
    610598    const QList restrictions(restrictedTypes.begin(), restrictedTypes.end());
    611599    toolMenu()->setRestrictedToolTypes(restrictions);
    612     /* Update machine menu items availability: */
    613600    toolMenu()->setItemsEnabled(fCurrentItemIsOk);
    614601
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineManagerWidget.h

    r107339 r107343  
    9191public:
    9292
    93     /** Constructs Virtual Machine Manager widget passing @a pParent to the base-class.
     93    /** Constructs Machine Manager widget passing @a pParent to the base-class.
    9494      * @param  pActionPool  Brings the action-pool reference. */
    9595    UIMachineManagerWidget(UIToolPaneGlobal *pParent, UIActionPool *pActionPool);
    96     /** Destructs Virtual Machine Manager widget. */
     96    /** Destructs Machine Manager widget. */
    9797    virtual ~UIMachineManagerWidget() RT_OVERRIDE;
    9898
     
    138138    /** @name Tools pane stuff.
    139139      * @{ */
    140         /** Returns Tool-pane instance. */
     140        /** Returns tool-pane instance. */
    141141        UIToolPaneMachine *toolPane() const;
    142142
     
    156156    /** @} */
    157157
    158     /** @name Tools / Snapshot pane stuff.
    159       * @{ */
    160         /** Returns whether current-state item of Snapshot pane is selected. */
    161         bool isCurrentStateItemSelected() const;
    162 
    163         /** Returns currently selected snapshot ID if any. */
    164         QUuid currentSnapshotId();
    165     /** @} */
    166 
    167158    /** @name Help browser stuff.
    168159      * @{ */
     
    223214        void sltHandleToolsMenuIndexChange(UIToolType enmType);
    224215
    225         /** Switches to VM Activity pane of machine with @a uMachineId. */
    226         void sltSwitchToVMActivityPane(const QUuid &uMachineId);
     216        /** Handles signal requesting switch to VM Activity tool. */
     217        void sltSwitchToVMActivityTool(const QUuid &uMachineId);
    227218    /** @} */
    228219
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