camerauis/cameraxui/cxui/src/cxuistandby.cpp
changeset 21 fa6d9f75d6a6
parent 19 d9aefe59d544
child 36 b12f3922a74f
equal deleted inserted replaced
19:d9aefe59d544 21:fa6d9f75d6a6
   101 * handles mouse press events
   101 * handles mouse press events
   102 * returns if mouse key press is consumed.
   102 * returns if mouse key press is consumed.
   103 */
   103 */
   104 bool CxuiStandby::handleMouseEvent()
   104 bool CxuiStandby::handleMouseEvent()
   105 {
   105 {
   106     CX_DEBUG_ENTER_FUNCTION();
       
   107 
       
   108     bool keyHandled = false;
   106     bool keyHandled = false;
   109 
   107 
   110     // close the dialog if it's visible
   108     // close the dialog if it's visible
   111     if(mStandbyDialogVisible && mStandbyPopup) {
   109     if (mStandbyDialogVisible && mStandbyPopup) {
   112         CX_DEBUG(( "closing the popup mStandbyDialogVisible = : %d", mStandbyDialogVisible ));
   110         CX_DEBUG(( "closing the popup mStandbyDialogVisible = : %d", mStandbyDialogVisible ));
   113         mStandbyPopup->close();
   111         mStandbyPopup->close();
   114         keyHandled = true;
   112         keyHandled = true;
   115     } else if (mStandbyTimer && mStandbyTimer->isActive()) {
   113     } else if (mStandbyTimer && mStandbyTimer->isActive()) {
   116         // restart the timer only if it's running
   114         // restart the timer only if it's running
   117         startTimer();
   115         startTimer();
   118     }
   116     }
   119 
       
   120     CX_DEBUG_EXIT_FUNCTION();
       
   121 
   117 
   122     return keyHandled;
   118     return keyHandled;
   123 }
   119 }
   124 
   120 
   125 
   121 
   231     bool eventWasConsumed = false;
   227     bool eventWasConsumed = false;
   232     switch (event->type()) {
   228     switch (event->type()) {
   233         case QEvent::GraphicsSceneMouseMove:
   229         case QEvent::GraphicsSceneMouseMove:
   234         case QEvent::GraphicsSceneMousePress:
   230         case QEvent::GraphicsSceneMousePress:
   235         case QEvent::GraphicsSceneMouseRelease:
   231         case QEvent::GraphicsSceneMouseRelease:
   236             CX_DEBUG(("CxuiStandby::eventFilter -> mouse event"));
       
   237             eventWasConsumed = handleMouseEvent();
   232             eventWasConsumed = handleMouseEvent();
   238             break;
   233             break;
   239         default:
   234         default:
   240             break;
   235             break;
   241     }
   236     }