VirtualBox

Changeset 104563 in vbox


Ignore:
Timestamp:
May 8, 2024 4:19:39 PM (7 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10670: Accessibility fixes for New Cloud VM wizard; Switching from QListWidget to own QIListWidget, using proper what's this for the list.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp

    r104559 r104563  
    3030#include <QHeaderView>
    3131#include <QLabel>
    32 #include <QListWidget>
    3332#include <QPushButton>
    3433#include <QTabBar>
     
    3736/* GUI includes: */
    3837#include "QIComboBox.h"
     38#include "QIListWidget.h"
    3939#include "QIToolButton.h"
    4040#include "UICloudNetworkingStuff.h"
     
    169169
    170170                    /* Prepare source image list: */
    171                     m_pSourceImageList = new QListWidget(pWidgetSource);
     171                    m_pSourceImageList = new QIListWidget(pWidgetSource);
    172172                    if (m_pSourceImageList)
    173173                    {
     
    227227    connect(m_pSourceTabBar, &QTabBar::currentChanged,
    228228            this, &UIWizardNewCloudVMPageExpert::sltHandleSourceTabBarChange);
    229     connect(m_pSourceImageList, &QListWidget::currentRowChanged,
     229    connect(m_pSourceImageList, &QIListWidget::currentRowChanged,
    230230            this, &UIWizardNewCloudVMPageExpert::sltHandleSourceImageChange);
    231231}
     
    258258    }
    259259
    260     /* Translate source tab-bar: */
    261     if (m_pSourceTabBar)
    262     {
    263         m_pSourceTabBar->setTabText(0, UIWizardNewCloudVM::tr("&Images"));
    264         m_pSourceTabBar->setTabText(1, UIWizardNewCloudVM::tr("&Boot Volumes"));
    265     }
    266 
    267260    /* Translate profile stuff: */
    268261    if (m_pProfileLabel)
     
    275268        m_pProfileToolButton->setToolTip(UIWizardNewCloudVM::tr("Opens cloud profile manager..."));
    276269    }
     270
     271    /* Translate source tab-bar: */
     272    if (m_pSourceTabBar)
     273    {
     274        m_pSourceTabBar->setTabText(0, UIWizardNewCloudVM::tr("&Images"));
     275        m_pSourceTabBar->setTabText(1, UIWizardNewCloudVM::tr("&Boot Volumes"));
     276    }
     277
     278    /* Translate source image list: */
     279    m_pSourceImageList->setWhatsThis(UIWizardNewCloudVM::tr("Lists all the source images or boot volumes."));
    277280}
    278281
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.h

    r104547 r104563  
    115115    QTabBar      *m_pSourceTabBar;
    116116    /** Holds the source image list instance. */
    117     QListWidget *m_pSourceImageList;
     117    QIListWidget *m_pSourceImageList;
    118118
    119119    /** Holds the Form Editor widget instance. */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.cpp

    r104559 r104563  
    2929#include <QGridLayout>
    3030#include <QLabel>
    31 #include <QListWidget>
    3231#include <QPushButton>
    3332#include <QTabBar>
     
    3635/* GUI includes: */
    3736#include "QIComboBox.h"
     37#include "QIListWidget.h"
    3838#include "QIRichTextLabel.h"
    3939#include "QIToolButton.h"
     
    198198}
    199199
    200 void UIWizardNewCloudVMSource::populateSourceImages(QListWidget *pList,
     200void UIWizardNewCloudVMSource::populateSourceImages(QIListWidget *pList,
    201201                                                    QTabBar *pTabBar,
    202202                                                    UINotificationCenter *pCenter,
     
    234234        {
    235235            /* Create list item: */
    236             QListWidgetItem *pItem = new QListWidgetItem(names.at(i), pList);
     236            QIListWidgetItem *pItem = new QIListWidgetItem(names.at(i), pList);
    237237            if (pItem)
    238238            {
     
    273273}
    274274
    275 QString UIWizardNewCloudVMSource::currentListWidgetData(QListWidget *pList)
     275QString UIWizardNewCloudVMSource::currentListWidgetData(QIListWidget *pList)
    276276{
    277277    /* Sanity check: */
    278278    AssertPtrReturn(pList, QString());
    279279
    280     QListWidgetItem *pItem = pList->currentItem();
     280    QIListWidgetItem *pItem = QIListWidgetItem::toItem(pList->currentItem());
    281281    return pItem ? pItem->data(Qt::UserRole).toString() : QString();
    282282}
     
    408408
    409409                /* Prepare source image list: */
    410                 m_pSourceImageList = new QListWidget(this);
     410                m_pSourceImageList = new QIListWidget(this);
    411411                if (m_pSourceImageList)
    412412                {
     
    455455    connect(m_pSourceTabBar, &QTabBar::currentChanged,
    456456            this, &UIWizardNewCloudVMPageSource::sltHandleSourceTabBarChange);
    457     connect(m_pSourceImageList, &QListWidget::currentRowChanged,
     457    connect(m_pSourceImageList, &QIListWidget::currentRowChanged,
    458458            this, &UIWizardNewCloudVMPageSource::sltHandleSourceImageChange);
    459459}
     
    504504    m_pSourceTabBar->setTabText(0, UIWizardNewCloudVM::tr("&Images"));
    505505    m_pSourceTabBar->setTabText(1, UIWizardNewCloudVM::tr("&Boot Volumes"));
     506
     507    /* Translate source image list: */
     508    m_pSourceImageList->setWhatsThis(UIWizardNewCloudVM::tr("Lists all the source images or boot volumes."));
    506509
    507510    /* Adjust label widths: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.h

    r104555 r104563  
    4141class QGridLayout;
    4242class QLabel;
    43 class QListWidget;
     43class QIListWidget;
    4444class QTabBar;
    4545class QIComboBox;
     
    7979      @param  pTabBar    Brings the tab-bar source images should be acquired for.
    8080      @param  comClient  Brings the cloud client source images should be acquired from. */
    81     void populateSourceImages(QListWidget *pList,
     81    void populateSourceImages(QIListWidget *pList,
    8282                              QTabBar *pTabBar,
    8383                              UINotificationCenter *pCenter,
     
    9393
    9494    /** Returns current user data for @a pList specified. */
    95     QString currentListWidgetData(QListWidget *pList);
     95    QString currentListWidgetData(QIListWidget *pList);
    9696}
    9797
     
    171171    QTabBar      *m_pSourceTabBar;
    172172    /** Holds the source image list instance. */
    173     QListWidget *m_pSourceImageList;
     173    QIListWidget *m_pSourceImageList;
    174174};
    175175
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