Changeset 80617 in vbox
- Timestamp:
- Sep 6, 2019 8:32:17 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r79365 r80617 1383 1383 { 1384 1384 /* Attach EMT connections: */ 1385 connect(this, SIGNAL(sigNotifyChange(int, int)),1386 m_pMachineView, SLOT(sltHandleNotifyChange(int, int)),1385 connect(this, &UIFrameBufferPrivate::sigNotifyChange, 1386 m_pMachineView, &UIMachineView::sltHandleNotifyChange, 1387 1387 Qt::QueuedConnection); 1388 connect(this, SIGNAL(sigNotifyUpdate(int, int, int, int)),1389 m_pMachineView, SLOT(sltHandleNotifyUpdate(int, int, int, int)),1388 connect(this, &UIFrameBufferPrivate::sigNotifyUpdate, 1389 m_pMachineView, &UIMachineView::sltHandleNotifyUpdate, 1390 1390 Qt::QueuedConnection); 1391 connect(this, SIGNAL(sigSetVisibleRegion(QRegion)),1392 m_pMachineView, SLOT(sltHandleSetVisibleRegion(QRegion)),1391 connect(this, &UIFrameBufferPrivate::sigSetVisibleRegion, 1392 m_pMachineView, &UIMachineView::sltHandleSetVisibleRegion, 1393 1393 Qt::QueuedConnection); 1394 connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),1395 m_pMachineView, SLOT(sltHandle3DOverlayVisibilityChange(bool)),1394 connect(this, &UIFrameBufferPrivate::sigNotifyAbout3DOverlayVisibilityChange, 1395 m_pMachineView, &UIMachineView::sltHandle3DOverlayVisibilityChange, 1396 1396 Qt::QueuedConnection); 1397 1397 … … 1406 1406 { 1407 1407 /* Detach EMT connections: */ 1408 disconnect(this, SIGNAL(sigNotifyChange(int, int)),1409 m_pMachineView, SLOT(sltHandleNotifyChange(int, int)));1410 disconnect(this, SIGNAL(sigNotifyUpdate(int, int, int, int)),1411 m_pMachineView, SLOT(sltHandleNotifyUpdate(int, int, int, int)));1412 disconnect(this, SIGNAL(sigSetVisibleRegion(QRegion)),1413 m_pMachineView, SLOT(sltHandleSetVisibleRegion(QRegion)));1414 disconnect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),1415 m_pMachineView, SLOT(sltHandle3DOverlayVisibilityChange(bool)));1408 disconnect(this, &UIFrameBufferPrivate::sigNotifyChange, 1409 m_pMachineView, &UIMachineView::sltHandleNotifyChange); 1410 disconnect(this, &UIFrameBufferPrivate::sigNotifyUpdate, 1411 m_pMachineView, &UIMachineView::sltHandleNotifyUpdate); 1412 disconnect(this, &UIFrameBufferPrivate::sigSetVisibleRegion, 1413 m_pMachineView, &UIMachineView::sltHandleSetVisibleRegion); 1414 disconnect(this, &UIFrameBufferPrivate::sigNotifyAbout3DOverlayVisibilityChange, 1415 m_pMachineView, &UIMachineView::sltHandle3DOverlayVisibilityChange); 1416 1416 1417 1417 /* Detach GUI connections: */ … … 1905 1905 1906 1906 #include "UIFrameBuffer.moc" 1907 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r79365 r80617 465 465 { 466 466 /* We should watch for console events: */ 467 connect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));467 connect(uisession(), &UISession::sigMachineStateChange, this, &UIMachineWindow::sltMachineStateChanged); 468 468 } 469 469 … … 511 511 512 512 /* Listen for frame-buffer resize: */ 513 connect(m_pMachineView, SIGNAL(sigFrameBufferResize()), this, SIGNAL(sigFrameBufferResize()));513 connect(m_pMachineView, &UIMachineView::sigFrameBufferResize, this, &UIMachineWindow::sigFrameBufferResize); 514 514 515 515 /* Add machine-view into main-layout: */ … … 548 548 { 549 549 /* We should stop watching for console events: */ 550 disconnect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));550 disconnect(uisession(), &UISession::sigMachineStateChange, this, &UIMachineWindow::sltMachineStateChanged); 551 551 } 552 552 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r79365 r80617 109 109 m_views[uIndex]->installEventFilter(this); 110 110 /* Make machine-view notify mouse-handler about frame-buffer resize: */ 111 connect(m_views[uIndex], SIGNAL(sigFrameBufferResize()), this, SLOT(sltMousePointerShapeChanged()));111 connect(m_views[uIndex], &UIMachineView::sigFrameBufferResize, this, &UIMouseHandler::sltMousePointerShapeChanged); 112 112 } 113 113 … … 518 518 { 519 519 /* Machine state-change updater: */ 520 connect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));520 connect(uisession(), &UISession::sigMachineStateChange, this, &UIMouseHandler::sltMachineStateChanged); 521 521 522 522 /* Mouse capability state-change updater: */ 523 connect(uisession(), SIGNAL(sigMouseCapabilityChange()), this, SLOT(sltMouseCapabilityChanged()));523 connect(uisession(), &UISession::sigMouseCapabilityChange, this, &UIMouseHandler::sltMouseCapabilityChanged); 524 524 525 525 /* Mouse pointer shape state-change updaters: */ 526 connect(uisession(), SIGNAL(sigMousePointerShapeChange()), this, SLOT(sltMousePointerShapeChanged()));527 connect(this, SIGNAL(sigStateChange(int)), this, SLOT(sltMousePointerShapeChanged()));526 connect(uisession(), &UISession::sigMousePointerShapeChange, this, &UIMouseHandler::sltMousePointerShapeChanged); 527 connect(this, &UIMouseHandler::sigStateChange, this, &UIMouseHandler::sltMousePointerShapeChanged); 528 528 529 529 /* Mouse cursor position state-change updater: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r79365 r80617 128 128 { 129 129 /* Configure menu-bar editor: */ 130 connect(pMenuBarEditor, SIGNAL(destroyed(QObject*)),131 this, SLOT(sltMenuBarSettingsClosed()));130 connect(pMenuBarEditor, &UIMenuBarEditorWindow::destroyed, 131 this, &UIMachineLogicNormal::sltMenuBarSettingsClosed); 132 132 #ifdef VBOX_WS_MAC 133 connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),134 pMenuBarEditor, SLOT(sltActivateWindow()));133 connect(this, &UIMachineLogicNormal::sigNotifyAbout3DOverlayVisibilityChange, 134 pMenuBarEditor, &UIMenuBarEditorWindow::sltActivateWindow); 135 135 #endif /* VBOX_WS_MAC */ 136 136 /* Show window: */ … … 183 183 { 184 184 /* Configure status-bar editor: */ 185 connect(pStatusBarEditor, SIGNAL(destroyed(QObject*)),186 this, SLOT(sltStatusBarSettingsClosed()));185 connect(pStatusBarEditor, &UIStatusBarEditorWindow::destroyed, 186 this, &UIMachineLogicNormal::sltStatusBarSettingsClosed); 187 187 #ifdef VBOX_WS_MAC 188 connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),189 pStatusBarEditor, SLOT(sltActivateWindow()));188 connect(this, &UIMachineLogicNormal::sigNotifyAbout3DOverlayVisibilityChange, 189 pStatusBarEditor, &UIStatusBarEditorWindow::sltActivateWindow); 190 190 #endif /* VBOX_WS_MAC */ 191 191 /* Show window: */ … … 280 280 281 281 /* Prepare 'View' actions connections: */ 282 connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),283 this, SLOT(sltChangeVisualStateToFullscreen()));284 connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),285 this, SLOT(sltChangeVisualStateToSeamless()));286 connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),287 this, SLOT(sltChangeVisualStateToScale()));288 connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)),289 this, SLOT(sltOpenMenuBarSettings()));290 #ifndef VBOX_WS_MAC 291 connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)),292 this, SLOT(sltToggleMenuBar()));293 #endif /* !VBOX_WS_MAC */ 294 connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),295 this, SLOT(sltOpenStatusBarSettings()));296 connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),297 this, SLOT(sltToggleStatusBar()));298 connect( actionPool(), SIGNAL(sigNotifyAboutTriggeringViewScreenToggle(int, bool)),299 this, SLOT(sltHandleActionTriggerViewScreenToggle(int, bool)));300 connect( actionPool(), SIGNAL(sigNotifyAboutTriggeringViewScreenResize(int, const QSize&)),301 this, SLOT(sltHandleActionTriggerViewScreenResize(int, const QSize&)));282 connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), &UIAction::triggered, 283 this, &UIMachineLogicNormal::sltChangeVisualStateToFullscreen); 284 connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), &UIAction::triggered, 285 this, &UIMachineLogicNormal::sltChangeVisualStateToSeamless); 286 connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), &UIAction::triggered, 287 this, &UIMachineLogicNormal::sltChangeVisualStateToScale); 288 connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), &UIAction::triggered, 289 this, &UIMachineLogicNormal::sltOpenMenuBarSettings); 290 #ifndef VBOX_WS_MAC 291 connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), &UIAction::triggered, 292 this, &UIMachineLogicNormal::sltToggleMenuBar); 293 #endif /* !VBOX_WS_MAC */ 294 connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), &UIAction::triggered, 295 this, &UIMachineLogicNormal::sltOpenStatusBarSettings); 296 connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), &UIAction::triggered, 297 this, &UIMachineLogicNormal::sltToggleStatusBar); 298 connect(qobject_cast<UIActionPoolRuntime*>(actionPool()), &UIActionPoolRuntime::sigNotifyAboutTriggeringViewScreenToggle, 299 this, &UIMachineLogicNormal::sltHandleActionTriggerViewScreenToggle); 300 connect(qobject_cast<UIActionPoolRuntime*>(actionPool()), &UIActionPoolRuntime::sigNotifyAboutTriggeringViewScreenResize, 301 this, &UIMachineLogicNormal::sltHandleActionTriggerViewScreenResize); 302 302 } 303 303 … … 325 325 /* Listen for frame-buffer resize: */ 326 326 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 327 connect(pMachineWindow, SIGNAL(sigFrameBufferResize()),328 this, SIGNAL(sigFrameBufferResize()));327 connect(pMachineWindow, &UIMachineWindow::sigFrameBufferResize, 328 this, &UIMachineLogicNormal::sigFrameBufferResize); 329 329 emit sigFrameBufferResize(); 330 330 … … 373 373 { 374 374 /* "View" actions disconnections: */ 375 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),376 this, SLOT(sltChangeVisualStateToFullscreen()));377 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),378 this, SLOT(sltChangeVisualStateToSeamless()));379 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),380 this, SLOT(sltChangeVisualStateToScale()));381 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)),382 this, SLOT(sltOpenMenuBarSettings()));383 #ifndef VBOX_WS_MAC 384 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)),385 this, SLOT(sltToggleMenuBar()));386 #endif /* !VBOX_WS_MAC */ 387 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),388 this, SLOT(sltOpenStatusBarSettings()));389 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),390 this, SLOT(sltToggleStatusBar()));375 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), &UIAction::triggered, 376 this, &UIMachineLogicNormal::sltChangeVisualStateToFullscreen); 377 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), &UIAction::triggered, 378 this, &UIMachineLogicNormal::sltChangeVisualStateToSeamless); 379 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), &UIAction::triggered, 380 this, &UIMachineLogicNormal::sltChangeVisualStateToScale); 381 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), &UIAction::triggered, 382 this, &UIMachineLogicNormal::sltOpenMenuBarSettings); 383 #ifndef VBOX_WS_MAC 384 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), &UIAction::triggered, 385 this, &UIMachineLogicNormal::sltToggleMenuBar); 386 #endif /* !VBOX_WS_MAC */ 387 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), &UIAction::triggered, 388 this, &UIMachineLogicNormal::sltOpenStatusBarSettings); 389 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), &UIAction::triggered, 390 this, &UIMachineLogicNormal::sltToggleStatusBar); 391 391 392 392 /* Call to base-class: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r79403 r80617 132 132 133 133 /* Guest additions state-change updater: */ 134 connect(uisession(), SIGNAL(sigAdditionsStateActualChange()), this, SLOT(sltAdditionsStateChanged()));134 connect(uisession(), &UISession::sigAdditionsStateActualChange, this, &UIMachineViewNormal::sltAdditionsStateChanged); 135 135 } 136 136 … … 258 258 return maximumSize - (windowSize - centralWidgetSize.boundedTo(windowSize)); 259 259 } 260
Note:
See TracChangeset
for help on using the changeset viewer.