Changeset 43447 in vbox for trunk/src/VBox
- Timestamp:
- Sep 27, 2012 10:18:22 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 80969
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ru.ts
r43267 r43447 11337 11337 <source>Unlocked</source> 11338 11338 <comment>SessionState</comment> 11339 <translation>Разблокирован о</translation>11339 <translation>Разблокирована</translation> 11340 11340 </message> 11341 11341 <message> 11342 11342 <source>Locked</source> 11343 11343 <comment>SessionState</comment> 11344 <translation>Заблокирован о</translation>11344 <translation>Заблокирована</translation> 11345 11345 </message> 11346 11346 <message> -
trunk/src/VBox/Frontends/VirtualBox/src/globals/QIWithRetranslateUI.h
r30194 r43447 25 25 #include <QEvent> 26 26 #include <QObject> 27 #include <QGraphicsWidget> 27 28 28 29 template <class Base> … … 113 114 }; 114 115 116 template <class Base> 117 class QIWithRetranslateUI4: public Base 118 { 119 public: 120 121 QIWithRetranslateUI4(QGraphicsWidget *pParent = 0) 122 : Base(pParent) 123 { 124 qApp->installEventFilter(this); 125 } 126 127 protected: 128 129 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) 130 { 131 switch (pEvent->type()) 132 { 133 case QEvent::LanguageChange: 134 { 135 retranslateUi(); 136 break; 137 } 138 default: 139 break; 140 } 141 return Base::eventFilter(pObject, pEvent); 142 } 143 144 virtual void retranslateUi() = 0; 145 }; 146 115 147 #endif /* __QIWithRetranslateUI_h */ 116 148 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
r42551 r43447 198 198 .arg(gpConverter->toString(m_machineState)) 199 199 .arg(dateTime) 200 .arg(gpConverter->toString(m_sessionState) );200 .arg(gpConverter->toString(m_sessionState).toLower()); 201 201 } 202 202 else -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h
r43153 r43447 25 25 /* GUI includes: */ 26 26 #include "QIGraphicsWidget.h" 27 #include "QIWithRetranslateUI.h" 27 28 28 29 /* Forward declaration: */ … … 49 50 /* Graphics item interface 50 51 * for graphics selector model/view architecture: */ 51 class UIGChooserItem : public QI GraphicsWidget52 class UIGChooserItem : public QIWithRetranslateUI4<QIGraphicsWidget> 52 53 { 53 54 Q_OBJECT; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
r43210 r43447 58 58 if (pScene) 59 59 pScene->addItem(this); 60 61 /* Translate finally: */ 62 retranslateUi(); 60 63 } 61 64 … … 85 88 /* Copy content to 'this': */ 86 89 copyContent(pCopyFrom, this); 90 91 /* Translate finally: */ 92 retranslateUi(); 87 93 } 88 94 … … 113 119 connect(this, SIGNAL(sigToggleStarted()), model(), SIGNAL(sigToggleStarted())); 114 120 connect(this, SIGNAL(sigToggleFinished()), model(), SIGNAL(sigToggleFinished()), Qt::QueuedConnection); 121 122 /* Translate finally: */ 123 retranslateUi(); 115 124 } 116 125 … … 143 152 /* Copy content to 'this': */ 144 153 copyContent(pCopyFrom, this); 154 155 /* Translate finally: */ 156 retranslateUi(); 145 157 } 146 158 … … 486 498 } 487 499 500 void UIGChooserItemGroup::retranslateUi() 501 { 502 } 503 488 504 void UIGChooserItemGroup::show() 489 505 { -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h
r43177 r43447 128 128 QVariant data(int iKey) const; 129 129 130 /* Helper: Translate stuff: */ 131 void retranslateUi(); 132 130 133 /* Helpers: Basic stuff: */ 131 134 void show(); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
r43153 r43447 69 69 parentItem()->addItem(this, iPosition); 70 70 setZValue(parentItem()->zValue() + 1); 71 72 /* Translate finally: */ 73 retranslateUi(); 71 74 } 72 75 … … 99 102 parentItem()->addItem(this, iPosition); 100 103 setZValue(parentItem()->zValue() + 1); 104 105 /* Translate finally: */ 106 retranslateUi(); 101 107 } 102 108 … … 135 141 state != KMachineState_Teleported && 136 142 state != KMachineState_Aborted; 143 } 144 145 void UIGChooserItemMachine::updateToolTip() 146 { 147 setToolTip(toolTipText()); 137 148 } 138 149 … … 265 276 } 266 277 return QVariant(); 278 } 279 280 void UIGChooserItemMachine::retranslateUi() 281 { 282 updateToolTip(); 267 283 } 268 284 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h
r43153 r43447 53 53 bool isLockedMachine() const; 54 54 55 /* API: Update stuff: */ 56 void updateToolTip(); 57 55 58 private: 56 59 … … 94 97 /* Data provider: */ 95 98 QVariant data(int iKey) const; 99 100 /* Helper: Translate stuff: */ 101 void retranslateUi(); 96 102 97 103 /* Helpers: Basic stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r43444 r43447 1695 1695 { 1696 1696 pMachineItem->recache(); 1697 pMachineItem->updateToolTip(); 1697 1698 pMachineItem->update(); 1698 1699 }
Note:
See TracChangeset
for help on using the changeset viewer.