- Timestamp:
- Mar 20, 2024 11:41:04 AM (10 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp
r103710 r103950 40 40 #include "UIIconPool.h" 41 41 #include "UIHostnameDomainNameEditor.h" 42 #include "UITranslationEventListener.h" 42 43 43 44 /* Other VBox includes: */ … … 46 47 47 48 UIHostnameDomainNameEditor::UIHostnameDomainNameEditor(QWidget *pParent /* = 0 */) 48 : Q IWithRetranslateUI<QWidget>(pParent)49 : QWidget(pParent) 49 50 , m_pHostnameLineEdit(0) 50 51 , m_pDomainNameLineEdit(0) … … 123 124 } 124 125 125 void UIHostnameDomainNameEditor:: retranslateUi()126 void UIHostnameDomainNameEditor::sltRetranslateUI() 126 127 { 127 128 if (m_pHostnameLabel) … … 180 181 this, &UIHostnameDomainNameEditor::sltDomainChanged); 181 182 182 retranslateUi(); 183 sltRetranslateUI(); 184 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 185 this, &UIHostnameDomainNameEditor::sltRetranslateUI); 183 186 } 184 187 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.h
r98103 r103950 36 36 #include <QWidget> 37 37 38 /* Local includes: */39 #include "QIWithRetranslateUI.h"40 41 38 /* Forward declarations: */ 42 39 class QGridLayout; … … 46 43 class UIPasswordLineEdit; 47 44 48 class UIHostnameDomainNameEditor : public Q IWithRetranslateUI<QWidget>45 class UIHostnameDomainNameEditor : public QWidget 49 46 { 50 47 … … 73 70 void setFirstColumnWidth(int iWidth); 74 71 75 76 protected:77 78 void retranslateUi();79 80 72 private slots: 81 73 82 74 void sltHostnameChanged(); 83 75 void sltDomainChanged(); 76 void sltRetranslateUI(); 84 77 85 78 private: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardCloneVMEditors.cpp
r103803 r103950 39 39 #include "UIFilePathSelector.h" 40 40 #include "UIGlobalSession.h" 41 #include "UITranslationEventListener.h" 41 42 #include "UIWizardCloneVM.h" 42 43 #include "UIWizardCloneVMEditors.h" … … 52 53 53 54 UICloneVMNamePathEditor::UICloneVMNamePathEditor(const QString &strOriginalName, const QString &strDefaultPath, QWidget *pParent /* = 0 */) 54 : QIWithRetranslateUI<QGroupBox>(pParent)55 : QGroupBox(pParent) 55 56 , m_pContainerLayout(0) 56 57 , m_pNameLineEdit(0) … … 182 183 } 183 184 184 retranslateUi(); 185 } 186 187 void UICloneVMNamePathEditor::retranslateUi() 185 sltRetranslateUI(); 186 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 187 this, &UICloneVMNamePathEditor::sltRetranslateUI); 188 } 189 190 void UICloneVMNamePathEditor::sltRetranslateUI() 188 191 { 189 192 if (m_pNameLabel) … … 204 207 205 208 UICloneVMAdditionalOptionsEditor::UICloneVMAdditionalOptionsEditor(QWidget *pParent /* = 0 */) 206 : QIWithRetranslateUI<QGroupBox>(pParent)209 : QGroupBox(pParent) 207 210 , m_pContainerLayout(0) 208 211 , m_pMACComboBoxLabel(0) … … 324 327 } 325 328 326 327 retranslateUi(); 328 } 329 330 void UICloneVMAdditionalOptionsEditor::retranslateUi() 329 sltRetranslateUI(); 330 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 331 this, &UICloneVMAdditionalOptionsEditor::sltRetranslateUI); 332 } 333 334 void UICloneVMAdditionalOptionsEditor::sltRetranslateUI() 331 335 { 332 336 m_pMACComboBoxLabel->setText(UIWizardCloneVM::tr("MAC Address P&olicy:")); … … 431 435 432 436 UICloneVMCloneTypeGroupBox::UICloneVMCloneTypeGroupBox(QWidget *pParent /* = 0 */) 433 : QIWithRetranslateUI<QGroupBox>(pParent)437 : QGroupBox(pParent) 434 438 , m_pButtonGroup(0) 435 439 , m_pFullCloneRadio(0) … … 484 488 this, &UICloneVMCloneTypeGroupBox::sltButtonClicked); 485 489 486 retranslateUi(); 487 } 488 489 void UICloneVMCloneTypeGroupBox::retranslateUi() 490 sltRetranslateUI(); 491 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 492 this, &UICloneVMCloneTypeGroupBox::sltRetranslateUI); 493 } 494 495 void UICloneVMCloneTypeGroupBox::sltRetranslateUI() 490 496 { 491 497 if (m_pFullCloneRadio) … … 512 518 513 519 UICloneVMCloneModeGroupBox::UICloneVMCloneModeGroupBox(bool fShowChildsOption, QWidget *pParent /* = 0 */) 514 : QIWithRetranslateUI<QGroupBox>(pParent)520 : QGroupBox(pParent) 515 521 , m_fShowChildsOption(fShowChildsOption) 516 522 , m_pMachineRadio(0) … … 553 559 this, &UICloneVMCloneModeGroupBox::sltButtonClicked); 554 560 555 retranslateUi(); 556 } 557 558 void UICloneVMCloneModeGroupBox::retranslateUi() 561 sltRetranslateUI(); 562 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 563 this, &UICloneVMCloneModeGroupBox::sltRetranslateUI); 564 } 565 566 void UICloneVMCloneModeGroupBox::sltRetranslateUI() 559 567 { 560 568 if (m_pMachineRadio) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardCloneVMEditors.h
r103803 r103950 34 34 /* Qt includes: */ 35 35 #include <QGroupBox> 36 37 /* Local includes: */38 #include "QIWithRetranslateUI.h"39 36 40 37 /* Other VBox includes: */ … … 63 60 Q_DECLARE_METATYPE(MACAddressClonePolicy); 64 61 65 class UICloneVMNamePathEditor : public Q IWithRetranslateUI<QGroupBox>62 class UICloneVMNamePathEditor : public QGroupBox 66 63 { 67 64 Q_OBJECT; … … 89 86 bool isComplete(const QString &strMachineGroup); 90 87 91 private: 92 93 void prepare(); 94 virtual void retranslateUi() /* override final */; 88 private slots: 89 90 void sltRetranslateUI(); 91 92 private: 93 94 void prepare(); 95 95 96 96 QGridLayout *m_pContainerLayout; … … 105 105 106 106 107 class UICloneVMAdditionalOptionsEditor : public Q IWithRetranslateUI<QGroupBox>107 class UICloneVMAdditionalOptionsEditor : public QGroupBox 108 108 { 109 109 Q_OBJECT; … … 135 135 136 136 void sltMACAddressClonePolicyChanged(); 137 138 private: 139 140 void prepare(); 141 v irtual void retranslateUi() /* override final */;137 void sltRetranslateUI(); 138 139 private: 140 141 void prepare(); 142 142 void populateMACAddressClonePolicies(); 143 143 void updateMACAddressClonePolicyComboToolTip(); … … 151 151 }; 152 152 153 class UICloneVMCloneTypeGroupBox : public Q IWithRetranslateUI<QGroupBox>153 class UICloneVMCloneTypeGroupBox : public QGroupBox 154 154 { 155 155 Q_OBJECT; … … 167 167 168 168 void sltButtonClicked(QAbstractButton *); 169 170 private: 171 172 void prepare(); 173 v irtual void retranslateUi() /* override final */;169 void sltRetranslateUI(); 170 171 private: 172 173 void prepare(); 174 174 175 175 QButtonGroup *m_pButtonGroup; … … 179 179 180 180 181 class UICloneVMCloneModeGroupBox : public Q IWithRetranslateUI<QGroupBox>181 class UICloneVMCloneModeGroupBox : public QGroupBox 182 182 { 183 183 Q_OBJECT; … … 195 195 196 196 void sltButtonClicked(); 197 198 private: 199 200 void prepare(); 201 v irtual void retranslateUi() /* override final */;197 void sltRetranslateUI(); 198 199 private: 200 201 void prepare(); 202 202 203 203 bool m_fShowChildsOption; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h
r103948 r103950 39 39 /* Local includes: */ 40 40 #include "QIComboBox.h" 41 #include "QIWithRetranslateUI.h"42 43 41 44 42 /* Forward declarations: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.cpp
r98103 r103950 35 35 #include "UIBaseMemoryEditor.h" 36 36 #include "UICommon.h" 37 #include "UIFilePathSelector.h" 37 38 #include "UIHostnameDomainNameEditor.h" 38 #include "UI FilePathSelector.h"39 #include "UITranslationEventListener.h" 39 40 #include "UIUserNamePasswordEditor.h" 40 41 #include "UIVirtualCPUEditor.h" … … 52 53 53 54 UIUserNamePasswordGroupBox::UIUserNamePasswordGroupBox(QWidget *pParent /* = 0 */) 54 : Q IWithRetranslateUI<QGroupBox>(pParent)55 : QGroupBox(pParent) 55 56 , m_pUserNamePasswordEditor(0) 56 57 { … … 71 72 connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigUserNameChanged, 72 73 this, &UIUserNamePasswordGroupBox::sigUserNameChanged); 73 retranslateUi(); 74 } 75 76 void UIUserNamePasswordGroupBox::retranslateUi() 74 sltRetranslateUI(); 75 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 76 this, &UIUserNamePasswordGroupBox::sltRetranslateUI); 77 } 78 79 void UIUserNamePasswordGroupBox::sltRetranslateUI() 77 80 { 78 81 setTitle(UIWizardNewVM::tr("Username and Password")); … … 124 127 125 128 UIGAInstallationGroupBox::UIGAInstallationGroupBox(QWidget *pParent /* = 0 */) 126 : Q IWithRetranslateUI<QGroupBox>(pParent)129 : QGroupBox(pParent) 127 130 , m_pGAISOPathLabel(0) 128 131 , m_pGAISOFilePathSelector(0) … … 163 166 connect(this, &UIGAInstallationGroupBox::toggled, 164 167 this, &UIGAInstallationGroupBox::sltToggleWidgetsEnabled); 165 retranslateUi(); 166 } 167 168 void UIGAInstallationGroupBox::retranslateUi() 168 sltRetranslateUI(); 169 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 170 this, &UIGAInstallationGroupBox::sltRetranslateUI); 171 } 172 173 void UIGAInstallationGroupBox::sltRetranslateUI() 169 174 { 170 175 if (m_pGAISOFilePathSelector) … … 218 223 219 224 UIAdditionalUnattendedOptions::UIAdditionalUnattendedOptions(QWidget *pParent /* = 0 */) 220 : QIWithRetranslateUI<QGroupBox>(pParent)225 : QGroupBox(pParent) 221 226 , m_pProductKeyLabel(0) 222 227 , m_pProductKeyLineEdit(0) … … 266 271 this, &UIAdditionalUnattendedOptions::sigStartHeadlessChanged); 267 272 268 retranslateUi(); 269 } 270 271 void UIAdditionalUnattendedOptions::retranslateUi() 273 sltRetranslateUI(); 274 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 275 this, &UIAdditionalUnattendedOptions::sltRetranslateUI); 276 } 277 278 void UIAdditionalUnattendedOptions::sltRetranslateUI() 272 279 { 273 280 setTitle(UIWizardNewVM::tr("Additional Options")); … … 362 369 363 370 UINewVMHardwareContainer::UINewVMHardwareContainer(QWidget *pParent /* = 0 */) 364 : Q IWithRetranslateUI<QWidget>(pParent)371 : QWidget(pParent) 365 372 , m_pBaseMemoryEditor(0) 366 373 , m_pVirtualCPUEditor(0) … … 411 418 this, &UINewVMHardwareContainer::sigEFIEnabledChanged); 412 419 413 414 retranslateUi(); 415 } 416 417 void UINewVMHardwareContainer::retranslateUi() 420 sltRetranslateUI(); 421 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 422 this, &UINewVMHardwareContainer::sltRetranslateUI); 423 } 424 425 void UINewVMHardwareContainer::sltRetranslateUI() 418 426 { 419 427 if (m_pEFICheckBox) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.h
r98103 r103950 36 36 #include <QGroupBox> 37 37 38 /* Local includes: */39 #include "QIWithRetranslateUI.h"40 41 38 /* Forward declarations: */ 42 39 class QCheckBox; … … 52 49 class UIVirtualCPUEditor; 53 50 54 class UIUserNamePasswordGroupBox : public Q IWithRetranslateUI<QGroupBox>51 class UIUserNamePasswordGroupBox : public QGroupBox 55 52 { 56 53 Q_OBJECT; … … 76 73 /** @} */ 77 74 75 private slots: 76 77 void sltRetranslateUI(); 78 78 79 private: 79 80 80 81 void prepare(); 81 virtual void retranslateUi() /* override final */;82 82 83 83 UIUserNamePasswordEditor *m_pUserNamePasswordEditor; … … 85 85 86 86 87 class UIGAInstallationGroupBox : public Q IWithRetranslateUI<QGroupBox>87 class UIGAInstallationGroupBox : public QGroupBox 88 88 { 89 89 Q_OBJECT; … … 108 108 109 109 void sltToggleWidgetsEnabled(bool fEnabled); 110 void sltRetranslateUI(); 110 111 111 112 private: 112 113 113 virtual void retranslateUi() /* override final */;114 114 void prepare(); 115 115 … … 118 118 }; 119 119 120 class UIAdditionalUnattendedOptions : public Q IWithRetranslateUI<QGroupBox>120 class UIAdditionalUnattendedOptions : public QGroupBox 121 121 { 122 122 Q_OBJECT; … … 145 145 /** @} */ 146 146 147 private slots: 148 149 void sltRetranslateUI(); 150 147 151 private: 148 152 149 153 void prepare(); 150 virtual void retranslateUi() /* override final */;151 154 152 155 QLabel *m_pProductKeyLabel; … … 158 161 159 162 160 class UINewVMHardwareContainer : public Q IWithRetranslateUI<QWidget>163 class UINewVMHardwareContainer : public QWidget 161 164 { 162 165 Q_OBJECT; … … 179 182 /** @} */ 180 183 184 private slots: 185 186 void sltRetranslateUI(); 187 181 188 private: 182 189 183 190 void prepare(); 184 virtual void retranslateUi() /* override final */;185 191 186 192 UIBaseMemoryEditor *m_pBaseMemoryEditor;
Note:
See TracChangeset
for help on using the changeset viewer.