VirtualBox

Ignore:
Timestamp:
Jul 12, 2024 4:48:27 PM (9 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
163966
Message:

FE/Qt: bugref:10672: Runtime UI: Improve accessibility for Features indicator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r105312 r105313  
    3131#include <QHBoxLayout>
    3232#include <QPainter>
     33#include <QRegularExpression>
    3334#include <QStyle>
    3435#include <QTimer>
     
    10441045    virtual void updateAppearance() RT_OVERRIDE
    10451046    {
    1046         QString strFullData;
     1047        m_strFullData.clear();
    10471048        KVMExecutionEngine enmEngine = KVMExecutionEngine_NotSet;
    1048         m_pMachine->acquireFeaturesStatusInfo(strFullData, enmEngine);
     1049        m_pMachine->acquireFeaturesStatusInfo(m_strFullData, enmEngine);
    10491050
    10501051        /* Update tool-tip: */
    1051         if (!strFullData.isEmpty())
    1052             setToolTip(s_strTable.arg(strFullData));
     1052        if (!m_strFullData.isEmpty())
     1053            setToolTip(s_strTable.arg(m_strFullData));
    10531054        /* Update indicator state: */
    10541055        setState(enmEngine);
     
    10651066    }
    10661067
     1068    /** Handles translation event. */
     1069    virtual void sltRetranslateUI() RT_OVERRIDE
     1070    {
     1071        /* Call to base-class: */
     1072        UISessionStateStatusBarIndicator::sltRetranslateUI();
     1073
     1074        /* Append description with more info: */
     1075        QString strFullData = m_strFullData;
     1076        strFullData.remove(QRegularExpression("<tr>|<td>|<nobr>"));
     1077        strFullData.replace("</nobr></td></tr>", ", ");
     1078        strFullData.replace("</nobr></td>", " ");
     1079        m_strDescription = QString("%1, %2").arg(m_strDescription, strFullData);
     1080    }
     1081
    10671082private slots:
    10681083
     
    10811096    /** Holds the effective CPU load. Expected to be in range [0, 100] */
    10821097    ulong  m_uEffectiveCPULoad;
     1098
     1099    /** Holds the serialized tool-tip data. */
     1100    QString  m_strFullData;
    10831101};
    10841102
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