- Timestamp:
- Apr 10, 2024 12:24:28 PM (10 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/consolemanager/UICloudConsoleDetailsWidget.cpp
r98103 r104273 39 39 #include "UICloudConsoleDetailsWidget.h" 40 40 #include "UICloudConsoleManager.h" 41 #include "UITranslationEventListener.h" 41 42 42 43 /* Other VBox includes: */ … … 45 46 46 47 UICloudConsoleDetailsWidget::UICloudConsoleDetailsWidget(EmbedTo enmEmbedding, QWidget *pParent /* = 0 */) 47 : Q IWithRetranslateUI<QWidget>(pParent)48 : QWidget(pParent) 48 49 , m_enmEmbedding(enmEmbedding) 49 50 , m_pStackedLayout(0) … … 111 112 } 112 113 113 void UICloudConsoleDetailsWidget:: retranslateUi()114 void UICloudConsoleDetailsWidget::sltRetranslateUI() 114 115 { 115 116 /* Translate editor labels: */ … … 226 227 227 228 /* Apply language settings: */ 228 retranslateUi(); 229 sltRetranslateUI(); 230 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 231 this, &UICloudConsoleDetailsWidget::sltRetranslateUI); 229 232 230 233 /* Update button states finally: */ -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/consolemanager/UICloudConsoleDetailsWidget.h
r98103 r104273 38 38 /* GUI includes: */ 39 39 #include "QIManagerDialog.h" 40 #include "QIWithRetranslateUI.h"41 40 42 41 /* Forward declarations: */ … … 124 123 125 124 /** Cloud Console details widget. */ 126 class UICloudConsoleDetailsWidget : public Q IWithRetranslateUI<QWidget>125 class UICloudConsoleDetailsWidget : public QWidget 127 126 { 128 127 Q_OBJECT; … … 155 154 void clearData(); 156 155 157 protected:158 159 /** Handles translation event. */160 virtual void retranslateUi() RT_OVERRIDE;161 162 156 private slots: 163 157 … … 178 172 void sltHandleButtonBoxClick(QAbstractButton *pButton); 179 173 /** @} */ 174 175 /** Handles translation event. */ 176 void sltRetranslateUI(); 180 177 181 178 private: -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/consolemanager/UICloudConsoleManager.cpp
r103710 r104273 46 46 #include "UICloudConsoleManager.h" 47 47 #include "UIMessageCenter.h" 48 #include "UITranslationEventListener.h" 48 49 #include "QIToolBar.h" 49 50 … … 122 123 123 124 /** QDialog extension used to acquire newly created console application parameters. */ 124 class UIInputDialogCloudConsoleApplication : public Q IWithRetranslateUI<QDialog>125 class UIInputDialogCloudConsoleApplication : public QDialog 125 126 { 126 127 Q_OBJECT; … … 138 139 QString argument() const; 139 140 140 pr otected:141 private slots: 141 142 142 143 /** Handles translation event. */ 143 v irtual void retranslateUi() RT_OVERRIDE;144 void sltRetranslateUI(); 144 145 145 146 private: … … 166 167 167 168 /** QDialog extension used to acquire newly created console profile parameters. */ 168 class UIInputDialogCloudConsoleProfile : public Q IWithRetranslateUI<QDialog>169 class UIInputDialogCloudConsoleProfile : public QDialog 169 170 { 170 171 Q_OBJECT; … … 180 181 QString argument() const; 181 182 182 pr otected:183 private slots: 183 184 184 185 /** Handles translation event. */ 185 v irtual void retranslateUi() RT_OVERRIDE;186 void sltRetranslateUI(); 186 187 187 188 private: … … 253 254 254 255 UIInputDialogCloudConsoleApplication::UIInputDialogCloudConsoleApplication(QWidget *pParent) 255 : Q IWithRetranslateUI<QDialog>(pParent)256 : QDialog(pParent) 256 257 , m_pLabelName(0) 257 258 , m_pEditorName(0) … … 280 281 } 281 282 282 void UIInputDialogCloudConsoleApplication:: retranslateUi()283 void UIInputDialogCloudConsoleApplication::sltRetranslateUI() 283 284 { 284 285 setWindowTitle(UICloudConsoleManager::tr("Add Application")); … … 358 359 359 360 /* Apply language settings: */ 360 retranslateUi(); 361 sltRetranslateUI(); 362 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 363 this, &UIInputDialogCloudConsoleApplication::sltRetranslateUI); 361 364 362 365 /* Resize to suitable size: */ … … 371 374 372 375 UIInputDialogCloudConsoleProfile::UIInputDialogCloudConsoleProfile(QWidget *pParent) 373 : Q IWithRetranslateUI<QDialog>(pParent)376 : QDialog(pParent) 374 377 , m_pLabelName(0) 375 378 , m_pEditorName(0) … … 391 394 } 392 395 393 void UIInputDialogCloudConsoleProfile:: retranslateUi()396 void UIInputDialogCloudConsoleProfile::sltRetranslateUI() 394 397 { 395 398 setWindowTitle(UICloudConsoleManager::tr("Add Profile")); … … 456 459 457 460 /* Apply language settings: */ 458 retranslateUi(); 461 sltRetranslateUI(); 462 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 463 this, &UIInputDialogCloudConsoleProfile::sltRetranslateUI); 459 464 460 465 /* Resize to suitable size: */ … … 470 475 UICloudConsoleManagerWidget::UICloudConsoleManagerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool, 471 476 bool fShowToolbar /* = true */, QWidget *pParent /* = 0 */) 472 : Q IWithRetranslateUI<QWidget>(pParent)477 : QWidget(pParent) 473 478 , m_enmEmbedding(enmEmbedding) 474 479 , m_pActionPool(pActionPool) … … 486 491 } 487 492 488 void UICloudConsoleManagerWidget:: retranslateUi()493 void UICloudConsoleManagerWidget::sltRetranslateUI() 489 494 { 490 495 /* Translate tree-widget: */ … … 781 786 782 787 /* Apply language settings: */ 783 retranslateUi(); 788 sltRetranslateUI(); 789 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 790 this, &UICloudConsoleManagerWidget::sltRetranslateUI); 784 791 785 792 /* Load cloud console stuff: */ … … 1155 1162 1156 1163 UICloudConsoleManager::UICloudConsoleManager(QWidget *pCenterWidget, UIActionPool *pActionPool) 1157 : QI WithRetranslateUI<QIManagerDialog>(pCenterWidget)1164 : QIManagerDialog(pCenterWidget) 1158 1165 , m_pActionPool(pActionPool) 1159 1166 { … … 1174 1181 } 1175 1182 1176 void UICloudConsoleManager:: retranslateUi()1183 void UICloudConsoleManager::sltRetranslateUI() 1177 1184 { 1178 1185 /* Translate window title: */ … … 1247 1254 { 1248 1255 /* Apply language settings: */ 1249 retranslateUi(); 1256 sltRetranslateUI(); 1257 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 1258 this, &UICloudConsoleManager::sltRetranslateUI); 1250 1259 } 1251 1260 -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/consolemanager/UICloudConsoleManager.h
r98103 r104273 34 34 /* GUI includes: */ 35 35 #include "QIManagerDialog.h" 36 #include "QIWithRetranslateUI.h"37 36 38 37 /* Forward declarations: */ … … 51 50 52 51 /** QWidget extension providing GUI with the pane to control cloud console related functionality. */ 53 class UICloudConsoleManagerWidget : public Q IWithRetranslateUI<QWidget>52 class UICloudConsoleManagerWidget : public QWidget 54 53 { 55 54 Q_OBJECT; … … 78 77 QIToolBar *toolbar() const { return m_pToolBar; } 79 78 #endif 80 81 protected:82 83 /** @name Event-handling stuff.84 * @{ */85 /** Handles translation event. */86 virtual void retranslateUi() RT_OVERRIDE;87 /** @} */88 79 89 80 public slots: … … 125 116 /** Handles tree-widget @a pItem change. */ 126 117 void sltHandleItemChange(QTreeWidgetItem *pItem); 118 /** @} */ 119 120 /** @name Event-handling stuff. 121 * @{ */ 122 /** Handles translation event. */ 123 void sltRetranslateUI(); 127 124 /** @} */ 128 125 … … 236 233 237 234 /** QIManagerDialog extension providing GUI with the dialog to control cloud console related functionality. */ 238 class UICloudConsoleManager : public QI WithRetranslateUI<QIManagerDialog>235 class UICloudConsoleManager : public QIManagerDialog 239 236 { 240 237 Q_OBJECT; … … 255 252 /** @} */ 256 253 254 /** @name Event-handling stuff. 255 * @{ */ 256 /** Handles translation event. */ 257 void sltRetranslateUI(); 258 /** @} */ 259 257 260 private: 258 261 … … 261 264 * @param pActionPool Brings the action-pool reference. */ 262 265 UICloudConsoleManager(QWidget *pCenterWidget, UIActionPool *pActionPool); 263 264 /** @name Event-handling stuff.265 * @{ */266 /** Handles translation event. */267 virtual void retranslateUi() RT_OVERRIDE;268 /** @} */269 266 270 267 /** @name Prepare/cleanup cascade. -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings/UICloudMachineSettingsDialog.cpp
r98103 r104273 37 37 #include "UIDesktopWidgetWatchdog.h" 38 38 #include "UINotificationCenter.h" 39 #include "UITranslationEventListener.h" 39 40 40 41 41 42 UICloudMachineSettingsDialog::UICloudMachineSettingsDialog(QWidget *pParent, const CCloudMachine &comCloudMachine) 42 : Q IWithRetranslateUI2<QWidget>(pParent, Qt::Window)43 : QWidget(pParent, Qt::Window) 43 44 , m_fPolished(false) 44 45 , m_fClosable(true) … … 63 64 } 64 65 65 void UICloudMachineSettingsDialog:: retranslateUi()66 void UICloudMachineSettingsDialog::sltRetranslateUI() 66 67 { 67 68 /* Translate title: */ … … 83 84 84 85 /* Call to base-class: */ 85 Q IWithRetranslateUI2<QWidget>::showEvent(pEvent);86 QWidget::showEvent(pEvent); 86 87 } 87 88 … … 155 156 156 157 /* Apply language settings: */ 157 retranslateUi(); 158 sltRetranslateUI(); 159 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 160 this, &UICloudMachineSettingsDialog::sltRetranslateUI); 158 161 } 159 162 … … 175 178 176 179 /* Retranslate title: */ 177 retranslateUi();180 sltRetranslateUI(); 178 181 179 182 /* Update form: */ -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings/UICloudMachineSettingsDialog.h
r103987 r104273 37 37 38 38 /* GUI includes: */ 39 #include "QIWithRetranslateUI.h"40 39 #include "UICloudMachineSettingsDialogPage.h" 41 40 … … 49 48 50 49 /** Cloud machine settings window. */ 51 class UICloudMachineSettingsDialog : public Q IWithRetranslateUI2<QWidget>50 class UICloudMachineSettingsDialog : public QWidget 52 51 { 53 52 Q_OBJECT; … … 73 72 protected: 74 73 75 /** Handles translation event. */76 virtual void retranslateUi() RT_OVERRIDE RT_FINAL;77 74 /** Handles show @a pEvent. */ 78 75 virtual void showEvent(QShowEvent *pEvent) RT_OVERRIDE RT_FINAL; … … 90 87 /** Accepts the dialog. */ 91 88 void accept() { save(); } 89 /** Handles translation event. */ 90 void sltRetranslateUI(); 92 91 93 92 private: -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings/UICloudMachineSettingsDialogPage.cpp
r98103 r104273 33 33 #include "UICloudMachineSettingsDialog.h" 34 34 #include "UICloudMachineSettingsDialogPage.h" 35 #include "UITranslationEventListener.h" 35 36 36 37 /* Other VBox includes: */ 37 38 #include "iprt/assert.h" 38 39 39 40 40 UICloudMachineSettingsDialogPage::UICloudMachineSettingsDialogPage(QWidget *pParent, 41 41 bool fFullScale /* = true */) 42 : Q IWithRetranslateUI<QWidget>(pParent)42 : QWidget(pParent) 43 43 , m_pParent(qobject_cast<UICloudMachineSettingsDialog*>(pParent)) 44 44 , m_fFullScale(fFullScale) … … 65 65 } 66 66 67 void UICloudMachineSettingsDialogPage:: retranslateUi()67 void UICloudMachineSettingsDialogPage::sltRetranslateUI() 68 68 { 69 69 AssertPtrReturnVoid(m_pFormEditor.data()); … … 100 100 101 101 /* Apply language settings: */ 102 retranslateUi(); 102 sltRetranslateUI(); 103 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 104 this, &UICloudMachineSettingsDialogPage::sltRetranslateUI); 103 105 } 104 106 -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings/UICloudMachineSettingsDialogPage.h
r103803 r104273 37 37 38 38 /* GUI includes: */ 39 #include "QIWithRetranslateUI.h"40 39 #include "UIFormEditorWidget.h" 41 40 … … 47 46 48 47 /** Cloud machine settings dialog page. */ 49 class UICloudMachineSettingsDialogPage : public Q IWithRetranslateUI<QWidget>48 class UICloudMachineSettingsDialogPage : public QWidget 50 49 { 51 50 Q_OBJECT; … … 77 76 void makeSureDataCommitted(); 78 77 79 pr otected:78 private slots: 80 79 81 80 /** Handles translation event. */ 82 v irtual void retranslateUi() RT_OVERRIDE;81 void sltRetranslateUI(); 83 82 84 83 private: -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileDetailsWidget.cpp
r98103 r104273 40 40 #include "UICloudProfileDetailsWidget.h" 41 41 #include "UICloudProfileManager.h" 42 #include "UITranslationEventListener.h" 42 43 43 44 /* Other VBox includes: */ … … 46 47 47 48 UICloudProfileDetailsWidget::UICloudProfileDetailsWidget(EmbedTo enmEmbedding, QWidget *pParent /* = 0 */) 48 : Q IWithRetranslateUI<QWidget>(pParent)49 : QWidget(pParent) 49 50 , m_enmEmbedding(enmEmbedding) 50 51 , m_pLabelName(0) … … 71 72 } 72 73 73 void UICloudProfileDetailsWidget:: retranslateUi()74 void UICloudProfileDetailsWidget::sltRetranslateUI() 74 75 { 75 76 /// @todo add description tool-tips … … 195 196 196 197 /* Apply language settings: */ 197 retranslateUi(); 198 sltRetranslateUI(); 199 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 200 this, &UICloudProfileDetailsWidget::sltRetranslateUI); 198 201 199 202 /* Update button states finally: */ -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileDetailsWidget.h
r98103 r104273 39 39 /* GUI includes: */ 40 40 #include "QIManagerDialog.h" 41 #include "QIWithRetranslateUI.h"42 41 43 42 /* Forward declarations: */ … … 124 123 125 124 /** Cloud Profile details widget. */ 126 class UICloudProfileDetailsWidget : public Q IWithRetranslateUI<QWidget>125 class UICloudProfileDetailsWidget : public QWidget 127 126 { 128 127 Q_OBJECT; … … 151 150 protected: 152 151 153 /** Handles translation event. */154 virtual void retranslateUi() RT_OVERRIDE;155 152 /** Handles editor translation. */ 156 153 void retranslateEditor(); … … 171 168 /** @} */ 172 169 170 /** Handles translation event. */ 171 void sltRetranslateUI(); 172 173 173 private: 174 174 -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp
r103578 r104273 47 47 #include "UINotificationCenter.h" 48 48 #include "UIShortcutPool.h" 49 #include "UITranslationEventListener.h" 49 50 #include "UIVirtualBoxEventHandler.h" 50 51 … … 183 184 UICloudProfileManagerWidget::UICloudProfileManagerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool, 184 185 bool fShowToolbar /* = true */, QWidget *pParent /* = 0 */) 185 : Q IWithRetranslateUI<QWidget>(pParent)186 : QWidget(pParent) 186 187 , m_enmEmbedding(enmEmbedding) 187 188 , m_pActionPool(pActionPool) … … 199 200 } 200 201 201 void UICloudProfileManagerWidget:: retranslateUi()202 void UICloudProfileManagerWidget::sltRetranslateUI() 202 203 { 203 204 /* Translate tree-widget: */ … … 568 569 569 570 /* Apply language settings: */ 570 retranslateUi(); 571 sltRetranslateUI(); 572 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 573 this, &UICloudProfileManagerWidget::sltRetranslateUI); 571 574 572 575 /* Load cloud stuff: */ … … 931 934 932 935 UICloudProfileManager::UICloudProfileManager(QWidget *pCenterWidget, UIActionPool *pActionPool) 933 : QI WithRetranslateUI<QIManagerDialog>(pCenterWidget)936 : QIManagerDialog(pCenterWidget) 934 937 , m_pActionPool(pActionPool) 935 938 { … … 950 953 } 951 954 952 void UICloudProfileManager:: retranslateUi()955 void UICloudProfileManager::sltRetranslateUI() 953 956 { 954 957 /* Translate window title: */ … … 1027 1030 { 1028 1031 /* Apply language settings: */ 1029 retranslateUi(); 1032 sltRetranslateUI(); 1033 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 1034 this, &UICloudProfileManager::sltRetranslateUI); 1030 1035 } 1031 1036 … … 1041 1046 { 1042 1047 /* Call to base class: */ 1043 QI WithRetranslateUI<QIManagerDialog>::closeEvent(pEvent);1048 QIManagerDialog::closeEvent(pEvent); 1044 1049 } 1045 1050 else -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.h
r98103 r104273 34 34 /* GUI includes: */ 35 35 #include "QIManagerDialog.h" 36 #include "QIWithRetranslateUI.h"37 36 38 37 /* Forward declarations: */ … … 52 51 53 52 /** QWidget extension providing GUI with the pane to control cloud profile related functionality. */ 54 class UICloudProfileManagerWidget : public Q IWithRetranslateUI<QWidget>53 class UICloudProfileManagerWidget : public QWidget 55 54 { 56 55 Q_OBJECT; … … 84 83 bool makeSureChangesResolved(); 85 84 86 p rotected:85 public slots: 87 86 88 87 /** @name Event-handling stuff. 89 88 * @{ */ 90 89 /** Handles translation event. */ 91 virtual void retranslateUi() RT_OVERRIDE; 92 /** @} */ 93 94 public slots: 90 void sltRetranslateUI(); 91 /** @} */ 95 92 96 93 /** @name Details-widget stuff. … … 238 235 239 236 /** QIManagerDialog extension providing GUI with the dialog to control cloud profile related functionality. */ 240 class UICloudProfileManager : public QI WithRetranslateUI<QIManagerDialog>237 class UICloudProfileManager : public QIManagerDialog 241 238 { 242 239 Q_OBJECT; … … 257 254 /** @} */ 258 255 256 /** @name Event-handling stuff. 257 * @{ */ 258 /** Handles translation event. */ 259 void sltRetranslateUI(); 260 /** @} */ 261 259 262 private: 260 263 … … 263 266 * @param pActionPool Brings the action-pool reference. */ 264 267 UICloudProfileManager(QWidget *pCenterWidget, UIActionPool *pActionPool); 265 266 /** @name Event-handling stuff.267 * @{ */268 /** Handles translation event. */269 virtual void retranslateUi() RT_OVERRIDE;270 /** @} */271 268 272 269 /** @name Prepare/cleanup cascade. -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UITranslationEventListener.cpp
r104262 r104273 82 82 && pObject == qApp) 83 83 { 84 //&& (pObject == qApp || pObject == this))85 84 emit sigRetranslateUI(); 86 85 }
Note:
See TracChangeset
for help on using the changeset viewer.