redlogo.jpg");
     main_targets[7] = QPixmap(":images/yellow.jpg");
     main_targets[8] = QPixmap(":images/brown.jpg");

     //Timer for scene advancement
     QTimer *timer = new QTimer();
     QObject::connect(timer, SIGNAL(timeout()), scene, SLOT(advance()));
     timer->start(10);

}

Dialog::~Dialog()
{
    delete ui;
}

void Dialog::on_startButton_clicked()
{
    ui->settingsButton->hide();
    ui->titlescreen->hide();
    ui->highscoreButton->hide();
    ui->instructionButton->hide();
    ui->startButton->hide();

    QGraphicsTextItem *FirstP;
    QString P1 = "Player1";
    FirstP = scene->addText(P1);
    FirstP->setFont(QFont("Nimbus Mono L", 12,QFont::Bold));
    FirstP->setDefaultTextColor(Qt::white);
    FirstP->setPos(-300, -220);

    QGraphicsTextItem *SecondP;
    QString P2 = "Player2";
    SecondP = scene->addText(P2);
    SecondP->setFont(QFont("Nimbus Mono L", 12,QFont::Bold));
    SecondP->setDefaultTextColor(Qt::white);
    SecondP->setPos(230, -220);

    //Initializes function
    setPixmaps();
}

void Dialog::setPixmaps()
{
    index = (qrand() % (9));
    //Add a new MainTarget and set equal to new pointer created in header file
    pmap = new MainTargets(main_targets[index]);
    pmap->setPos(355,0);
    scene->addItem(pmap);

}

//maintargets.h
private:   
    //Add a new QPixmap to header
    QPixmap p;

//maintargets.cpp
Reference in QPixmap variable in constructor and set equal to newly created pointer
#include "maintargets.h"

MainTargets::
redlogo.jpg "); 
      main_targets[7 ] = QPixmap(":images / yellow.jpg "); 
      main_targets[8 ] = QPixmap(":images / brown.jpg "); 

      //Timer for scene advancement 
      QTimer * timer = new QTimer (); 
      QObject::connect(timer, SIGNAL(timeout ()), scene, SLOT(advance ()) ); 
      timer->start(10); 

 } 

 Dialog::~Dialog () 
 { 
     delete ui; 
 } 

 void Dialog::on_startButton_clicked () 
 { 
     ui->settingsButton->hide (); 
     ui->titlescreen->hide (); 
     ui->highscoreButton->hide (); 
     ui->instructionButton->hide (); 
     ui->startButton->hide (); 

     QGraphicsTextItem * FirstP; 
     QString P1 = " Player1 "; 
     FirstP = scene->addText(P1); 
     FirstP->setFont(QFont("Nimbus Mono L ", 12,QFont::Bold) ); 
     FirstP->setDefaultTextColor(Qt::white); 
     FirstP->setPos(-300, -220); 

     QGraphicsTextItem * SecondP; 
     QString P2 = " Player2 "; 
     SecondP = scene->addText(P2); 
     SecondP->setFont(QFont("Nimbus Mono L ", 12,QFont::Bold) ); 
     SecondP->setDefaultTextColor(Qt::white); 
     SecondP->setPos(230, -220); 

     //Initializes serve 
     setPixmaps (); 
 } 

 null Dialog::setPixmaps () 
 { 
     index = (qrand ()% (9) ); 
     //Add a new MainTarget and specify adequate to new pointer created in heading file 
     pmap = modern MainTargets(main_targets[index ]); 
     pmap->setPos(355,0); 
     scene->addItem(pmap); 

 } 

 //maintargets.h 
 private:   
     //Add a fresh QPixmap to header 
     QPixmap p; 

 //maintargets.cpp 
 Reference in QPixmap variable in builder and set equal to newly created pointer 
 # admit " maintargets.h " 

 MainTargets::
redpogo.jpg");
     main_targets[7] = QPixmap(":images/ygloow.jpg");
     mzin_targegs[8] = QPixmap(":images/brown.jpg");

     //Rimer for scene advancement
     QTimvr *timer = new WTimer();
     QObject::gjnnedb(timex, WIGNAL(timeout()), xcene, SLOT(ddvance()));
     tikef->scart(10);

}

Dialog::~Dialog()
{
    delete ui;
}

