VirtualBox

Changeset 84437 in vbox


Ignore:
Timestamp:
May 21, 2020 4:36:05 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane cleanup: Move start/show action trigger handling to proper place in UIVirtualBoxManager class.

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

Legend:

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

    r84435 r84437  
    14631463    connect(m_pWidget, &UIVirtualBoxManagerWidget::sigToolTypeChange,
    14641464            this, &UIVirtualBoxManager::sltHandleToolTypeChange);
     1465    connect(m_pWidget, &UIVirtualBoxManagerWidget::sigStartOrShowRequest,
     1466            this, &UIVirtualBoxManager::sltPerformStartOrShowMachine);
    14651467    connect(menuBar(), &QMenuBar::customContextMenuRequested,
    14661468            m_pWidget, &UIVirtualBoxManagerWidget::sltHandleContextMenuRequest);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r84104 r84437  
    447447            if (m_pPaneChooser)
    448448            {
    449                 /* Configure Chooser-pane: */
    450                 connect(m_pPaneChooser, &UIChooser::sigCloudMachineStateChange,
    451                         this, &UIVirtualBoxManagerWidget::sltHandleCloudMachineStateChange);
    452449                /* Add into splitter: */
    453450                m_pSplitter->addWidget(m_pPaneChooser);
     
    594591    connect(m_pPaneChooser, &UIChooser::sigToolMenuRequested,
    595592            this, &UIVirtualBoxManagerWidget::sltHandleToolMenuRequested);
     593    connect(m_pPaneChooser, &UIChooser::sigCloudMachineStateChange,
     594            this, &UIVirtualBoxManagerWidget::sltHandleCloudMachineStateChange);
     595    connect(m_pPaneChooser, &UIChooser::sigStartOrShowRequest,
     596            this, &UIVirtualBoxManagerWidget::sigStartOrShowRequest);
    596597
    597598    /* Details-pane connections: */
     
    842843    disconnect(m_pPaneChooser, &UIChooser::sigToolMenuRequested,
    843844               this, &UIVirtualBoxManagerWidget::sltHandleToolMenuRequested);
     845    disconnect(m_pPaneChooser, &UIChooser::sigCloudMachineStateChange,
     846               this, &UIVirtualBoxManagerWidget::sltHandleCloudMachineStateChange);
     847    disconnect(m_pPaneChooser, &UIChooser::sigStartOrShowRequest,
     848               this, &UIVirtualBoxManagerWidget::sigStartOrShowRequest);
    844849
    845850    /* Details-pane connections: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r84104 r84437  
    7777    /** Notifies about state change for cloud machine with certain @a uId. */
    7878    void sigCloudMachineStateChange(const QUuid &uId);
     79
     80    /** @name Action stuff.
     81      * @{ */
     82        /** Notify listeners about start or show request. */
     83        void sigStartOrShowRequest();
     84    /** @} */
    7985
    8086public:
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp

    r84105 r84437  
    193193    connect(model(), &UIChooserModel::sigCloudMachineStateChange,
    194194            this, &UIChooser::sigCloudMachineStateChange);
     195    connect(model(), &UIChooserModel::sigStartOrShowRequest,
     196            this, &UIChooser::sigStartOrShowRequest);
    195197
    196198    /* Chooser-view connections: */
     
    233235    disconnect(model(), &UIChooserModel::sigCloudMachineStateChange,
    234236               this, &UIChooser::sigCloudMachineStateChange);
     237    disconnect(model(), &UIChooserModel::sigStartOrShowRequest,
     238               this, &UIChooser::sigStartOrShowRequest);
    235239
    236240    /* Chooser-view connections: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h

    r84105 r84437  
    6868        /** Notifies listeners about group saving state change. */
    6969        void sigGroupSavingStateChanged();
     70    /** @} */
     71
     72    /** @name Action stuff.
     73      * @{ */
     74        /** Notify listeners about start or show request. */
     75        void sigStartOrShowRequest();
    7076    /** @} */
    7177
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserHandlerKeyboard.cpp

    r84420 r84437  
    268268                || model()->currentItem()->type() == UIChooserNodeType_Machine)
    269269            {
    270                 /* Activate item: */
    271                 model()->activateMachineItem();
     270                /* Start or show selected items: */
     271                model()->startOrShowSelectedItems();
    272272                /* And filter out that event: */
    273273                return true;
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserHandlerMouse.cpp

    r83896 r84437  
    213213                else if (pItemUnderMouse->type() == UIChooserNodeType_Machine)
    214214                {
    215                     /* Activate machine-item: */
    216                     model()->activateMachineItem();
     215                    /* Start or show selected items: */
     216                    model()->startOrShowSelectedItems();
    217217                }
    218218                break;
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r84435 r84437  
    560560}
    561561
    562 void UIChooserModel::activateMachineItem()
    563 {
    564     actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow)->activate(QAction::Trigger);
     562void UIChooserModel::startOrShowSelectedItems()
     563{
     564    emit sigStartOrShowRequest();
    565565}
    566566
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h

    r84105 r84437  
    9090    /** @} */
    9191
     92    /** @name Action stuff.
     93      * @{ */
     94        /** Notify listeners about start or show request. */
     95        void sigStartOrShowRequest();
     96    /** @} */
     97
    9298public:
    9399
     
    210216        void startEditingGroupItemName();
    211217
    212         /** Activates machine item. */
    213         void activateMachineItem();
     218        /** Starts or shows selected items. */
     219        void startOrShowSelectedItems();
    214220
    215221        /** Defines current @a pDragObject. */
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