Changeset 103058 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 25, 2024 12:34:41 PM (13 months ago)
- svn:sync-xref-src-repo-rev:
- 161299
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r100943 r103058 710 710 }; 711 711 712 /** Simple action extension, used as 'Online Documentation' action class. */ 713 class UIActionSimpleOnlineDocumentation : public UIActionSimple 714 { 715 Q_OBJECT; 716 717 public: 718 719 /** Constructs action passing @a pParent to the base-class. */ 720 UIActionSimpleOnlineDocumentation(UIActionPool *pParent) 721 : UIActionSimple(pParent, ":/site_oracle_16px.png", ":/site_oracle_16px.png", true) 722 { 723 retranslateUi(); 724 } 725 726 protected: 727 728 /** Returns action extra-data ID. */ 729 virtual int extraDataID() const RT_OVERRIDE 730 { 731 return UIExtraDataMetaDefs::MenuHelpActionType_OnlineDocumentation; 732 } 733 /** Returns action extra-data key. */ 734 virtual QString extraDataKey() const RT_OVERRIDE 735 { 736 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_OnlineDocumentation); 737 } 738 /** Returns whether action is allowed. */ 739 virtual bool isAllowed() const RT_OVERRIDE 740 { 741 return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_OnlineDocumentation); 742 } 743 744 /** Returns shortcut extra-data ID. */ 745 virtual QString shortcutExtraDataID() const RT_OVERRIDE 746 { 747 return QString("OnlineDocumentation"); 748 } 749 750 /** Handles translation event. */ 751 virtual void retranslateUi() RT_OVERRIDE 752 { 753 setName(QApplication::translate("UIActionPool", "&Online Documentation...")); 754 setStatusTip(QApplication::translate("UIActionPool", "Open the browser and go to the VirtualBox user manual")); 755 } 756 }; 757 712 758 /** Simple action extension, used as 'Web Site' action class. */ 713 759 class UIActionSimpleWebSite : public UIActionSimple … … 848 894 }; 849 895 850 851 896 /** Simple action extension, used as 'Oracle' action class. */ 852 897 class UIActionSimpleOracle : public UIActionSimple … … 892 937 setName(QApplication::translate("UIActionPool", "&Oracle Web Site...")); 893 938 setStatusTip(QApplication::translate("UIActionPool", "Open the browser and go to the Oracle web site")); 894 }895 };896 897 898 /** Simple action extension, used as 'Online Documentation' action class. */899 class UIActionSimpleOnlineDocumentation : public UIActionSimple900 {901 Q_OBJECT;902 903 public:904 905 /** Constructs action passing @a pParent to the base-class. */906 UIActionSimpleOnlineDocumentation(UIActionPool *pParent)907 : UIActionSimple(pParent, ":/site_oracle_16px.png", ":/site_oracle_16px.png", true)908 {909 retranslateUi();910 }911 912 protected:913 914 /** Returns action extra-data ID. */915 virtual int extraDataID() const RT_OVERRIDE916 {917 return UIExtraDataMetaDefs::MenuHelpActionType_OnlineDocumentation;918 }919 /** Returns action extra-data key. */920 virtual QString extraDataKey() const RT_OVERRIDE921 {922 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_OnlineDocumentation);923 }924 /** Returns whether action is allowed. */925 virtual bool isAllowed() const RT_OVERRIDE926 {927 return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_OnlineDocumentation);928 }929 930 /** Returns shortcut extra-data ID. */931 virtual QString shortcutExtraDataID() const RT_OVERRIDE932 {933 return QString("OnlineDocumentation");934 }935 936 /** Handles translation event. */937 virtual void retranslateUi() RT_OVERRIDE938 {939 setName(QApplication::translate("UIActionPool", "&Online Documentation..."));940 setStatusTip(QApplication::translate("UIActionPool", "Open the browser and go to the VirtualBox user manual"));941 939 } 942 940 }; … … 3490 3488 m_pool[UIActionIndex_Menu_Help] = new UIActionMenuHelp(this); 3491 3489 m_pool[UIActionIndex_Simple_Contents] = new UIActionSimpleContents(this); 3490 m_pool[UIActionIndex_Simple_OnlineDocumentation] = new UIActionSimpleOnlineDocumentation(this); 3492 3491 m_pool[UIActionIndex_Simple_WebSite] = new UIActionSimpleWebSite(this); 3493 3492 m_pool[UIActionIndex_Simple_BugTracker] = new UIActionSimpleBugTracker(this); 3494 3493 m_pool[UIActionIndex_Simple_Forums] = new UIActionSimpleForums(this); 3495 3494 m_pool[UIActionIndex_Simple_Oracle] = new UIActionSimpleOracle(this); 3496 m_pool[UIActionIndex_Simple_OnlineDocumentation] = new UIActionSimpleOnlineDocumentation(this);3497 3495 #ifndef VBOX_WS_MAC 3498 3496 m_pool[UIActionIndex_Simple_About] = new UIActionSimpleAbout(this); … … 3625 3623 &msgCenter(), &UIMessageCenter::sltResetSuppressedMessages, Qt::UniqueConnection); 3626 3624 3627 /* 'Help' menu connections. Note that connections for UIActionIndex_Simple_Contents is done 3628 * in manager and runtime uis separately in their respective classes: */ 3625 /* 'Help' menu connections. Note that connections for UIActionIndex_Simple_Contents 3626 * are done in manager and runtime UIs separately in their respective classes: */ 3627 connect(action(UIActionIndex_Simple_OnlineDocumentation), &UIAction::triggered, 3628 &msgCenter(), &UIMessageCenter::sltShowOnlineDocumentation, Qt::UniqueConnection); 3629 3629 connect(action(UIActionIndex_Simple_WebSite), &UIAction::triggered, 3630 3630 &msgCenter(), &UIMessageCenter::sltShowHelpWebDialog, Qt::UniqueConnection); … … 3635 3635 connect(action(UIActionIndex_Simple_Oracle), &UIAction::triggered, 3636 3636 &msgCenter(), &UIMessageCenter::sltShowOracle, Qt::UniqueConnection); 3637 connect(action(UIActionIndex_Simple_OnlineDocumentation), &UIAction::triggered,3638 &msgCenter(), &UIMessageCenter::sltShowOnlineDocumentation, Qt::UniqueConnection);3639 3637 #ifndef VBOX_WS_MAC 3640 3638 connect(action(UIActionIndex_Simple_About), &UIAction::triggered, -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r100943 r103058 89 89 UIActionIndex_Menu_Help, 90 90 UIActionIndex_Simple_Contents, 91 UIActionIndex_Simple_OnlineDocumentation, 91 92 UIActionIndex_Simple_WebSite, 92 93 UIActionIndex_Simple_BugTracker, 93 94 UIActionIndex_Simple_Forums, 94 95 UIActionIndex_Simple_Oracle, 95 UIActionIndex_Simple_OnlineDocumentation,96 96 #ifndef VBOX_WS_MAC 97 97 UIActionIndex_Simple_About,
Note:
See TracChangeset
for help on using the changeset viewer.