- Timestamp:
- Apr 11, 2024 1:20:43 PM (9 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
r103771 r104297 123 123 UIFileManager::UIFileManager(EmbedTo enmEmbedding, UIActionPool *pActionPool, 124 124 const CMachine &comMachine, QWidget *pParent, bool fShowToolbar) 125 : Q IWithRetranslateUI<QWidget>(pParent)125 : QWidget(pParent) 126 126 , m_pMainLayout(0) 127 127 , m_pVerticalSplitter(0) … … 141 141 prepareObjects(); 142 142 prepareConnections(); 143 retranslateUi();144 143 restorePanelVisibility(); 145 144 UIFileManagerOptions::create(); … … 169 168 return 0; 170 169 return m_pActionPool->action(UIActionIndex_M_FileManager)->menu(); 171 }172 173 void UIFileManager::retranslateUi()174 {175 170 } 176 171 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h
r103977 r104297 40 40 /* GUI includes: */ 41 41 #include "QIManagerDialog.h" 42 #include "QIWithRetranslateUI.h"43 42 #include "UIGuestControlDefs.h" 44 43 … … 88 87 * one host and one guest file table views, a log viewer 89 88 * and some other file manager related widgets. */ 90 class SHARED_LIBRARY_STUFF UIFileManager : public Q IWithRetranslateUI<QWidget>89 class SHARED_LIBRARY_STUFF UIFileManager : public QWidget 91 90 { 92 91 Q_OBJECT; … … 109 108 110 109 void setSelectedVMListItems(const QList<UIVirtualMachineItem*> &items); 111 112 protected:113 114 virtual void retranslateUi() RT_OVERRIDE;115 110 116 111 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.cpp
r103803 r104297 39 39 #include "UILoggingDefs.h" 40 40 #include "UIShortcutPool.h" 41 #include "UITranslationEventListener.h" 41 42 #ifdef VBOX_WS_MAC 42 43 # include "VBoxUtils-darwin.h" … … 78 79 const QUuid &uMachineId, 79 80 const QString &strMachineName) 80 : QI WithRetranslateUI<QIManagerDialog>(pCenterWidget)81 : QIManagerDialog(pCenterWidget) 81 82 , m_pActionPool(pActionPool) 82 83 , m_uMachineId(uMachineId) … … 89 90 } 90 91 91 void UIFileManagerDialog:: retranslateUi()92 void UIFileManagerDialog::sltRetranslateUI() 92 93 { 93 94 if (!m_strMachineName.isEmpty()) … … 151 152 { 152 153 /* Apply language settings: */ 153 retranslateUi(); 154 sltRetranslateUI(); 155 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 156 this, &UIFileManagerDialog::sltRetranslateUI); 154 157 manageEscapeShortCut(); 155 158 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.h
r98103 r104297 38 38 /* GUI includes: */ 39 39 #include "QIManagerDialog.h" 40 #include "QIWithRetranslateUI.h"41 42 40 43 41 … … 69 67 70 68 /** QIManagerDialog extension providing GUI with the dialog displaying file manager releated logs. */ 71 class UIFileManagerDialog : public QI WithRetranslateUI<QIManagerDialog>69 class UIFileManagerDialog : public QIManagerDialog 72 70 { 73 71 Q_OBJECT; … … 83 81 84 82 protected: 85 86 /** @name Event-handling stuff.87 * @{ */88 /** Handles translation event. */89 virtual void retranslateUi() RT_OVERRIDE;90 /** @} */91 83 92 84 /** @name Prepare/cleanup cascade. … … 114 106 115 107 void sltSetCloseButtonShortCut(QKeySequence shortcut); 108 /** @name Event-handling stuff. 109 * @{ */ 110 /** Handles translation event. */ 111 void sltRetranslateUI(); 112 /** @} */ 116 113 117 114 private: -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r104228 r104297 70 70 /** A QWidget extension containing text entry fields for password and username and buttons to 71 71 * start/stop a guest session. */ 72 class UIGuestSessionWidget : public Q IWithRetranslateUI<QWidget>72 class UIGuestSessionWidget : public QWidget 73 73 { 74 74 Q_OBJECT; … … 92 92 protected: 93 93 94 void retranslateUi() RT_OVERRIDE;95 94 void keyPressEvent(QKeyEvent * pEvent) RT_OVERRIDE; 96 95 void showEvent(QShowEvent *pEvent) RT_OVERRIDE; … … 98 97 private slots: 99 98 99 void sltRetranslateUI(); 100 100 void sltButtonClick(); 101 101 void sltHandleTextChanged(const QString &strText); … … 129 129 130 130 UIGuestSessionWidget::UIGuestSessionWidget(QWidget *pParent /* = 0 */) 131 : Q IWithRetranslateUI<QWidget>(pParent)131 : QWidget(pParent) 132 132 , m_enmButtonMode(ButtonMode_Open) 133 133 , m_pUserNameEdit(0) … … 187 187 m_pMainLayout->insertStretch(-1, 1); 188 188 switchSessionOpenMode(); 189 retranslateUi(); 189 sltRetranslateUI(); 190 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 191 this, &UIGuestSessionWidget::sltRetranslateUI); 190 192 } 191 193 … … 204 206 } 205 207 206 void UIGuestSessionWidget:: retranslateUi()208 void UIGuestSessionWidget::sltRetranslateUI() 207 209 { 208 210 if (m_pUserNameEdit) … … 247 249 void UIGuestSessionWidget::showEvent(QShowEvent *pEvent) 248 250 { 249 Q IWithRetranslateUI<QWidget>::showEvent(pEvent);251 QWidget::showEvent(pEvent); 250 252 if (m_pUserNameEdit) 251 253 m_pUserNameEdit->setFocus(); … … 259 261 m_pPasswordEdit->setEnabled(true); 260 262 m_enmButtonMode = ButtonMode_Open; 261 retranslateUi();263 sltRetranslateUI(); 262 264 } 263 265 … … 269 271 m_pPasswordEdit->setEnabled(false); 270 272 m_enmButtonMode = ButtonMode_Close; 271 retranslateUi();273 sltRetranslateUI(); 272 274 } 273 275 … … 448 450 449 451 sltRetranslateUI(); 450 451 452 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 452 453 this, &UIFileManagerGuestTable::sltRetranslateUI); -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPaneContainer.cpp
r103987 r104297 27 27 28 28 /* Qt includes: */ 29 #include <QApplication> 29 30 #include <QCheckBox> 30 31 #include <QHBoxLayout> -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlDialog.cpp
r103710 r104297 39 39 #include "UIMachine.h" 40 40 #include "UISession.h" 41 #include "UITranslationEventListener.h" 41 42 42 43 … … 60 61 61 62 UIGuestProcessControlDialog::UIGuestProcessControlDialog(QWidget *pCenterWidget) 62 : QI WithRetranslateUI<QIManagerDialog>(pCenterWidget)63 : QIManagerDialog(pCenterWidget) 63 64 , m_comGuest(gpMachine->uisession()->guest()) 64 65 , m_strMachineName(gpMachine->machineName()) … … 66 67 } 67 68 68 void UIGuestProcessControlDialog:: retranslateUi()69 void UIGuestProcessControlDialog::sltRetranslateUI() 69 70 { 70 71 /* Translate window title: */ … … 103 104 { 104 105 /* Apply language settings: */ 105 retranslateUi(); 106 sltRetranslateUI(); 107 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 108 this, &UIGuestProcessControlDialog::sltRetranslateUI); 106 109 } 107 110 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlDialog.h
r103803 r104297 37 37 /* GUI includes: */ 38 38 #include "QIManagerDialog.h" 39 #include "QIWithRetranslateUI.h"40 39 41 40 /* COM includes: */ … … 58 57 59 58 /** QIManagerDialog extension providing GUI with the dialog displaying guest control releated logs. */ 60 class UIGuestProcessControlDialog : public QI WithRetranslateUI<QIManagerDialog>59 class UIGuestProcessControlDialog : public QIManagerDialog 61 60 { 62 61 Q_OBJECT; … … 68 67 69 68 protected: 70 71 /** @name Event-handling stuff.72 * @{ */73 /** Handles translation event. */74 virtual void retranslateUi() RT_OVERRIDE;75 /** @} */76 69 77 70 /** @name Prepare/cleanup cascade. … … 99 92 100 93 void sltSetCloseButtonShortCut(QKeySequence shortcut); 94 /** @name Event-handling stuff. 95 * @{ */ 96 /** Handles translation event. */ 97 void sltRetranslateUI(); 98 /** @} */ 101 99 102 100 private: -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.cpp
r103987 r104297 40 40 #include "UIGuestProcessControlWidget.h" 41 41 #include "UIIconPool.h" 42 #include "UITranslationEventListener.h" 42 43 43 44 /* COM includes: */ … … 295 296 QWidget *pParent, QString strMachineName /* = QString()*/, 296 297 bool fShowToolbar /* = false */) 297 : QIWithRetranslateUI<QWidget>(pParent)298 : QWidget(pParent) 298 299 , m_comGuest(comGuest) 299 300 , m_pMainLayout(0) … … 310 311 prepareToolBar(); 311 312 initGuestSessionTree(); 312 retranslateUi(); 313 sltRetranslateUI(); 314 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 315 this, &UIGuestProcessControlWidget::sltRetranslateUI); 313 316 } 314 317 … … 318 321 } 319 322 320 void UIGuestProcessControlWidget:: retranslateUi()323 void UIGuestProcessControlWidget::sltRetranslateUI() 321 324 { 322 325 if (m_pTreeWidget) -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.h
r103977 r104297 40 40 41 41 /* GUI includes: */ 42 #include "QIWithRetranslateUI.h"43 42 #include "QIManagerDialog.h" 44 43 #include "UIMainEventListener.h" … … 51 50 /** QWidget extension 52 51 * providing GUI with guest session information and control tab in session-information window. */ 53 class UIGuestProcessControlWidget : public Q IWithRetranslateUI<QWidget>52 class UIGuestProcessControlWidget : public QWidget 54 53 { 55 54 Q_OBJECT; … … 63 62 static const bool s_fDeleteAfterUnregister; 64 63 65 protected:66 67 virtual void retranslateUi() RT_OVERRIDE;68 69 64 private slots: 70 65 66 void sltRetranslateUI(); 71 67 void sltGuestSessionsUpdated(); 72 68 void sltGuestSessionRegistered(CGuestSession guestSession);
Note:
See TracChangeset
for help on using the changeset viewer.