Changeset 65255 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 12, 2017 11:03:57 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r65254 r65255 68 68 69 69 /** Constructor which remembers passed @a session object. */ 70 UISessionStateStatusBarIndicator(IndicatorType enmType, UISession *pSession) 71 : m_enmType(enmType) 72 , m_pSession(pSession) 73 {} 70 UISessionStateStatusBarIndicator(IndicatorType enmType, UISession *pSession); 74 71 75 72 /** Returns the indicator type. */ 76 73 IndicatorType type() const { return m_enmType; } 77 74 75 /** Returns the indicator description. */ 76 virtual QString description() const { return m_strDescription; } 77 78 78 /** Abstract update routine. */ 79 79 virtual void updateAppearance() = 0; … … 81 81 protected: 82 82 83 /** Handles translation event. */ 84 virtual void retranslateUi() /* override */; 85 83 86 /** Holds the indicator type. */ 84 87 const IndicatorType m_enmType; … … 86 89 /** Holds the session UI reference. */ 87 90 UISession *m_pSession; 91 92 /** Holds the indicator description. */ 93 QString m_strDescription; 88 94 }; 95 96 97 UISessionStateStatusBarIndicator::UISessionStateStatusBarIndicator(IndicatorType enmType, UISession *pSession) 98 : m_enmType(enmType) 99 , m_pSession(pSession) 100 { 101 } 102 103 void UISessionStateStatusBarIndicator::retranslateUi() 104 { 105 /* Translate description: */ 106 m_strDescription = tr("%1 status-bar indicator", "like 'hard-disk status-bar indicator'") 107 .arg(gpConverter->toString(type())); 108 109 /* Update appearance finally: */ 110 updateAppearance(); 111 } 112 89 113 90 114 /** UISessionStateStatusBarIndicator extension for Runtime UI: Hard-drive indicator. */ … … 109 133 110 134 private: 111 112 /** Retranslation routine. */113 void retranslateUi()114 {115 updateAppearance();116 }117 135 118 136 /** Update routine. */ … … 182 200 183 201 private: 184 185 /** Retranslation routine. */186 void retranslateUi()187 {188 updateAppearance();189 }190 202 191 203 /** Update routine. */ … … 260 272 private: 261 273 262 /** Retranslation routine. */263 void retranslateUi()264 {265 updateAppearance();266 }267 268 274 /** Update routine. */ 269 275 void updateAppearance() … … 375 381 376 382 private: 377 378 /** Retranslation routine. */379 void retranslateUi()380 {381 updateAppearance();382 }383 383 384 384 /** Update routine. */ … … 487 487 private: 488 488 489 /** Retranslation routine. */490 void retranslateUi()491 {492 updateAppearance();493 }494 495 489 /** Update routine. */ 496 490 void updateAppearance() … … 553 547 private: 554 548 555 /** Retranslation routine. */556 void retranslateUi()557 {558 updateAppearance();559 }560 561 549 /** Update routine. */ 562 550 void updateAppearance() … … 622 610 623 611 private: 624 625 /** Retranslation routine. */626 void retranslateUi()627 {628 updateAppearance();629 }630 612 631 613 /** Update routine. */ … … 731 713 732 714 private: 733 734 /** Retranslation routine. */735 void retranslateUi()736 {737 updateAppearance();738 }739 715 740 716 /** Paint-event handler. */ … … 826 802 private: 827 803 828 /** Retranslation routine. */829 void retranslateUi()830 {831 updateAppearance();832 }833 834 804 /** Update routine. */ 835 805 void updateAppearance() … … 934 904 private: 935 905 936 /** Retranslationroutine. */937 void retranslateUi()906 /** Update routine. */ 907 void updateAppearance() 938 908 { 939 909 setToolTip(QApplication::translate("UIIndicatorsPool", … … 946 916 "Note that the mouse integration feature requires Guest Additions to be installed in the guest OS.")); 947 917 } 948 949 /** Update routine. */950 void updateAppearance() {}951 918 }; 952 919 … … 976 943 private: 977 944 978 /** Retranslationroutine. */979 void retranslateUi()945 /** Update routine. */ 946 void updateAppearance() 980 947 { 981 948 setToolTip(QApplication::translate("UIIndicatorsPool", … … 984 951 "<nobr><img src=:/hostkey_captured_16px.png/> keyboard is captured</nobr>")); 985 952 } 986 987 /** Update routine. */988 void updateAppearance() {}989 953 }; 990 954
Note:
See TracChangeset
for help on using the changeset viewer.