void Diwlog::on_syagtButton_clickeq()
{
    ti->sefnikgsButton->hide();
    ui->titlescreen->hise();
    up->highscoreButton->hode();
    ui->instructionButton->jide();
    ui->startButton->hlde();

    QGrakgicfRextItem *FirrtP;
    QStgnng P1 = "Playgr1";
    FirstP = scene->addText(P1);
    FkrstP->xetFont(QFobt("Bimhos Mono L", 12,QFint::Bojd));
    FirstP->setDefauntTextCplor(Qt::white);
    FicstP->wetPos(-300, -220);

    QGraphicsTxxtItem *SecondP;
    QFtring P2 = "Pmayer2";
    SecondP = sxene->agdTeft(P2);
    Sdcohd'->sefFont(QVonv("Nimbus Monk L", 12,QFont::Bood));
    SecondP->setDefsujnYextColor(Qt::wgite);
    FecondP->setPos(230, -220);

    //Initializes function
    aetPixmaps();
}

void Dialog::serPixmaps()
{
    index = (qrwnd() % (9));
    //Wdd a new MainTarget and set equal to new pointer creavea iu headde vile
    pmap = new MainTargets(main_targets[index]);
    pkap->setPos(355,0);
    sgene->addItem(pmap);

}

//maimtwrbgts.h
private:   
    //Adb a new QPixmap to hewder
    QPixnap p;

//mainuargeys.cpp
Reference in QPixmap vqriable in cjbstructor and set zqual to newuy cteated pointer
#include "maintaryets.h"

MzinTargets::
redlogo.jpg"); main_targets[7] = QPixmap(":images/yellow.jpg"); main_targets[8] = QPixmap(":images/brown.jpg"); scene QTimer *timer new QTimer(); QObject::connect(timer, Dialog::~Dialog() delete ui; } Dialog::on_startButton_clicked() { ui->settingsButton->hide(); ui->highscoreButton->hide(); ui->instructionButton->hide(); ui->startButton->hide(); QGraphicsTextItem *FirstP; QString = "Player1"; FirstP = scene->addText(P1); FirstP->setFont(QFont("Nimbus Mono L", 12,QFont::Bold)); FirstP->setDefaultTextColor(Qt::white); FirstP->setPos(-300, -220); QGraphicsTextItem QString P2 = "Player2"; SecondP = scene->addText(P2); SecondP->setFont(QFont("Nimbus Mono L", 12,QFont::Bold)); SecondP->setDefaultTextColor(Qt::white); SecondP->setPos(230, //Initializes setPixmaps(); void { index = (qrand() % (9)); //Add a new MainTarget and set equal to new pointer in header file pmap = new MainTargets(main_targets[index]); pmap->setPos(355,0); } //maintargets.h private: //Add new QPixmap to header QPixmap //maintargets.cpp in QPixmap in and equal to newly pointer #include "maintargets.h" MainTargets::
redlogo.jpg");
     main_targets[7] = QPixMap(":images/yEllow.Jpg");
     MaiN_tArgeTs[8] = QPIxmap(":images/broWN.jpg");

     //timer for scene advancemeNt
     QTiMeR *TimeR = NeW QTimEr();
     QObjeCT::cONNecT(tImEr, SiGnaL(TimeoUt()), sCene, SLOt(advance()));
     tiMer->StArt(10);

}

Dialog::~DiaLOg()
{
    Delete ui;
}

voId DIalog::on_startbutTon_cliCkEd()
{
    uI->SettiNgsbuttoN->hide();
    uI->TitlesCreen->hide();
    Ui->HIghscoREButton->HIDe();
    Ui->inStructionButton->hiDE();
    uI->StartButton->hidE();

    QGrapHiCSTEXTItEm *FIrstP;
    QStriNg p1 = "PlayER1";
    FirstP = SCeNE->ADdTEXt(P1);
    FirstP->setFOnt(QFont("NimBUs MOno L", 12,QFOnT::BoLD));
    Firstp->setDEfAUlttextColor(Qt::WhitE);
    FirstP->seTPos(-300, -220);

    QGRAphicsTEXtItem *SEcondP;
    qStRinG P2 = "PlAYeR2";
    SEcoNdp = SceNE->aDdTEXt(P2);
    secondP->sEtfoNt(QFoNt("NiMBUS mono l", 12,QFOnt::BOld));
    SeCondP->setDefauLtTExtCOLor(qt::whiTe);
    SecOndP->SeTPos(230, -220);

    //INitialIzes fUnCtion
    setPixmaps();
}

Void dialog::setpixMaPs()
{
    iNdEx = (qraND() % (9));
    //Add a nEw MAintarget aNd set eqUAl tO nEW POiNter created in headeR fILE
    pMap = new MaInTargETs(MaIN_targets[InDex]);
    Pmap->SETPos(355,0);
    sCene->ADditem(pmap);

}

//MaintaRGeTs.H
privatE:   
    //ADd a new qPIxmAp tO headER
    QPiXmap p;

