- Timestamp:
- Apr 8, 2024 12:40:22 PM (10 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r103771 r104228 52 52 #include "QILineEdit.h" 53 53 #include "QIToolBar.h" 54 #include "UITranslationEventListener.h" 54 55 55 56 /* COM includes: */ … … 446 447 setStateAndEnableWidgets(); 447 448 448 retranslateUi(); 449 sltRetranslateUI(); 450 451 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 452 this, &UIFileManagerGuestTable::sltRetranslateUI); 449 453 } 450 454 … … 463 467 } 464 468 465 void UIFileManagerGuestTable:: retranslateUi()469 void UIFileManagerGuestTable::sltRetranslateUI() 466 470 { 467 471 if (m_pLocationLabel) … … 512 516 } 513 517 514 UIFileManagerTable:: retranslateUi();518 UIFileManagerTable::sltRetranslateUI(); 515 519 } 516 520 … … 1523 1527 setState(); 1524 1528 setSessionDependentWidgetsEnabled(); 1525 retranslateUi();1529 sltRetranslateUI(); 1526 1530 } 1527 1531 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.h
r103982 r104228 80 80 protected: 81 81 82 void retranslateUi() RT_OVERRIDE RT_FINAL;83 82 virtual bool readDirectory(const QString& strPath, UIFileSystemItem *parent, bool isStartDir = false) RT_OVERRIDE RT_FINAL; 84 83 virtual void deleteByItem(UIFileSystemItem *item) RT_OVERRIDE RT_FINAL; … … 113 112 void sltCommitDataSignalReceived(); 114 113 void sltAdditionsStateChange(); 114 virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL; 115 115 116 116 private: -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.cpp
r102515 r104228 41 41 #include "UIPathOperations.h" 42 42 #include "QIToolBar.h" 43 43 #include "UITranslationEventListener.h" 44 44 45 45 /********************************************************************************************************************************* … … 142 142 prepareActionConnections(); 143 143 determinePathSeparator(); 144 retranslateUi(); 144 sltRetranslateUI(); 145 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 146 this, &UIFileManagerHostTable::sltRetranslateUI); 145 147 } 146 148 … … 184 186 } 185 187 186 void UIFileManagerHostTable:: retranslateUi()188 void UIFileManagerHostTable::sltRetranslateUI() 187 189 { 188 190 if (m_pLocationLabel) 189 191 m_pLocationLabel->setText(UIFileManager::tr("Host File System:")); 190 192 m_strTableName = UIFileManager::tr("Host"); 191 UIFileManagerTable:: retranslateUi();193 UIFileManagerTable::sltRetranslateUI(); 192 194 } 193 195 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.h
r102515 r104228 62 62 static bool scanDirectory(const QString& strPath, UIFileSystemItem *parent, 63 63 QMap<QString, UIFileSystemItem*> &fileObjects); 64 void retranslateUi() override;65 64 virtual bool readDirectory(const QString& strPath, UIFileSystemItem *parent, bool isStartDir = false) override final; 66 65 virtual void deleteByItem(UIFileSystemItem *item) override final; … … 83 82 /** @} */ 84 83 84 protected slots: 85 86 virtual void sltRetranslateUI() RT_OVERRIDE; 87 85 88 private: 86 89 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp
r103988 r104228 50 50 #include "UIPathOperations.h" 51 51 #include "UITranslator.h" 52 #include "UITranslationEventListener.h" 52 53 53 54 /* COM includes: */ … … 406 407 407 408 UIFileManagerTable::UIFileManagerTable(UIActionPool *pActionPool, QWidget *pParent /* = 0 */) 408 : QIWithRetranslateUI<QWidget>(pParent)409 : QWidget(pParent) 409 410 , m_eFileOperationType(FileOperationType_None) 410 411 , m_pLocationLabel(0) … … 542 543 this, &UIFileManagerTable::sltSearchTextChanged); 543 544 } 545 546 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 547 this, &UIFileManagerTable::sltRetranslateUI); 548 544 549 optionsUpdated(); 545 550 } … … 1039 1044 } 1040 1045 1041 void UIFileManagerTable:: retranslateUi()1046 void UIFileManagerTable::sltRetranslateUI() 1042 1047 { 1043 1048 UIFileSystemItem *pRootItem = rootItem(); … … 1056 1061 /* Handle only events sent to m_pView: */ 1057 1062 if (pObject != m_pView) 1058 return Q IWithRetranslateUI<QWidget>::eventFilter(pObject, pEvent);1063 return QWidget::eventFilter(pObject, pEvent); 1059 1064 1060 1065 if (pEvent->type() == QEvent::KeyPress) … … 1113 1118 1114 1119 /* Call to base-class: */ 1115 return Q IWithRetranslateUI<QWidget>::eventFilter(pObject, pEvent);1120 return QWidget::eventFilter(pObject, pEvent); 1116 1121 } 1117 1122 … … 1202 1207 { 1203 1208 if (pEvent->type() == QEvent::EnabledChange) 1204 retranslateUi();1205 return Q IWithRetranslateUI<QWidget>::event(pEvent);1209 sltRetranslateUI(); 1210 return QWidget::event(pEvent); 1206 1211 } 1207 1212 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h
r103977 r104228 45 45 #include "QIDialog.h" 46 46 #include "QITableView.h" 47 #include "QIWithRetranslateUI.h"48 47 #include "UIGuestControlDefs.h" 49 48 … … 139 138 * populates the UIFileSystemModel by scanning the file system 140 139 * differently. The file structure kept in this class as a tree. */ 141 class UIFileManagerTable : public Q IWithRetranslateUI<QWidget>140 class UIFileManagerTable : public QWidget 142 141 { 143 142 Q_OBJECT; … … 208 207 }; 209 208 210 void retranslateUi() RT_OVERRIDE;211 209 void updateCurrentLocationEdit(const QString& strLocation); 212 210 /* @p index is for model not for 'proxy' model */ … … 275 273 /** Contains m_pBreadCrumbsWidget and m_pLocationComboBox. */ 276 274 UIFileTableNavigationWidget *m_pNavigationWidget; 275 276 protected slots: 277 278 virtual void sltRetranslateUI(); 277 279 278 280 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r103977 r104228 52 52 #include "UIPaneContainer.h" 53 53 #include "UIShortcutPool.h" 54 #include "UITranslationEventListener.h" 54 55 #include "UIVisoCreator.h" 55 56 #include "UIVisoContentBrowser.h" … … 105 106 :UIFileManagerHostTable(pActionPool, pParent) 106 107 { 108 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 109 this, &UIVisoHostBrowser::sltRetranslateUI); 107 110 } 108 111 … … 145 148 146 149 147 void UIVisoHostBrowser:: retranslateUi()148 { 149 UIFileManagerHostTable:: retranslateUi();150 void UIVisoHostBrowser::sltRetranslateUI() 151 { 152 UIFileManagerHostTable::sltRetranslateUI(); 150 153 if (m_pSubMenu) 151 154 m_pSubMenu->setTitle(QApplication::translate("UIVisoCreatorWidget", "VISO Browser")); 152 153 //setFileTableLabelText(QApplication::translate("UIVisoCreatorWidget","VISO Content"));154 155 } 155 156 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h
r103988 r104228 57 57 { 58 58 59 Q_OBJECT; 60 59 61 public: 60 62 … … 62 64 void prepareMainMenu(QMenu *pMenu); 63 65 66 private slots: 67 68 virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL; 69 64 70 private: 65 71 66 72 virtual void createFileViewContextMenu(const QWidget *pWidget, const QPoint &point) RT_OVERRIDE RT_FINAL; 67 virtual void retranslateUi() RT_OVERRIDE RT_FINAL;68 73 QPointer<QMenu> m_pSubMenu; 69 74 };
Note:
See TracChangeset
for help on using the changeset viewer.