Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog), gra(new C_Game()), scenaGlowna(new QGraphicsScene(0,0,szerokoscMapy, wysokoscMapy)), time(800) { ui->setupUi(this); malarz.rysuj(gra->komorka, scenaGlowna); malarz.rysuj(gra->wskaznikZaby, scenaGlowna); ui->graphicsView->setScene(this->scenaGlowna); ui->graphicsView->setFixedSize(902,602); sceneTimer = new QTimer(this); sceneTimer2 = new QTimer (this); connect (this->sceneTimer, SIGNAL(timeout()), this, SLOT(advance())); connect (this->sceneTimer, SIGNAL(timeout()), this->scenaGlowna,SLOT(advance())); connect (this->sceneTimer2,SIGNAL(timeout()), this, SLOT(advance2())); connect (this->sceneTimer2,SIGNAL(timeout()), this->scenaGlowna,SLOT(advance2())); this->sceneTimer->start(20); this->sceneTimer2->start(time); ui->lcdNumber->display(gra->gracz->returnLevel()); }
auto begin() const { return advance2(c.begin(), s); }
auto begin(){ return advance2(c.begin(), s); }