Changeset 104232 in vbox
- Timestamp:
- Apr 8, 2024 2:20:52 PM (8 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium/viso
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r104228 r104232 78 78 79 79 UIVisoSettingWidget(QWidget *pParent); 80 virtual void retranslateUi();81 80 void setVisoName(const QString &strName); 82 81 void setSettings(const UIVisoCreatorWidget::Settings &settings); … … 84 83 85 84 private slots: 85 86 void sltRetranslateUI(); 86 87 87 88 private: … … 228 229 ++iRow; 229 230 pDialogSettingsContainerLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), iRow, 0, 1, 2); 230 retranslateUi(); 231 } 232 233 void UIVisoSettingWidget::retranslateUi() 231 sltRetranslateUI(); 232 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 233 this, &UIVisoSettingWidget::sltRetranslateUI); 234 } 235 236 void UIVisoSettingWidget::sltRetranslateUI() 234 237 { 235 238 int iLabelWidth = 0; … … 304 307 UIVisoCreatorWidget::UIVisoCreatorWidget(UIActionPool *pActionPool, QWidget *pParent, 305 308 bool fShowToolBar, const QString& strVisoFilePath, const QString& strMachineName) 306 : Q IWithRetranslateUI<QWidget>(pParent)309 : QWidget(pParent) 307 310 , m_pActionSettings(0) 308 311 , m_pAddAction(0) … … 328 331 populateMenuMainToolbar(); 329 332 prepareConnections(); 330 retranslateUi();331 333 if (m_pActionSettings) 332 334 sltSettingsActionToggled(m_pActionSettings->isChecked()); … … 396 398 { 397 399 return m_pMainMenu; 398 }399 400 void UIVisoCreatorWidget::retranslateUi()401 {402 400 } 403 401 … … 742 740 UIVisoCreatorDialog::UIVisoCreatorDialog(UIActionPool *pActionPool, QWidget *pParent, 743 741 const QString& strVisoFilePath, const QString& strMachineName /* = QString() */) 744 : QIWithRe translateUI<QIWithRestorableGeometry<QIMainDialog>>(pParent)742 : QIWithRestorableGeometry<QIMainDialog>(pParent) 745 743 , m_pVisoCreatorWidget(0) 746 744 , m_pButtonBox(0) … … 841 839 uiCommon().setHelpKeyword(m_pButtonBox->button(QIDialogButtonBox::Help), "create-optical-disk-image"); 842 840 843 retranslateUi(); 844 } 845 846 void UIVisoCreatorDialog::retranslateUi() 841 sltRetranslateUI(); 842 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 843 this, &UIVisoCreatorDialog::sltRetranslateUI); 844 } 845 846 void UIVisoCreatorDialog::sltRetranslateUI() 847 847 { 848 848 updateWindowTitle(); … … 875 875 } 876 876 } 877 return QIWithRe translateUI<QIWithRestorableGeometry<QIMainDialog>>::event(pEvent);877 return QIWithRestorableGeometry<QIMainDialog>::event(pEvent); 878 878 } 879 879 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h
r104228 r104232 38 38 #include "QIMainDialog.h" 39 39 #include "QIWithRestorableGeometry.h" 40 #include "QIWithRetranslateUI.h"41 40 #include "UIFileManagerHostTable.h" 42 41 … … 78 77 * for VISO file system. It has the main menu, main toolbar, and a vertical toolbar and corresponding 79 78 * actions. */ 80 class SHARED_LIBRARY_STUFF UIVisoCreatorWidget : public Q IWithRetranslateUI<QWidget>79 class SHARED_LIBRARY_STUFF UIVisoCreatorWidget : public QWidget 81 80 { 82 81 Q_OBJECT; … … 123 122 #endif 124 123 125 protected:126 127 virtual void retranslateUi() RT_OVERRIDE RT_FINAL;128 129 124 private slots: 130 125 … … 189 184 190 185 191 class SHARED_LIBRARY_STUFF UIVisoCreatorDialog : public QIWithRe translateUI<QIWithRestorableGeometry<QIMainDialog>>186 class SHARED_LIBRARY_STUFF UIVisoCreatorDialog : public QIWithRestorableGeometry<QIMainDialog> 192 187 { 193 188 Q_OBJECT; … … 224 219 void sltVisoFilePathChanged(const QString &strPath); 225 220 void sltSave(); 221 void sltRetranslateUI(); 226 222 227 223 private: … … 229 225 bool saveVISOFile(); 230 226 void prepareWidgets(const QString& strVisoSavePath, const QString &strMachineName); 231 virtual void retranslateUi() RT_OVERRIDE RT_FINAL;232 227 void loadSettings(); 233 228 void saveDialogGeometry();
Note:
See TracChangeset
for help on using the changeset viewer.