void FilmstripFrames::hideEvent(QHideEvent *) { TApp *app = TApp::instance(); // cambiamenti al livello disconnect(app->getCurrentLevel()); // al frame corrente disconnect(app->getCurrentFrame(), SIGNAL(frameSwitched()), this, SLOT(onFrameSwitched())); disconnect(app->getCurrentFrame(), SIGNAL(frameTypeChanged()), this, SLOT(update())); // iconcine disconnect(IconGenerator::instance(), SIGNAL(iconGenerated()), this, SLOT(update())); // onion skin disconnect(app->getCurrentOnionSkin(), SIGNAL(onionSkinMaskChanged()), this, SLOT(update())); ComboViewerPanel *inknPaintViewerPanel = app->getInknPaintViewerPanel(); if (inknPaintViewerPanel) { SceneViewer *viewer = inknPaintViewerPanel->getSceneViewer(); if (viewer) { disconnect(viewer, SIGNAL(onZoomChanged()), this, SLOT(update())); disconnect(viewer, SIGNAL(refreshNavi()), this, SLOT(update())); } } }
void FilmstripFrames::showEvent(QShowEvent *) { TApp *app = TApp::instance(); // cambiamenti al livello TXshLevelHandle *levelHandle = app->getCurrentLevel(); connect(levelHandle, SIGNAL(xshLevelSwitched(TXshLevel *)), this, SLOT(onLevelSwitched(TXshLevel *))); connect(levelHandle, SIGNAL(xshLevelChanged()), this, SLOT(onLevelChanged())); connect(levelHandle, SIGNAL(xshLevelViewChanged()), this, SLOT(onLevelChanged())); // al frame corrente connect(app->getCurrentFrame(), SIGNAL(frameSwitched()), this, SLOT(onFrameSwitched())); connect(app->getCurrentFrame(), SIGNAL(frameTypeChanged()), this, SLOT(update())); // iconcine connect(IconGenerator::instance(), SIGNAL(iconGenerated()), this, SLOT(update())); // onion skin connect(app->getCurrentOnionSkin(), SIGNAL(onionSkinMaskChanged()), this, SLOT(update())); // enable navigator link with the Viewer in the InknPaint page ComboViewerPanel *inknPaintViewerPanel = app->getInknPaintViewerPanel(); if (inknPaintViewerPanel) { SceneViewer *viewer = inknPaintViewerPanel->getSceneViewer(); if (viewer) { connect(viewer, SIGNAL(onZoomChanged()), this, SLOT(update())); connect(viewer, SIGNAL(refreshNavi()), this, SLOT(update())); } } }