VirtualBox

Changeset 103948 in vbox


Ignore:
Timestamp:
Mar 20, 2024 11:18:23 AM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162324
Message:

FE/Qt. bugref:10622. Using new UITranslationEventListener in wizard classes. part 2.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.h

    r103947 r103948  
    291291    void updateVMExitMetric(quint64 uTotalVMExits);
    292292    void resetVMExitInfoLabel();
    293     virtual void resetCPUInfoLabel();
     293    virtual void resetCPUInfoLabel() override;
    294294    void resetNetworkInfoLabel();
    295295    void resetDiskIOInfoLabel();
     
    351351        void updateRAMChart(quint64 iUsagePercentage, const QString &strLabel);
    352352    /** @} */
    353     virtual void resetCPUInfoLabel();
     353    virtual void resetCPUInfoLabel() override;
    354354    void resetNetworkInInfoLabel();
    355355    void resetNetworkOutInfoLabel();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp

    r103771 r103948  
    4545#include "UIIconPool.h"
    4646#include "UIMediumSizeEditor.h"
     47#include "UITranslationEventListener.h"
    4748#include "UIUserNamePasswordEditor.h"
    4849#include "UIWizardDiskEditors.h"
     
    186187
    187188UIDiskVariantWidget::UIDiskVariantWidget(QWidget *pParent /* = 0 */)
    188     : QIWithRetranslateUI<QWidget>(pParent)
     189    : QWidget(pParent)
    189190    , m_pFixedCheckBox(0)
    190191    , m_pSplitBox(0)
     
    204205    pVariantLayout->addWidget(m_pSplitBox);
    205206    pVariantLayout->addStretch();
    206     retranslateUi();
    207 }
    208 
    209 void UIDiskVariantWidget::retranslateUi()
     207    sltRetranslateUI();
     208    connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI,
     209            this, &UIDiskVariantWidget::sltRetranslateUI);
     210}
     211
     212void UIDiskVariantWidget::sltRetranslateUI()
    210213{
    211214    if (m_pFixedCheckBox)
     
    315318
    316319UIMediumSizeAndPathGroupBox::UIMediumSizeAndPathGroupBox(bool fExpertMode, QWidget *pParent, qulonglong uMinimumMediumSize)
    317     : QIWithRetranslateUI<QGroupBox>(pParent)
     320    : QGroupBox(pParent)
    318321    , m_pLocationEditor(0)
    319322    , m_pLocationOpenButton(0)
     
    381384            this, &UIMediumSizeAndPathGroupBox::sigMediumLocationButtonClicked);
    382385
    383     retranslateUi();
    384 }
    385 void UIMediumSizeAndPathGroupBox::retranslateUi()
     386    sltRetranslateUI();
     387    connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI,
     388            this, &UIMediumSizeAndPathGroupBox::sltRetranslateUI);
     389}
     390void UIMediumSizeAndPathGroupBox::sltRetranslateUI()
    386391{
    387392    if (m_fExpertMode)
     
    555560
    556561UIDiskFormatsGroupBox::UIDiskFormatsGroupBox(bool fExpertMode, KDeviceType enmDeviceType, QWidget *pParent /* = 0 */)
    557     : QIWithRetranslateUI<QWidget>(pParent)
     562    : QWidget(pParent)
    558563    , UIDiskFormatBase(enmDeviceType, fExpertMode)
    559564    , m_pFormatButtonGroup(0)
     
    593598    populateFormats();
    594599    createFormatWidgets();
    595     retranslateUi();
    596 }
    597 
    598 void UIDiskFormatsGroupBox::retranslateUi()
     600    sltRetranslateUI();
     601    connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI,
     602            this, &UIDiskFormatsGroupBox::sltRetranslateUI);
     603}
     604
     605void UIDiskFormatsGroupBox::sltRetranslateUI()
    599606{
    600607    QList<QAbstractButton*> buttons = m_pFormatButtonGroup ? m_pFormatButtonGroup->buttons() : QList<QAbstractButton*>();
     
    645652
    646653UIDiskFormatsComboBox::UIDiskFormatsComboBox(bool fExpertMode, KDeviceType enmDeviceType, QWidget *pParent /* = 0 */)
    647     : QIWithRetranslateUI<QIComboBox>(pParent)
     654    : QIComboBox(pParent)
    648655    , UIDiskFormatBase(enmDeviceType, fExpertMode)
    649656{
     
    662669            this, &UIDiskFormatsComboBox::sigMediumFormatChanged);
    663670
    664     retranslateUi();
     671    sltRetranslateUI();
     672    connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI,
     673            this, &UIDiskFormatsComboBox::sltRetranslateUI);
    665674}
    666675
     
    685694}
    686695
    687 void UIDiskFormatsComboBox::retranslateUi()
     696void UIDiskFormatsComboBox::sltRetranslateUI()
    688697{
    689698    for (int i = 0; i < count(); ++i)
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h

    r103803 r103948  
    7878};
    7979
    80 class SHARED_LIBRARY_STUFF UIDiskVariantWidget : public QIWithRetranslateUI<QWidget>
     80class SHARED_LIBRARY_STUFF UIDiskVariantWidget : public QWidget
    8181{
    8282    Q_OBJECT;
     
    102102
    103103    void sltVariantChanged();
     104    void sltRetranslateUI();
    104105
    105106private:
    106107
    107108    void prepare();
    108     virtual void retranslateUi() /* override final */;
    109109
    110110    QCheckBox *m_pFixedCheckBox;
     
    116116
    117117
    118 class SHARED_LIBRARY_STUFF UIMediumSizeAndPathGroupBox : public QIWithRetranslateUI<QGroupBox>
     118class SHARED_LIBRARY_STUFF UIMediumSizeAndPathGroupBox : public QGroupBox
    119119{
    120120    Q_OBJECT;
     
    143143    bool isComplete() const;
    144144
     145private slots:
     146
     147    void sltRetranslateUI();
     148
    145149private:
    146150
    147151    void prepare(qulonglong uMinimumMediumSize);
    148     virtual void retranslateUi() /* override final */;
    149152
    150153    QILineEdit *m_pLocationEditor;
     
    197200};
    198201
    199 class SHARED_LIBRARY_STUFF UIDiskFormatsGroupBox : public QIWithRetranslateUI<QWidget>, public UIDiskFormatBase
     202class SHARED_LIBRARY_STUFF UIDiskFormatsGroupBox : public QWidget, public UIDiskFormatBase
    200203{
    201204    Q_OBJECT;
     
    211214    virtual void setMediumFormat(const CMediumFormat &mediumFormat) /* override final */;
    212215
     216private slots:
     217
     218    void sltRetranslateUI();
     219
    213220private:
    214221
    215222    void prepare();
    216223    void createFormatWidgets();
    217     virtual void retranslateUi() /* override final */;
    218224
    219225    QButtonGroup *m_pFormatButtonGroup;
     
    221227};
    222228
    223 class SHARED_LIBRARY_STUFF UIDiskFormatsComboBox : public QIWithRetranslateUI<QIComboBox>, public UIDiskFormatBase
     229class SHARED_LIBRARY_STUFF UIDiskFormatsComboBox : public QIComboBox, public UIDiskFormatBase
    224230{
    225231    Q_OBJECT;
     
    235241    virtual void setMediumFormat(const CMediumFormat &mediumFormat) /* override final */;
    236242
     243private slots:
     244
     245    void sltRetranslateUI();
     246
    237247private:
    238248
    239249    void prepare();
    240     virtual void retranslateUi() /* override final */;
    241250};
    242251
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