VirtualBox

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


Ignore:
Timestamp:
Sep 5, 2023 11:36:13 AM (16 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10496, bugref:9072. Synchronize pane container tab change with tool bar.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r101008 r101019  
    708708{
    709709    m_fCommitDataSignalReceived = true;
     710}
     711
     712void UIVMLogViewerWidget::sltPanelCurrentTabChanged(int iIndex)
     713{
     714    if (!m_pPanel || !m_pPanel->isVisible())
     715        return;
     716
     717    for(QSet<QAction*>::iterator iter = m_panelActions.begin(); iter != m_panelActions.end(); ++iter)
     718    {
     719        QAction *pAction = *iter;
     720
     721        pAction->blockSignals(true);
     722        pAction->setChecked(false);
     723        pAction->blockSignals(false);
     724    }
     725
     726    switch (static_cast<UIVMLogViewerPaneContainer::Page>(iIndex))
     727    {
     728        case UIVMLogViewerPaneContainer::Page_Search:
     729            m_pActionPool->action(UIActionIndex_M_Log_T_Find)->setChecked(true);
     730            break;
     731        case UIVMLogViewerPaneContainer::Page_Filter:
     732            m_pActionPool->action(UIActionIndex_M_Log_T_Filter)->setChecked(true);
     733            break;
     734        case UIVMLogViewerPaneContainer::Page_Bookmark:
     735            m_pActionPool->action(UIActionIndex_M_Log_T_Bookmark)->setChecked(true);
     736            break;
     737        case UIVMLogViewerPaneContainer::Page_Preferences:
     738            m_pActionPool->action(UIActionIndex_M_Log_T_Preferences)->setChecked(true);
     739            break;
     740        default:
     741            break;
     742    }
    710743}
    711744
     
    824857    connect(m_pPanel, &UIVMLogViewerPaneContainer::sigResetToDefaults,
    825858            this, &UIVMLogViewerWidget::sltResetOptionsToDefault);
     859    connect(m_pPanel, &UIVMLogViewerPaneContainer::sigCurrentTabChanged,
     860            this, &UIVMLogViewerWidget::sltPanelCurrentTabChanged);
    826861
    827862    m_pMainLayout->addWidget(m_pPanel);
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r100963 r101019  
    146146    void sltCommitDataSignalReceived();
    147147    void sltPanelContainerHidden();
     148    void sltPanelCurrentTabChanged(int iIndex);
    148149
    149150private:
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