SeaView::SeaView(QWidget *parent) : QGraphicsView(parent) { setWindowTitle("Ghosts Overboard"); pScene_ = new SeaScene (); setScene(pScene_); connect(this,SIGNAL(screenTapped()),pScene_,SLOT(handleScreenTapped())); connect(this,SIGNAL(goingBackgroung()),pScene_,SLOT(forcePause())); connect(this,SIGNAL(goingForeground()),pScene_,SLOT(softContinue())); connect(pScene_,SIGNAL(minimizeRequested()),this,SLOT(showNormal())); connect(pScene_,SIGNAL(fullscreenRequested()),this,SLOT(showFullScreen())); showFullScreen(); //the boundaries of the scene are set to match the size of the view window, which is not //available in the constructor --> timer needed QTimer::singleShot(100,this,SLOT(initializeBoundaries())); }
void PreviewClient::requestMinimize() { emit minimizeRequested(); }