/* * 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; }
/* * 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(); }