void LogoScene::setupLogo() { Qneed* background = new Qneed(this, get_window()); background->loadImage(":images/logo/logo_background.png"); set_background(background); logo = new Qneed(this, get_window()); logo->loadImage(":images/logo/logo.png"); logo->setPos(307, 240); OnemoreButton* one = new OnemoreButton(this,get_window()); one->setPos(400, 553); one->hide(); QGraphicsOpacityEffect* opacityEffect = new QGraphicsOpacityEffect(); opacityEffect->setOpacity(0.0); logo->setGraphicsEffect(opacityEffect); QPropertyAnimation * animation = new QPropertyAnimation(); animation->setTargetObject(opacityEffect); animation->setPropertyName("opacity"); animation->setDuration(2000); animation->setStartValue(0.0); animation->setEndValue(1.0); animation->setEasingCurve(QEasingCurve::OutQuad); connect(animation, SIGNAL(finished()), this, SLOT(goinit())); animation->start(); }
int main(int argc, char *argv[]) { int incpus,ncpus,cpuid,modidx,width,y,x,nextx,tsizelen; uint64_t msize,modulus,nin; char c,*tsizearg,inbase[64]; uint64_t skipunder, nnewillcnt, newstates[3]; int i,nnew,noutfiles; statebuf *mb; statecnt sn; jtset *jts; goin *gin; goout *go; assert(sizeof(uint64_t)==8); if (argc!=9 && argc!=10) { printf("usage: %s width modulo_index y x incpus ncpus cpuid maxtreesize[kKmMgG] [lastfile]\n",argv[0]); exit(1); } setwidth(width = atoi(argv[1])); modidx = atoi(argv[2]); if (modidx < 0 || modidx >= NMODULI) { printf ("modulo_index %d not in range [0,%d)\n", modidx, NMODULI); exit(1); } modulus = -(uint64_t)modulusdeltas[modidx]; y = atoi(argv[3]); x = atoi(argv[4]); nextx = (x+1) % width; incpus = atoi(argv[5]); ncpus = atoi(argv[6]); if (ncpus < 1 || ncpus > MAXCPUS) { printf ("#cpus %d not in range [0,%d]\n", ncpus, MAXCPUS); exit(1); } cpuid = atoi(argv[7]); if (cpuid < 0 || cpuid >= ncpus) { printf("cpuid %d not in range [0,%d]\n", ncpus, ncpus-1); exit(1); } tsizelen = strlen(tsizearg = argv[8]); if (!isdigit(c = tsizearg[tsizelen-1])) tsizearg[tsizelen-1] = '\0'; msize = atol(tsizearg); if (c == 'k' || c == 'K') msize *= 1000LL; if (c == 'm' || c == 'M') msize *= 1000000LL; if (c == 'g' || c == 'G') msize *= 1000000000LL; if (msize < 1000000LL) { printf("memsize %jd too small for comfort.\n", (intmax_t)msize); exit(1); } if (argc > 9) { assert(sscanf(argv[9],"%d.%lo", &noutfiles, &skipunder) == 2); noutfiles++; printf("skipping %d output files and states up to %jo\n", noutfiles, (uintmax_t)skipunder); skipunder++; } else { noutfiles = 0; skipunder = 0L; } sprintf(inbase,"%d.%d/yx.%02d.%02d",width,modidx,y,x); gin = openstreams(inbase, incpus, ncpus, cpuid, modulus, skipunder); go = goinit(width, modidx, modulus, y+!nextx, nextx, ncpus, cpuid); nnewillcnt = nin = 0LL; jts = jtalloc(msize, modulus, LOCBITS); if (nstreams(gin)) { for (; (mb = minstream(gin))->state != FINALSTATE; nin++,deletemin(gin)) { sn.cnt = mb->cnt; // printf("expanding %jo\n", (uintmax_t)mb->state); nnew = expandstate(mb->state, x, newstates); for (i=0; i<nnew; i++) { sn.state = newstates[i]; //printf("inserting %jo\n", (uintmax_t)sn.state); jtinsert(jts, &sn); } if (nnew < 3) // nnew == 2 modadd(modulus, &nnewillcnt, mb->cnt); if (jtfull(jts)) dumpstates(go, jts, noutfiles++, mb->state); } } dumpstates(go, jts, noutfiles++, FINALSTATE); jtfree(jts); printf("(%d,%d) size %ju xsize %ju mod ",y,x,(uintmax_t)nin,(uintmax_t)totalread(gin)); if (modulus) printf("%ju",(uintmax_t)modulus); else printf("18446744073709551616"); printf("\nnewillegal %ju ", (uintmax_t)nnewillcnt); printf( "needy %ju ", (uintmax_t)needywritten(go)); printf( "legal %ju ", (uintmax_t)legalwritten(go)); printf("at (%d,%d)\n",y+(nextx==0),nextx); assert(cpuid != 0 || skipunder != 0L || nin > 0); // crash if cpu0 processes no states return 0; }