void SchematicScenePanel::showEvent(QShowEvent *e) { if (m_schematicViewer->isStageSchematicViewed()) setWindowTitle("Stage Schematic"); else setWindowTitle("Fx Schematic"); TApp *app = TApp::instance(); connect(m_schematicViewer, SIGNAL(showPreview(TFxP)), this, SLOT(onShowPreview(TFxP))); connect(m_schematicViewer, SIGNAL(doCollapse(const QList<TFxP> &)), this, SLOT(onCollapse(const QList<TFxP> &))); connect(m_schematicViewer, SIGNAL(doCollapse(QList<TStageObjectId>)), this, SLOT(onCollapse(QList<TStageObjectId>))); connect(m_schematicViewer, SIGNAL(doExplodeChild(const QList<TFxP> &)), this, SLOT(onExplodeChild(const QList<TFxP> &))); connect(m_schematicViewer, SIGNAL(doExplodeChild(QList<TStageObjectId>)), this, SLOT(onExplodeChild(QList<TStageObjectId>))); connect(m_schematicViewer, SIGNAL(editObject()), this, SLOT(onEditObject())); connect(app->getCurrentLevel(), SIGNAL(xshLevelChanged()), m_schematicViewer, SLOT(updateScenes())); connect(app->getCurrentObject(), SIGNAL(objectSwitched()), m_schematicViewer, SLOT(updateScenes())); connect(app->getCurrentXsheet(), SIGNAL(xsheetSwitched()), m_schematicViewer, SLOT(updateSchematic())); connect(app->getCurrentXsheet(), SIGNAL(xsheetChanged()), m_schematicViewer, SLOT(updateSchematic())); connect(app->getCurrentScene(), SIGNAL(sceneSwitched()), m_schematicViewer, SLOT(onSceneSwitched())); m_schematicViewer->updateSchematic(); }
void SchematicScenePanel::hideEvent(QHideEvent *e) { TApp *app = TApp::instance(); disconnect(m_schematicViewer, SIGNAL(showPreview(TFxP)), this, SLOT(onShowPreview(TFxP))); disconnect(m_schematicViewer, SIGNAL(doCollapse(const QList<TFxP> &)), this, SLOT(onCollapse(const QList<TFxP> &))); disconnect(m_schematicViewer, SIGNAL(doCollapse(QList<TStageObjectId>)), this, SLOT(onCollapse(QList<TStageObjectId>))); disconnect(m_schematicViewer, SIGNAL(doExplodeChild(const QList<TFxP> &)), this, SLOT(onExplodeChild(const QList<TFxP> &))); disconnect(m_schematicViewer, SIGNAL(doExplodeChild(QList<TStageObjectId>)), this, SLOT(onExplodeChild(QList<TStageObjectId>))); disconnect(m_schematicViewer, SIGNAL(editObject()), this, SLOT(onEditObject())); disconnect(app->getCurrentLevel(), SIGNAL(xshLevelChanged()), m_schematicViewer, SLOT(updateScenes())); disconnect(app->getCurrentObject(), SIGNAL(objectSwitched()), m_schematicViewer, SLOT(updateScenes())); disconnect(app->getCurrentXsheet(), SIGNAL(xsheetSwitched()), m_schematicViewer, SLOT(updateSchematic())); disconnect(app->getCurrentXsheet(), SIGNAL(xsheetChanged()), m_schematicViewer, SLOT(updateSchematic())); disconnect(app->getCurrentScene(), SIGNAL(sceneSwitched()), m_schematicViewer, SLOT(onSceneSwitched())); }
//-------------------------------------------------------------- void testApp::update(){ //profCam.update(); updateScenes(); //renderTransito(); //depthcam.update(); if(!calibration.isFinalized()) { calibration.update(); } if(calibration.isFinalized() && !rendererInited) { renderer.init(&profCam.kinect); renderer.setDrawArea(1024,0,1024,768); renderer.setProjectionMatrix(dataset.getMatrix()); rendererInited = true; } if(calibration.isFinalized() && rendererInited) { renderer.update(); } }
void DlgPass::updateLists(Pass *p) { updateCameraList(p); updateViewportList(p); updateRenderTargetList(p); updateLights(p); updateScenes(p); updateMaterialList(); }
int main(int argc, char *argv[]) { QApplication a(argc, argv); QGraphicsScene s; QTimer timer; QWidget window; QGridLayout layout(&window); std::array<View, 64> views; int i = 0; for (auto & view : views) { view.setScene(new QGraphicsScene(&view)); layout.addWidget(&view, i/8, i%8); ++ i; } QObject::connect(&timer, &QTimer::timeout, [&views] { updateScenes(views); }); timer.start(50); window.show(); return a.exec(); }