void UIMachineLogicSeamless::notifyAbout3DOverlayVisibilityChange(bool) { /* If active machine-window is defined now: */ if (activeMachineWindow()) { /* Reinstall corresponding popup-stack and make sure it has proper type: */ popupCenter().hidePopupStack(activeMachineWindow()); popupCenter().setPopupStackType(activeMachineWindow(), UIPopupStackType_Separate); popupCenter().showPopupStack(activeMachineWindow()); } }
void UIMachineLogicNormal::sltOpenStatusBarSettings() { /* Do not process if window(s) missed! */ AssertReturnVoid(isMachineWindowsCreated()); /* Make sure status-bar is enabled: */ const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked(); AssertReturnVoid(fEnabled); /* Prevent user from opening another one editor or toggle status-bar: */ actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false); actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(false); /* Create status-bar editor: */ UIStatusBarEditorWindow *pStatusBarEditor = new UIStatusBarEditorWindow(activeMachineWindow()); AssertPtrReturnVoid(pStatusBarEditor); { /* Configure status-bar editor: */ connect(pStatusBarEditor, SIGNAL(destroyed(QObject*)), this, SLOT(sltStatusBarSettingsClosed())); #ifdef Q_WS_MAC connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)), pStatusBarEditor, SLOT(sltActivateWindow())); #endif /* Q_WS_MAC */ /* Show window: */ pStatusBarEditor->show(); } }
void UIMachineLogicScale::sltInvokePopupMenu() { /* Popup main-menu if present: */ if (m_pPopupMenu && !m_pPopupMenu->isEmpty()) { m_pPopupMenu->popup(activeMachineWindow()->geometry().center()); QTimer::singleShot(0, m_pPopupMenu, SLOT(sltHighlightFirstAction())); } }