VirtualBox

Ignore:
Timestamp:
Apr 11, 2024 1:20:43 PM (9 months ago)
Author:
vboxsync
Message:

FE/Qt. bugref:10622. Using new UITranslationEventListener in the guest control related GUI classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp

    r104228 r104297  
    7070/** A QWidget extension containing text entry fields for password and username and buttons to
    7171  *  start/stop a guest session. */
    72 class UIGuestSessionWidget : public QIWithRetranslateUI<QWidget>
     72class UIGuestSessionWidget : public QWidget
    7373{
    7474    Q_OBJECT;
     
    9292protected:
    9393
    94     void retranslateUi() RT_OVERRIDE;
    9594    void keyPressEvent(QKeyEvent * pEvent) RT_OVERRIDE;
    9695    void showEvent(QShowEvent *pEvent) RT_OVERRIDE;
     
    9897private slots:
    9998
     99    void sltRetranslateUI();
    100100    void sltButtonClick();
    101101    void sltHandleTextChanged(const QString &strText);
     
    129129
    130130UIGuestSessionWidget::UIGuestSessionWidget(QWidget *pParent /* = 0 */)
    131     : QIWithRetranslateUI<QWidget>(pParent)
     131    : QWidget(pParent)
    132132    , m_enmButtonMode(ButtonMode_Open)
    133133    , m_pUserNameEdit(0)
     
    187187    m_pMainLayout->insertStretch(-1, 1);
    188188    switchSessionOpenMode();
    189     retranslateUi();
     189    sltRetranslateUI();
     190    connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI,
     191            this, &UIGuestSessionWidget::sltRetranslateUI);
    190192}
    191193
     
    204206}
    205207
    206 void UIGuestSessionWidget::retranslateUi()
     208void UIGuestSessionWidget::sltRetranslateUI()
    207209{
    208210    if (m_pUserNameEdit)
     
    247249void UIGuestSessionWidget::showEvent(QShowEvent *pEvent)
    248250{
    249     QIWithRetranslateUI<QWidget>::showEvent(pEvent);
     251    QWidget::showEvent(pEvent);
    250252    if (m_pUserNameEdit)
    251253        m_pUserNameEdit->setFocus();
     
    259261        m_pPasswordEdit->setEnabled(true);
    260262    m_enmButtonMode = ButtonMode_Open;
    261     retranslateUi();
     263    sltRetranslateUI();
    262264}
    263265
     
    269271        m_pPasswordEdit->setEnabled(false);
    270272    m_enmButtonMode = ButtonMode_Close;
    271     retranslateUi();
     273    sltRetranslateUI();
    272274}
    273275
     
    448450
    449451    sltRetranslateUI();
    450 
    451452    connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI,
    452453            this, &UIFileManagerGuestTable::sltRetranslateUI);
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