VirtualBox

Ignore:
Timestamp:
Jul 12, 2024 3:53:10 PM (7 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
163965
Message:

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

File:
1 edited

Legend:

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

    r105265 r105312  
    814814        , m_pAnimation(0)
    815815        , m_dRotationAngle(0)
     816        , m_enmState(RecordingState_Unavailable)
    816817    {
    817818        /* Assign state-icons: */
     
    874875            setToolTip(s_strTable.arg(strFullData));
    875876        /* Set initial indicator state: */
    876         RecordingState enmState = RecordingState_Unavailable;
     877        m_enmState = RecordingState_Unavailable;
    877878        if (m_pMachine->machineState() != KMachineState_Null)
    878879        {
    879880            if (!fRecordingEnabled)
    880                 enmState = RecordingState_Disabled;
     881                m_enmState = RecordingState_Disabled;
    881882            else if (!fMachinePaused)
    882                 enmState = RecordingState_Enabled;
     883                m_enmState = RecordingState_Enabled;
    883884            else
    884                 enmState = RecordingState_Paused;
     885                m_enmState = RecordingState_Paused;
    885886        }
    886         setState(enmState);
     887        setState(m_enmState);
    887888
    888889        /* Retranslate finally: */
    889890        sltRetranslateUI();
     891    }
     892
     893    /** Handles translation event. */
     894    virtual void sltRetranslateUI() RT_OVERRIDE
     895    {
     896        /* Call to base-class: */
     897        UISessionStateStatusBarIndicator::sltRetranslateUI();
     898
     899        /* Append description with more info: */
     900        switch (m_enmState)
     901        {
     902            case RecordingState_Disabled:
     903                m_strDescription = QString("%1, %2").arg(m_strDescription, tr("Recording stopped")); break;
     904            case RecordingState_Enabled:
     905                m_strDescription = QString("%1, %2").arg(m_strDescription, tr("Recording started")); break;
     906            case RecordingState_Paused:
     907                m_strDescription = QString("%1, %2").arg(m_strDescription, tr("Recording paused")); break;
     908            default:
     909                break;
     910        }
    890911    }
    891912
     
    929950    UIAnimationLoop *m_pAnimation;
    930951    /** Holds current rotation angle. */
    931     double  m_dRotationAngle;
     952    double           m_dRotationAngle;
     953
     954    /** Holds the recording state. */
     955    RecordingState  m_enmState;
    932956};
    933957
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