コード例 #1
0
ファイル: MazePlugin.cpp プロジェクト: sverch/mipscope
/*
 * 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;
}
コード例 #2
0
ファイル: MazePlugin.cpp プロジェクト: sverch/mipscope
/*
 * 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;
}
コード例 #3
0
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();
}