Changeset 47108 in vbox for trunk/src/VBox
- Timestamp:
- Jul 12, 2013 10:12:38 AM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp
r47031 r47108 32 32 const QMap<int, QString> &buttonDescriptions, 33 33 bool fProposeAutoConfirmation) 34 : Q Widget(pParent)34 : QIWithRetranslateUI<QWidget>(pParent) 35 35 , m_fPolished(false) 36 36 , m_iLayoutMargin(10), m_iLayoutSpacing(5) … … 228 228 setFocusProxy(m_pButtonPane); 229 229 m_pTextPane->setFocusProxy(m_pButtonPane); 230 231 /* Translate UI finally: */ 232 retranslateUi(); 230 233 } 231 234 … … 241 244 UIAnimation::installPropertyAnimation(this, "opacity", "defaultOpacity", "hoveredOpacity", 242 245 SIGNAL(sigHoverEnter()), SIGNAL(sigHoverLeave())); 246 } 247 248 void UIPopupPane::retranslateUi() 249 { 250 /* Translate tool-tips: */ 251 retranslateToolTips(); 252 } 253 254 void UIPopupPane::retranslateToolTips() 255 { 256 /* Translate pane & text-pane tool-tips: */ 257 if (m_fFocused) 258 { 259 setToolTip(QString()); 260 m_pTextPane->setToolTip(QString()); 261 } 262 else 263 { 264 setToolTip(QApplication::translate("UIPopupCenter", "Click for full details")); 265 m_pTextPane->setToolTip(QApplication::translate("UIPopupCenter", "Click for full details")); 266 } 243 267 } 244 268 … … 285 309 emit sigHoverEnter(); 286 310 } 311 /* Translate tool-tips: */ 312 retranslateToolTips(); 287 313 } 288 314 break; … … 302 328 emit sigHoverLeave(); 303 329 } 330 /* Translate tool-tips: */ 331 retranslateToolTips(); 304 332 } 305 333 break; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h
r47031 r47108 24 24 #include <QMap> 25 25 26 /* GUI includes: */ 27 #include "QIWithRetranslateUI.h" 28 26 29 /* Forward declaration: */ 27 30 class UIPopupPaneTextPane; … … 30 33 31 34 /* Popup-pane prototype: */ 32 class UIPopupPane : public Q Widget35 class UIPopupPane : public QIWithRetranslateUI<QWidget> 33 36 { 34 37 Q_OBJECT; … … 101 104 void prepareAnimation(); 102 105 106 /* Helpers: Translate stuff: */ 107 void retranslateUi(); 108 void retranslateToolTips(); 109 103 110 /* Handler: Event-filter stuff: */ 104 111 bool eventFilter(QObject *pWatched, QEvent *pEvent);
Note:
See TracChangeset
for help on using the changeset viewer.