VirtualBox

Changeset 102261 in vbox


Ignore:
Timestamp:
Nov 22, 2023 3:12:38 PM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160395
Message:

FE/Qt: bugref:10513: Adjusting UISettingsSelector to be able to select item by ID silently.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSelector.cpp

    r101693 r102261  
    10131013}
    10141014
    1015 void UISettingsSelectorTreeView::selectById(int iID)
     1015void UISettingsSelectorTreeView::selectById(int iID, bool fSilently)
    10161016{
    10171017    const QModelIndex index = m_pModel->findItem(iID);
    10181018    const QModelIndex proxyIndex = m_pModelProxy->mapFromSource(index);
    10191019    if (proxyIndex.isValid())
     1020    {
     1021        if (fSilently)
     1022            m_pTreeView->blockSignals(true);
    10201023        m_pTreeView->setCurrentIndex(proxyIndex);
     1024        if (fSilently)
     1025            m_pTreeView->blockSignals(false);
     1026    }
    10211027}
    10221028
     
    11651171}
    11661172
    1167 void UISettingsSelectorTreeWidget::selectById(int iID)
     1173void UISettingsSelectorTreeWidget::selectById(int iID, bool)
    11681174{
    11691175    QTreeWidgetItem *pItem = findItem(m_pTreeWidget, idToString(iID), TreeWidgetSection_Id);
     
    14071413}
    14081414
    1409 void UISettingsSelectorToolBar::selectById(int iID)
     1415void UISettingsSelectorToolBar::selectById(int iID, bool)
    14101416{
    14111417    if (const UISelectorActionItem *pItem = findActionItem(iID))
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSelector.h

    r101693 r102261  
    106106
    107107    /** Make the section with @a iID current. */
    108     virtual void selectById(int iID) = 0;
     108    virtual void selectById(int iID, bool fSilently = false) = 0;
    109109    /** Make the section with @a strLink current. */
    110110    virtual void selectByLink(const QString &strLink) { selectById(linkToId(strLink)); }
     
    176176
    177177    /** Make the section with @a iID current. */
    178     virtual void selectById(int iID) RT_OVERRIDE;
     178    virtual void selectById(int iID, bool fSilently) RT_OVERRIDE;
    179179
    180180private slots:
     
    239239
    240240    /** Make the section with @a iID current. */
    241     virtual void selectById(int iID) RT_OVERRIDE;
     241    virtual void selectById(int iID, bool fSilently) RT_OVERRIDE;
    242242
    243243    /** Performs selector polishing. */
     
    312312
    313313    /** Make the section with @a iID current. */
    314     virtual void selectById(int iID) RT_OVERRIDE;
     314    virtual void selectById(int iID, bool fSilently) RT_OVERRIDE;
    315315
    316316    /** Returns minimum selector width. */
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