Beispiel #1
0
void MainWindow::on_action_Delete_Try_triggered()
{
	if (exercise_ != NULL)
	{
		exercise_->delTry();
		setupBackend();
	}
}
Beispiel #2
0
void MainWindow::on_action_Reset_Try_triggered()
{
	if (exercise_ != NULL)
	{
		exercise_->resetTry();
		setupBackend();
	}
}
Beispiel #3
0
void MainWindow::on_action_Next_Try_triggered()
{
	if (exercise_ != NULL)
	{
		exercise_->moveTry(1);
		setupBackend();
	}
}
        HelloSkia(void* hWnd, int argc, char** argv)
            : INHERITED(hWnd, argc, argv)
        {
            fBGColor = SK_ColorWHITE;
            fRotationAngle = SkIntToScalar(0);

            setupBackend(kGPU_DeviceType);
            // Another option is software rendering:
            // setupBackend(kRaster_DeviceType);
        }
Beispiel #5
0
bool MainWindow::setupExercise()
{
	connect(exercise_, SIGNAL(updateMain(MainWindowStates)),
	        this, SLOT(updateMain(MainWindowStates)));
	attemptRunningBool = false;
	exercise_->setup(centralwidget);
	exercise_->setUserInfo(user_);
	setupBackend();
	setTempo(game_->getTempo());
	return true;
}
Beispiel #6
0
SkCanvas* SkExampleWindow::createCanvas() {
    if (fType == kGPU_DeviceType) {
        if (NULL != fContext && NULL != fRenderTarget) {
            SkAutoTUnref<SkBaseDevice> device(new SkGpuDevice(fContext, fRenderTarget));
            return new SkCanvas(device);
        }
        tearDownBackend();
        setupBackend(kRaster_DeviceType);
    }
    return INHERITED::createCanvas();
}