void UIMachineLogicFullscreen::cleanupMachineWindows() { /* Do not cleanup machine window(s) if not present: */ if (!isMachineWindowsCreated()) return; /* Cleanup machine window(s): */ foreach (UIMachineWindow *pMachineWindow, machineWindows()) UIMachineWindow::destroy(pMachineWindow); #ifdef Q_WS_MAC setPresentationModeEnabled(false); #endif/* Q_WS_MAC */ }
void UIMachineLogicFullscreen::cleanupMachineWindows() { /* Do not destroy machine-window(s) if they destroyed already: */ if (!isMachineWindowsCreated()) return; /* Mark machine-window(s) destroyed: */ setMachineWindowsCreated(false); /* Cleanup machine-window(s): */ foreach (UIMachineWindow *pMachineWindow, machineWindows()) UIMachineWindow::destroy(pMachineWindow); #ifdef Q_WS_MAC setPresentationModeEnabled(false); #endif/* Q_WS_MAC */ }
void UIMachineLogicFullscreen::prepareMachineWindows() { /* Do not create window(s) if they created already: */ if (isMachineWindowsCreated()) return; #ifdef Q_WS_MAC // TODO: Is that "darwinSetFrontMostProcess" really need here? /* We have to make sure that we are getting the front most process. * This is necessary for Qt versions > 4.3.3: */ ::darwinSetFrontMostProcess(); #endif /* Q_WS_MAC */ /* Update the multi screen layout: */ m_pScreenLayout->update(); /* Create machine window(s): */ for (int cScreenId = 0; cScreenId < m_pScreenLayout->guestScreenCount(); ++cScreenId) addMachineWindow(UIMachineWindow::create(this, cScreenId)); /* Connect screen-layout change handler: */ for (int i = 0; i < machineWindows().size(); ++i) connect(m_pScreenLayout, SIGNAL(screenLayoutChanged()), static_cast<UIMachineWindowFullscreen*>(machineWindows()[i]), SLOT(sltPlaceOnScreen())); #ifdef Q_WS_MAC /* If the user change the screen, we have to decide again if the * presentation mode should be changed. */ connect(m_pScreenLayout, SIGNAL(screenLayoutChanged()), this, SLOT(sltScreenLayoutChanged())); /* Note: Presentation mode has to be set *after* the windows are created. */ setPresentationModeEnabled(true); #endif /* Q_WS_MAC */ /* Remember what machine window(s) created: */ setMachineWindowsCreated(true); }
void UIMachineLogicFullscreen::sltScreenLayoutChanged() { setPresentationModeEnabled(true); }
void UIMachineLogicFullscreen::sltChangePresentationMode(bool /* fEnabled */) { setPresentationModeEnabled(true); }