Changeset 51390 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 26, 2014 12:18:11 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r51378 r51390 277 277 } 278 278 279 280 class UIActionSimplePreferences : public UIActionSimple 281 { 282 Q_OBJECT; 283 284 public: 285 286 UIActionSimplePreferences(UIActionPool *pParent) 287 : UIActionSimple(pParent, ":/global_settings_16px.png") 288 { 289 setMenuRole(QAction::PreferencesRole); 290 retranslateUi(); 291 } 292 293 protected: 294 295 QString shortcutExtraDataID() const 296 { 297 return QString("Preferences"); 298 } 299 300 QKeySequence defaultShortcut(UIActionPoolType) const 301 { 302 switch (actionPool()->type()) 303 { 304 case UIActionPoolType_Selector: return QKeySequence("Ctrl+G"); 305 case UIActionPoolType_Runtime: break; 306 } 307 return QKeySequence(); 308 } 309 310 void retranslateUi() 311 { 312 setName(QApplication::translate("UIActionPool", "&Preferences...", "global settings")); 313 setStatusTip(QApplication::translate("UIActionPool", "Display the global settings window")); 314 } 315 }; 279 316 280 317 class UIActionSimpleLogDialog : public UIActionSimple … … 639 676 { 640 677 /* Various dialog actions: */ 678 m_pool[UIActionIndex_Simple_Preferences] = new UIActionSimplePreferences(this); 641 679 m_pool[UIActionIndex_Simple_LogDialog] = new UIActionSimpleLogDialog(this); 642 680 /* 'Help' actions: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r51378 r51390 51 51 { 52 52 /* Various dialog actions: */ 53 UIActionIndex_Simple_Preferences, 53 54 UIActionIndex_Simple_LogDialog, 54 55 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
r51379 r51390 137 137 setName(QApplication::translate("UIActionPool", "&Export Appliance...")); 138 138 setStatusTip(QApplication::translate("UIActionPool", "Export one or more VirtualBox virtual machines as an appliance")); 139 }140 };141 142 class UIActionSimplePreferencesDialog : public UIActionSimple143 {144 Q_OBJECT;145 146 public:147 148 UIActionSimplePreferencesDialog(UIActionPool *pParent)149 : UIActionSimple(pParent, ":/global_settings_16px.png")150 {151 setMenuRole(QAction::PreferencesRole);152 retranslateUi();153 }154 155 protected:156 157 QString shortcutExtraDataID() const158 {159 return QString("Preferences");160 }161 162 QKeySequence defaultShortcut(UIActionPoolType) const163 {164 return QKeySequence("Ctrl+G");165 }166 167 void retranslateUi()168 {169 setName(QApplication::translate("UIActionPool", "&Preferences...", "global settings"));170 setStatusTip(QApplication::translate("UIActionPool", "Display the global settings window"));171 139 } 172 140 }; … … 1006 974 m_pool[UIActionIndexSelector_Simple_File_ImportApplianceWizard] = new UIActionSimpleImportApplianceWizard(this); 1007 975 m_pool[UIActionIndexSelector_Simple_File_ExportApplianceWizard] = new UIActionSimpleExportApplianceWizard(this); 1008 m_pool[UIActionIndexSelector_Simple_File_PreferencesDialog] = new UIActionSimplePreferencesDialog(this);1009 976 m_pool[UIActionIndexSelector_Simple_File_Exit] = new UIActionSimpleExit(this); 1010 977 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
r51375 r51390 31 31 UIActionIndexSelector_Simple_File_ImportApplianceWizard, 32 32 UIActionIndexSelector_Simple_File_ExportApplianceWizard, 33 UIActionIndexSelector_Simple_File_PreferencesDialog,34 33 UIActionIndexSelector_Simple_File_Exit, 35 34 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r51054 r51390 1162 1162 pMenu->addSeparator(); 1163 1163 #endif /* Q_WS_MAC */ 1164 m_pPreferencesDialogAction = gActionPool->action(UIActionIndex Selector_Simple_File_PreferencesDialog);1164 m_pPreferencesDialogAction = gActionPool->action(UIActionIndex_Simple_Preferences); 1165 1165 pMenu->addAction(m_pPreferencesDialogAction); 1166 1166 #ifndef Q_WS_MAC
Note:
See TracChangeset
for help on using the changeset viewer.