Changeset 75018 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp
- Timestamp:
- Oct 24, 2018 8:15:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp
r74942 r75018 230 230 }; 231 231 232 /** Simple action extension, used as 'Show Guest Control Dialog' action class. */ 233 class UIActionSimpleRuntimeShowGuestControlDialog : public UIActionSimple 234 { 235 Q_OBJECT; 236 237 public: 238 239 /** Constructs action passing @a pParent to the base-class. */ 240 UIActionSimpleRuntimeShowGuestControlDialog(UIActionPool *pParent) 241 : UIActionSimple(pParent, ":/session_info_16px.png", ":/session_info_disabled_16px.png", true) 242 {} 243 244 protected: 245 246 /** Returns action extra-data ID. */ 247 virtual int extraDataID() const /* override */ 248 { 249 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_GuestControlDialog; 250 } 251 /** Returns action extra-data key. */ 252 virtual QString extraDataKey() const /* override */ 253 { 254 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_GuestControlDialog); 255 } 256 /** Returns whether action is allowed. */ 257 virtual bool isAllowed() const /* override */ 258 { 259 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_GuestControlDialog); 260 } 261 262 /** Returns shortcut extra-data ID. */ 263 virtual QString shortcutExtraDataID() const /* override */ 264 { 265 return QString("GuestControlDialog"); 266 } 267 268 /** Returns default shortcut. */ 269 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 270 { 271 return QKeySequence(); 272 } 273 274 /** Handles translation event. */ 275 virtual void retranslateUi() /* override */ 276 { 277 setName(QApplication::translate("UIActionPool", "Guest Control...")); 278 setStatusTip(QApplication::translate("UIActionPool", "Display the virtual machine guest control window")); 279 } 280 }; 281 232 282 /** Toggle action extension, used as 'Pause' action class. */ 233 283 class UIActionToggleRuntimePause : public UIActionToggle … … 3184 3234 m_pool[UIActionIndexRT_M_Machine_S_TakeSnapshot] = new UIActionSimpleRuntimePerformTakeSnapshot(this); 3185 3235 m_pool[UIActionIndexRT_M_Machine_S_ShowInformation] = new UIActionSimpleRuntimeShowInformationDialog(this); 3236 m_pool[UIActionIndexRT_M_Machine_S_ShowGuestControl] = new UIActionSimpleRuntimeShowGuestControlDialog(this); 3186 3237 m_pool[UIActionIndexRT_M_Machine_T_Pause] = new UIActionToggleRuntimePause(this); 3187 3238 m_pool[UIActionIndexRT_M_Machine_S_Reset] = new UIActionSimpleRuntimePerformReset(this); … … 3485 3536 /* 'Information Dialog' action: */ 3486 3537 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_ShowInformation)) || fSeparator; 3538 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_ShowGuestControl)) || fSeparator; 3487 3539 3488 3540 /* Separator: */
Note:
See TracChangeset
for help on using the changeset viewer.