-
Notifications
You must be signed in to change notification settings - Fork 7
/
efectorfinal.cpp
45 lines (38 loc) · 948 Bytes
/
efectorfinal.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "efectorfinal.h"
EfectorFinal::EfectorFinal(Qt3DCore::QEntity *rootEntity, QUrl url) : Elemento(rootEntity, url){
}
EfectorFinal::~EfectorFinal(){
}
void EfectorFinal::work(){
for (int i=0; i<this->duration; i++){
std::cout << this->tarea << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(1));
}
}
void EfectorFinal::setTarea(enum tarea tarea){
this->tarea = tarea;
}
void EfectorFinal::setDuration(int value){
this->duration = value;
}
QString EfectorFinal::getTarea(){
QString tarea;
switch (this->tarea) {
case PINTAR:
tarea = "PINTAR";
break;
case SOSTENER:
tarea = "SOSTENER";
break;
case SOLTAR:
tarea = "SOLTAR";
break;
case ROTAR:
tarea = "ROTAR";
break;
}
return tarea;
}
int EfectorFinal::getDuracion(){
return this->duration;
}