summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f553d35)
Ancora da testare sul N900
}
void TestThread::run(){
}
void TestThread::run(){
qsrand(QDateTime::currentDateTime().toTime_t());
sequenza.append(qrand()%9);
int i=0;
index=0;
qsrand(QDateTime::currentDateTime().toTime_t());
sequenza.append(qrand()%9);
int i=0;
index=0;
emit disableInterface();
while(i<sequenza.size())
{
emit disableInterface();
while(i<sequenza.size())
{
msleep(500 - (_score*2));
i++;
}
msleep(500 - (_score*2));
i++;
}
i=0;
emit enableInterface();
attendiInputUtente.wait(&mutex);
i=0;
emit enableInterface();
attendiInputUtente.wait(&mutex);
}
void TestThread::addUserInput(int inputUser){
}
void TestThread::addUserInput(int inputUser){
if(index==sequenza.size()){
sleep(1);
attendiInputUtente.wakeAll();
if(index==sequenza.size()){
sleep(1);
attendiInputUtente.wakeAll();
}
}
else{
emit exit(_score);
}
}
else{
emit exit(_score);
- _score=0;
- sequenza.clear();
- index=0;
- attendiInputUtente.wakeAll();
}
}
void TestThread::genera()
{
}
}
void TestThread::genera()
{
+ sequenza.clear();
+ index=0;
+ _score=0;
+ emit score(_score);
attendiInputUtente.wakeAll();
attendiInputUtente.wakeAll();