screengrabber/src/mainview.cpp
changeset 17 4f2773374eff
parent 15 e11368ed4880
child 19 4b22a598b890
equal deleted inserted replaced
15:e11368ed4880 17:4f2773374eff
    82     	//setNavigationAction(actionExit);
    82     	//setNavigationAction(actionExit);
    83     }
    83     }
    84 }
    84 }
    85 
    85 
    86 
    86 
       
    87 void MainView::quitYesNoQuestionClosed(HbAction* action)
       
    88     {
       
    89     HbMessageBox *dlg = static_cast<HbMessageBox*>(sender());
       
    90     if(action == dlg->primaryAction())
       
    91         {
       
    92         qApp->quit(); 
       
    93         }
       
    94     }
    87 
    95 
    88 void MainView::my_quit()
    96 void MainView::my_quit()
    89     {
    97     {
    90 	HbLabel label(" Exit Screen grabber confirm");
    98 	HbMessageBox::question("Do you really want to exit the Screen Grabber application?", 
    91 	if (HbMessageBox::question("Do you really want to exit the Screen Grabber application?","yes","no",&label))
    99 	    this, //receiver
    92 		qApp->quit();   
   100 	    SLOT(quitYesNoQuestionClosed(HbAction *)), //member
    93     }
   101 	    tr("Yes"), //primaryButtonText
       
   102 	    tr("No"), //secondaryButtonText
       
   103 	    new HbLabel("Exit Screen grabber confirm", this)
       
   104         );
       
   105 	}
    94 
   106 
    95 // ---------------------------------------------------------------------------
   107 // ---------------------------------------------------------------------------
    96 
   108 
    97 void MainView::createInfoText()
   109 void MainView::createInfoText()
    98 {
   110 {