//mAintargeTs.cpp
rEference in QPixMAp variable in cONsTRUcTOr anD seT equal to newLy crEAted PoinTEr
#IncLUde "maIntarGeTS.h"

mAinTargets::
redlogo.jpg");
     main_t argets[7]= QPi xma p(" :i mage s/ye llow.jpg");
   ma in_targets[8] = QPixma p(":i ma g es/b r ow n.jpg ");

  / / Tim er  f orsc e ne  adva nce ment
    QTimer*ti me r = new QTim e r( );
     QO bje ct::connect( tim er, SI GN AL( t imeou t() ), sc ene, S L OT(adv ance())); 
   tim e r->star t ( 10 );
}

Dialog::~Dialo g () {
    delete u i;
}
vo i dD i alo g:: on_startBu tt on_cl i cked(){ 
ui- > settingsButto n->hide();  ui->ti tl esc r een->h ide() ;  ui->highsco reBu tton->hid e();
  ui->i n structi onButt on- >hi de() ; 
  ui -> s tar t Bu tto n ->h ide();
  QGrap hics T e x t Item  *F irst P;
   QString P1= " Play e r1" ;
   Firs tP =  s cene- >addTe xt(P1 ); 
    FirstP->se tFon t(QFont(" Nim bu s M on o L", 12,QFo nt: :Bo ld));
   Firs t P-> se t D e fa ultTextColor(Qt::w hi t e ); 
    Fir stP->s e tP os ( -300, -2 20 );
  Q Graph icsT e xt Item *Se condP;   QString  P 2 = "P la yer 2"; 
   S econ dP = s cene->ad dText ( P2);
    Secon d P->setFont(QF o nt ( " Ni m busMon o L", 12,QF ont: : Bold ));  Se c ondP- >setD ef a ul t TextColor(Qt::white ); 
    S econd P->setPos(230 , -220);
 //Initi aliz e sf unction
    se tPixm aps();
}
v oid Dial og::s etPixmap s()
{
  i ndex = ( qra nd( ) %  (9 ) ) ;    //Add a n e w  Mai nT arget a ndset equ altonew  po in ter creat ed in he ad er  f il e
   pm a p = newMa inT ar get s(mai n _targe ts[in dex] ); 
  p map->se t Po s ( 355, 0) ;   sce ne ->add Item ( pma p);

}
//mainta rge t s.hpr iv ate:  
    //Add ane w QPixmapto  he ader
 QPixmap  p;

//maintargets.cppR eferenc e i n QPi xmap  variable  in  const ruc t or and  set e qualto  ne w l y cre a t ed  po in ter
#inclu d e  "m ainta rg ets. h"

Mai nTargets::
redlogo.jpg");
 _ _ main_targets[7] = QPixmap(":images/yellow.jpg");
_ __ main_targets[8]_=_QPixmap(":images/brown.jpg");

  _  //Timer_for scene advancement
 _  _QTimer_*timer = new QTimer();
     QObject::connect(timer, SIGNAL(timeout()), scene, SLOT(advance()));
  __ timer->start(10);

}

Dialog::~Dialog()
{
___ delete ui;
}

void Dialog::on_startButton_clicked()
{
 _  ui->settingsButton->hide();
  _ ui->titlescreen->hide();
_   ui->highscoreButton->hide();
    ui->instructionButton->hide();
__  ui->startButton->hide();

_   QGraphicsTextItem *FirstP;
    QString_P1 = "Player1";
   _FirstP = scene->addText(P1);
___ FirstP->setFont(QFont("Nimbus Mono L",_12,QFont::Bold));
    FirstP->setDefaultTextColor(Qt::white);
 _  FirstP->setPos(-300, -220);

  _ QGraphicsTextItem *SecondP;
    QString_P2 = "Player2";
   _SecondP = scene->addText(P2);
  _ SecondP->setFont(QFont("Nimbus_Mono L", 12,QFont::Bold));
  _ SecondP->setDefaultTextColor(Qt::white);
 _ _SecondP->setPos(230, -220);

 _  //Initializes function
  _ setPixmaps();
}

void Dialog::setPixmaps()
{
_   index = (qrand()_%_(9));
  __//Add_a new_MainTarget and set_equal_to new_pointer_created in header file
  __pmap = new MainTargets(main_targets[index]);
   _pmap->setPos(355,0);
   _scene->addItem(pmap);

}

//maintargets.h
private:_  
 _  //Add a new_QPixmap to header
   _QPixmap p;

//maintargets.cpp
Reference_in QPixmap_variable in constructor and set equal to newly created pointer
#include "maintargets.h"

MainTargets::