VirtualBox

Changeset 98977 in vbox for trunk/src


Ignore:
Timestamp:
Mar 15, 2023 10:35:03 AM (23 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Runtime UI: Reworking display indicator of UIIndicatorsPool; No 3D overlay write functionality for some time already; New state for the case when no display is available.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
4 deleted
5 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc

    r97025 r98977  
    159159        <file alias="disk_size_16px.png">images/disk_size_16px.png</file>
    160160        <file alias="display_hardware_16px.png">images/display_hardware_16px.png</file>
    161         <file alias="display_hardware_write_16px.png">images/display_hardware_write_16px.png</file>
    162161        <file alias="display_software_16px.png">images/display_software_16px.png</file>
     162        <file alias="display_software_disabled_16px.png">images/display_software_disabled_16px.png</file>
    163163        <file alias="download_manager_16px.png">images/download_manager_16px.png</file>
    164164        <file alias="download_manager_32px.png">images/download_manager_32px.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1_x2.qrc

    r94997 r98977  
    159159        <file alias="disk_size_16px_x2.png">images/x2/disk_size_16px_x2.png</file>
    160160        <file alias="display_hardware_16px_x2.png">images/x2/display_hardware_16px_x2.png</file>
    161         <file alias="display_hardware_write_16px_x2.png">images/x2/display_hardware_write_16px_x2.png</file>
    162161        <file alias="display_software_16px_x2.png">images/x2/display_software_16px_x2.png</file>
     162        <file alias="display_software_disabled_16px_x2.png">images/x2/display_software_disabled_16px_x2.png</file>
    163163        <file alias="download_manager_16px_x2.png">images/x2/download_manager_16px_x2.png</file>
    164164        <file alias="download_manager_32px_x2.png">images/x2/download_manager_32px_x2.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1_x3.qrc

    r94997 r98977  
    159159        <file alias="disk_size_16px_x3.png">images/x3/disk_size_16px_x3.png</file>
    160160        <file alias="display_hardware_16px_x3.png">images/x3/display_hardware_16px_x3.png</file>
    161         <file alias="display_hardware_write_16px_x3.png">images/x3/display_hardware_write_16px_x3.png</file>
    162161        <file alias="display_software_16px_x3.png">images/x3/display_software_16px_x3.png</file>
     162        <file alias="display_software_disabled_16px_x3.png">images/x3/display_software_disabled_16px_x3.png</file>
    163163        <file alias="download_manager_16px_x3.png">images/x3/download_manager_16px_x3.png</file>
    164164        <file alias="download_manager_32px_x3.png">images/x3/download_manager_32px_x3.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1_x4.qrc

    r94997 r98977  
    159159        <file alias="disk_size_16px_x4.png">images/x4/disk_size_16px_x4.png</file>
    160160        <file alias="display_hardware_16px_x4.png">images/x4/display_hardware_16px_x4.png</file>
    161         <file alias="display_hardware_write_16px_x4.png">images/x4/display_hardware_write_16px_x4.png</file>
    162161        <file alias="display_software_16px_x4.png">images/x4/display_software_16px_x4.png</file>
     162        <file alias="display_software_disabled_16px_x4.png">images/x4/display_software_disabled_16px_x4.png</file>
    163163        <file alias="download_manager_16px_x4.png">images/x4/download_manager_16px_x4.png</file>
    164164        <file alias="download_manager_32px_x4.png">images/x4/download_manager_32px_x4.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r98974 r98977  
    529529public:
    530530
     531    /** Display states. */
     532    enum DisplayState
     533    {
     534        DisplayState_Unavailable = 0,
     535        DisplayState_Software = 1,
     536        DisplayState_Hardware = 2
     537    };
     538
    531539    /** Constructs indicator passing @a pMachine to the base-class. */
    532540    UIIndicatorDisplay(UIMachine *pMachine)
     
    534542    {
    535543        /* Assign state-icons: */
    536         setStateIcon(KDeviceActivity_Null,    UIIconPool::iconSet(":/display_software_16px.png"));
    537         setStateIcon(KDeviceActivity_Idle,    UIIconPool::iconSet(":/display_hardware_16px.png"));
    538         setStateIcon(KDeviceActivity_Writing, UIIconPool::iconSet(":/display_hardware_write_16px.png"));
     544        setStateIcon(DisplayState_Unavailable, UIIconPool::iconSet(":/display_software_disabled_16px.png"));
     545        setStateIcon(DisplayState_Software,    UIIconPool::iconSet(":/display_software_16px.png"));
     546        setStateIcon(DisplayState_Hardware,    UIIconPool::iconSet(":/display_hardware_16px.png"));
     547        /* Configure connection: */
     548        connect(pMachine, &UIMachine::sigInitialized,
     549                this, &UIIndicatorDisplay::updateAppearance);
    539550        /* Translate finally: */
    540551        retranslateUi();
     
    553564        if (!strFullData.isEmpty())
    554565            setToolTip(s_strTable.arg(strFullData));
    555         /* Set initial indicator state: */
    556         setState(fAcceleration3D ? KDeviceActivity_Idle : KDeviceActivity_Null);
     566        /* Update indicator state: */
     567        DisplayState enmState = DisplayState_Unavailable;
     568        if (m_pMachine->isSessionValid())
     569        {
     570            if (!fAcceleration3D)
     571                enmState = DisplayState_Software;
     572            else
     573                enmState = DisplayState_Hardware;
     574        }
     575        setState(enmState);
    557576    }
    558577};
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