Changeset 51398 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 26, 2014 2:04:39 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r51214 r51398 437 437 case RuntimeMenuMachineActionType_TakeScreenshot: strResult = "TakeScreenshot"; break; 438 438 case RuntimeMenuMachineActionType_InformationDialog: strResult = "InformationDialog"; break; 439 case RuntimeMenuMachineActionType_KeyboardSettings: strResult = "KeyboardSettings"; break; 439 440 case RuntimeMenuMachineActionType_MouseIntegration: strResult = "MouseIntegration"; break; 440 441 case RuntimeMenuMachineActionType_TypeCAD: strResult = "TypeCAD"; break; … … 470 471 keys << "TakeScreenshot"; values << RuntimeMenuMachineActionType_TakeScreenshot; 471 472 keys << "InformationDialog"; values << RuntimeMenuMachineActionType_InformationDialog; 473 keys << "KeyboardSettings"; values << RuntimeMenuMachineActionType_KeyboardSettings; 472 474 keys << "MouseIntegration"; values << RuntimeMenuMachineActionType_MouseIntegration; 473 475 keys << "TypeCAD"; values << RuntimeMenuMachineActionType_TypeCAD; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r51392 r51398 264 264 RuntimeMenuMachineActionType_TakeScreenshot = RT_BIT(2), 265 265 RuntimeMenuMachineActionType_InformationDialog = RT_BIT(3), 266 RuntimeMenuMachineActionType_MouseIntegration = RT_BIT(4), 267 RuntimeMenuMachineActionType_TypeCAD = RT_BIT(5), 266 RuntimeMenuMachineActionType_KeyboardSettings = RT_BIT(4), 267 RuntimeMenuMachineActionType_MouseIntegration = RT_BIT(5), 268 RuntimeMenuMachineActionType_TypeCAD = RT_BIT(6), 268 269 #ifdef Q_WS_X11 269 RuntimeMenuMachineActionType_TypeCABS = RT_BIT( 6),270 RuntimeMenuMachineActionType_TypeCABS = RT_BIT(7), 270 271 #endif /* Q_WS_X11 */ 271 RuntimeMenuMachineActionType_Pause = RT_BIT( 7),272 RuntimeMenuMachineActionType_Reset = RT_BIT( 8),273 RuntimeMenuMachineActionType_SaveState = RT_BIT( 9),274 RuntimeMenuMachineActionType_Shutdown = RT_BIT(1 0),275 RuntimeMenuMachineActionType_PowerOff = RT_BIT(1 1),272 RuntimeMenuMachineActionType_Pause = RT_BIT(8), 273 RuntimeMenuMachineActionType_Reset = RT_BIT(9), 274 RuntimeMenuMachineActionType_SaveState = RT_BIT(10), 275 RuntimeMenuMachineActionType_Shutdown = RT_BIT(11), 276 RuntimeMenuMachineActionType_PowerOff = RT_BIT(12), 276 277 #ifndef Q_WS_MAC 277 RuntimeMenuMachineActionType_Close = RT_BIT(1 2),278 RuntimeMenuMachineActionType_Close = RT_BIT(13), 278 279 #endif /* !Q_WS_MAC */ 279 280 RuntimeMenuMachineActionType_All = 0xFFFF -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r51379 r51398 167 167 }; 168 168 169 class UIActionMenuKeyboard : public UIActionMenu 170 { 171 Q_OBJECT; 172 173 public: 174 175 UIActionMenuKeyboard(UIActionPool *pParent) 176 : UIActionMenu(pParent) 177 { 178 retranslateUi(); 179 } 180 181 protected: 182 183 void retranslateUi() {} 184 }; 185 186 class UIActionSimpleKeyboardSettings : public UIActionSimple 187 { 188 Q_OBJECT; 189 190 public: 191 192 UIActionSimpleKeyboardSettings(UIActionPool *pParent) 193 : UIActionSimple(pParent, ":/hostkey_16px.png") 194 { 195 retranslateUi(); 196 } 197 198 protected: 199 200 QString shortcutExtraDataID() const 201 { 202 return QString("KeyboardSettings"); 203 } 204 205 void retranslateUi() 206 { 207 setName(QApplication::translate("UIActionPool", "Configure &Shortcuts")); 208 setStatusTip(QApplication::translate("UIActionPool", "Display the global settings window to configure shortcuts")); 209 } 210 }; 211 169 212 class UIActionMenuMouseIntegration : public UIActionMenu 170 213 { … … 1274 1317 m_pool[UIActionIndexRuntime_Simple_TakeScreenshot] = new UIActionSimplePerformTakeScreenshot(this); 1275 1318 m_pool[UIActionIndexRuntime_Simple_InformationDialog] = new UIActionSimpleShowInformationDialog(this); 1319 m_pool[UIActionIndexRuntime_Simple_KeyboardSettings] = new UIActionSimpleKeyboardSettings(this); 1276 1320 m_pool[UIActionIndexRuntime_Toggle_MouseIntegration] = new UIActionToggleMouseIntegration(this); 1277 1321 m_pool[UIActionIndexRuntime_Simple_TypeCAD] = new UIActionSimplePerformTypeCAD(this); … … 1335 1379 delete m_pool[UIActionIndexRuntime_Menu_Machine]; 1336 1380 m_pool[UIActionIndexRuntime_Menu_Machine] = new UIActionMenuMachineRuntime(this); 1381 if (m_pool[UIActionIndexRuntime_Menu_Keyboard]) 1382 delete m_pool[UIActionIndexRuntime_Menu_Keyboard]; 1383 m_pool[UIActionIndexRuntime_Menu_Keyboard] = new UIActionMenuKeyboard(this); 1337 1384 if (m_pool[UIActionIndexRuntime_Menu_MouseIntegration]) 1338 1385 delete m_pool[UIActionIndexRuntime_Menu_MouseIntegration]; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r51375 r51398 32 32 UIActionIndexRuntime_Simple_TakeScreenshot, 33 33 UIActionIndexRuntime_Simple_InformationDialog, 34 UIActionIndexRuntime_Menu_Keyboard, 35 UIActionIndexRuntime_Simple_KeyboardSettings, 34 36 UIActionIndexRuntime_Menu_MouseIntegration, 35 37 UIActionIndexRuntime_Toggle_MouseIntegration, -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r51395 r51398 855 855 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Simple_TakeScreenshot)); 856 856 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Simple_InformationDialog)); 857 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Menu_Keyboard)); 858 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Simple_KeyboardSettings)); 857 859 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Menu_MouseIntegration)); 858 860 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Toggle_MouseIntegration)); … … 891 893 connect(gActionPool->action(UIActionIndexRuntime_Simple_InformationDialog), SIGNAL(triggered()), 892 894 this, SLOT(sltShowInformationDialog())); 895 connect(gActionPool->action(UIActionIndexRuntime_Simple_KeyboardSettings), SIGNAL(triggered()), 896 this, SLOT(sltShowKeyboardSettings())); 893 897 connect(gActionPool->action(UIActionIndexRuntime_Toggle_MouseIntegration), SIGNAL(toggled(bool)), 894 898 this, SLOT(sltToggleMouseIntegration(bool))); … … 1198 1202 } 1199 1203 1204 void UIMachineLogic::sltShowKeyboardSettings() 1205 { 1206 /* Do not process if window(s) missed! */ 1207 if (!isMachineWindowsCreated()) 1208 return; 1209 1210 /* Open Global Preferences: Input page: */ 1211 showGlobalPreferences("#input", "m_pMachineTable"); 1212 } 1213 1200 1214 void UIMachineLogic::sltToggleMouseIntegration(bool fOff) 1201 1215 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r51395 r51398 191 191 void sltToggleGuestAutoresize(bool fEnabled); 192 192 void sltAdjustWindow(); 193 void sltShowKeyboardSettings(); 193 194 void sltToggleMouseIntegration(bool fDisabled); 194 195 void sltTypeCAD(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.cpp
r51397 r51398 251 251 bool fSeparator2 = false; 252 252 253 /* Keyboard Settings action: */ 254 if (m_pSession->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_KeyboardSettings) 255 { 256 // pMenu->addAction(gActionPool->action(UIActionIndexRuntime_Simple_KeyboardSettings)); 257 // fSeparator2 = true; 258 } 259 else 260 gActionPool->action(UIActionIndexRuntime_Simple_KeyboardSettings)->setEnabled(false); 261 253 262 /* Mouse Integration action: */ 254 263 if (m_pSession->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_MouseIntegration) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r51249 r51398 93 93 } 94 94 95 void UIMachineLogicNormal::sltPrepareKeyboardMenu() 96 { 97 QMenu *pMenu = qobject_cast<QMenu*>(sender()); 98 AssertMsg(pMenu, ("This slot should be called only on Keyboard menu show!\n")); 99 pMenu->clear(); 100 pMenu->addAction(gActionPool->action(UIActionIndexRuntime_Simple_KeyboardSettings)); 101 } 102 95 103 void UIMachineLogicNormal::sltPrepareMouseIntegrationMenu() 96 104 { … … 121 129 connect(gActionPool->action(UIActionIndexRuntime_Menu_VideoCapture)->menu(), SIGNAL(aboutToShow()), 122 130 this, SLOT(sltPrepareVideoCaptureMenu())); 131 connect(gActionPool->action(UIActionIndexRuntime_Menu_Keyboard)->menu(), SIGNAL(aboutToShow()), 132 this, SLOT(sltPrepareKeyboardMenu())); 123 133 connect(gActionPool->action(UIActionIndexRuntime_Menu_MouseIntegration)->menu(), SIGNAL(aboutToShow()), 124 134 this, SLOT(sltPrepareMouseIntegrationMenu())); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h
r50309 r51398 43 43 void sltPrepareSharedFoldersMenu(); 44 44 void sltPrepareVideoCaptureMenu(); 45 void sltPrepareKeyboardMenu(); 45 46 void sltPrepareMouseIntegrationMenu(); 46 47 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r51322 r51398 182 182 gActionPool->action(UIActionIndexRuntime_Menu_MouseIntegration)->menu()->exec(pEvent->globalPos()); 183 183 } 184 /* Show keyboard LED context menu: */ 185 else if (pIndicator == indicatorsPool()->indicator(IndicatorType_Keyboard)) 186 { 187 if (gActionPool->action(UIActionIndexRuntime_Menu_Keyboard)->isEnabled()) 188 gActionPool->action(UIActionIndexRuntime_Menu_Keyboard)->menu()->exec(pEvent->globalPos()); 189 } 184 190 } 185 191 … … 352 358 pIndicatorBoxHLayout->addWidget(pContainerWidgetHostkey); 353 359 } 360 connect(pLedKeyboard, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)), 361 this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*))); 354 362 } 355 363
Note:
See TracChangeset
for help on using the changeset viewer.