Esempio n. 1
0
/*
 * declares victory (ending the program but perhaps leaving the window open?)
 */ 
void MazePlugin::victory(){
   if(getenv("MAZE_DEBUG"))
      cerr << "MAZE_DEBUG: call victory()" << endl;
   
   showEndMessage("Victory - You Win!");

   if(getenv("MAZE_DEBUG"))
      cerr << "MAZE_DEBUG: victory() -> void" << endl;
}
Esempio n. 2
0
/*
 * declares defeat (same deal?)
 */ 
void MazePlugin::defeat(){
   if(getenv("MAZE_DEBUG"))
      cerr << "MAZE_DEBUG: call defeat()" << endl;

   showEndMessage("Defeat - You Lose!");

   if(getenv("MAZE_DEBUG"))
      cerr << "MAZE_DEBUG: defeat() -> void" << endl;
}
void PomodoroTimerApplication::onTimer()
{
    --mMinutesLeft;

    if (mMinutesLeft == 0)
    {
        QSound::play(NotificationSoundPath);
        showEndMessage(mCurrentState);

        switch (mCurrentState)
        {
        case (PomodoroState::Work):
            startRest();
            break;
        case (PomodoroState::Rest):
            startIdle();
            break;
        default:
            Q_ASSERT(false);
        }
    }

    updateSystemTrayIcon();
}