void MainWindow::on_action_Delete_Try_triggered() { if (exercise_ != NULL) { exercise_->delTry(); setupBackend(); } }
void MainWindow::on_action_Reset_Try_triggered() { if (exercise_ != NULL) { exercise_->resetTry(); setupBackend(); } }
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); }
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; }
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(); }