void ccCameraParamEditDlg::linkWith(QMdiSubWindow* qWin) { //corresponding ccGLWindow ccGLWindow* associatedWin = (qWin ? GLWindowFromWidget(qWin->widget()) : 0); linkWith(associatedWin); }
void ccPickingHub::onActiveWindowChanged(QMdiSubWindow* mdiSubWindow) { if (m_activeGLWindow) { //take care of the previously linked window togglePickingMode(false); disconnect(m_activeGLWindow); m_activeGLWindow = 0; } ccGLWindow* glWindow = (mdiSubWindow ? GLWindowFromWidget(mdiSubWindow->widget()) : 0); if (glWindow) { //link this new window connect(glWindow, SIGNAL(itemPicked(ccHObject*, unsigned, int, int, const CCVector3&)), this, SLOT(processPickedItem(ccHObject*, unsigned, int, int, const CCVector3&))); connect(glWindow, SIGNAL(destroyed(QObject*)), this, SLOT(onActiveWindowDeleted(QObject*))); m_activeGLWindow = glWindow; if (m_autoEnableOnActivatedWindow && !m_listeners.empty()) { togglePickingMode(true); } } }