Changeset 78323 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp
- Timestamp:
- Apr 26, 2019 1:07:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp
r77677 r78323 2614 2614 setStatusTip(QApplication::translate("UIActionPool", "Open pane with selected cloud profile properties")); 2615 2615 setToolTip(QApplication::translate("UIActionPool", "Open Cloud Profile Properties (%1)").arg(shortcut().toString())); 2616 } 2617 }; 2618 2619 /** Simple action extension, used as 'Try Page' action class. */ 2620 class UIActionMenuSelectorCloudShowTryPage : public UIActionSimple 2621 { 2622 Q_OBJECT; 2623 2624 public: 2625 2626 /** Constructs action passing @a pParent to the base-class. */ 2627 UIActionMenuSelectorCloudShowTryPage(UIActionPool *pParent) 2628 : UIActionSimple(pParent, 2629 ":/cloud_profile_try_32px.png", ":/cloud_profile_try_16px.png", 2630 ":/cloud_profile_try_disabled_32px.png", ":/cloud_profile_try_disabled_16px.png") 2631 { 2632 setShortcutContext(Qt::WidgetWithChildrenShortcut); 2633 } 2634 2635 protected: 2636 2637 /** Returns shortcut extra-data ID. */ 2638 virtual QString shortcutExtraDataID() const /* override */ 2639 { 2640 return QString("ShowCloudProfileTryPage"); 2641 } 2642 2643 /** Returns default shortcut. */ 2644 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 2645 { 2646 return QKeySequence("Ctrl+Shift+T"); 2647 } 2648 2649 /** Handles translation event. */ 2650 virtual void retranslateUi() /* override */ 2651 { 2652 setIconText(QApplication::translate("UIActionPool", "Try")); 2653 setName(QApplication::translate("UIActionPool", "&Try Oracle Cloud for Free...")); 2654 setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager")); 2655 setStatusTip(QApplication::translate("UIActionPool", "Try Oracle cloud for free")); 2656 const QString strToolTip = QApplication::translate("UIActionPool", "Try Oracle Cloud for Free"); 2657 setToolTip(shortcut().isEmpty() ? strToolTip : QString("%1 (%2)").arg(strToolTip, shortcut().toString())); 2616 2658 } 2617 2659 }; … … 2790 2832 m_pool[UIActionIndexST_M_Cloud_S_Remove] = new UIActionMenuSelectorCloudPerformRemove(this); 2791 2833 m_pool[UIActionIndexST_M_Cloud_T_Details] = new UIActionMenuSelectorCloudToggleProperties(this); 2834 m_pool[UIActionIndexST_M_Cloud_S_TryPage] = new UIActionMenuSelectorCloudShowTryPage(this); 2792 2835 m_pool[UIActionIndexST_M_Cloud_S_Help] = new UIActionMenuSelectorCloudShowHelp(this); 2793 2836 … … 3360 3403 } 3361 3404 3405 /* 'Try Page' action: */ 3406 fSeparator = addAction(pMenu, action(UIActionIndexST_M_Cloud_S_TryPage)) || fSeparator; 3362 3407 /* 'Help' action: */ 3363 3408 fSeparator = addAction(pMenu, action(UIActionIndexST_M_Cloud_S_Help)) || fSeparator;
Note:
See TracChangeset
for help on using the changeset viewer.