Loading t14/cannon.cpp +12 −12 Original line number Diff line number Diff line Loading @@ -128,9 +128,9 @@ void CannonField::paintEvent( QPaintEvent *e ) if ( updateR.intersects( barrierRect() ) ) paintBarrier( &p ); if ( gameEnded ) { p.setPen( black ); p.setPen( Qt::black ); p.setFont( QFont( "Courier", 48, QFont::Bold ) ); p.drawText( rect(), AlignCenter, "Game Over" ); p.drawText( rect(), Qt::AlignCenter, "Game Over" ); } else { if ( shooting && updateR.intersects( shotRect() ) ) paintShot( &p ); Loading @@ -142,7 +142,7 @@ void CannonField::paintEvent( QPaintEvent *e ) void CannonField::mousePressEvent( QMouseEvent *e ) { if ( e->button() != LeftButton ) if ( e->button() != Qt::LeftButton ) return; if ( barrelHit( e->pos() ) ) barrelPressed = true; Loading @@ -163,7 +163,7 @@ void CannonField::mouseMoveEvent( QMouseEvent *e ) void CannonField::mouseReleaseEvent( QMouseEvent *e ) { if ( e->button() == LeftButton ) if ( e->button() == Qt::LeftButton ) barrelPressed = false; } Loading @@ -175,22 +175,22 @@ void CannonField::stopShooting() void CannonField::paintShot( QPainter *p ) { p->setBrush( black ); p->setPen( NoPen ); p->setBrush( Qt::black ); p->setPen( Qt::NoPen ); p->drawRect( shotRect() ); } void CannonField::paintTarget( QPainter *p ) { p->setBrush( red ); p->setPen( black ); p->setBrush( Qt::red ); p->setPen( Qt::black ); p->drawRect( targetRect() ); } void CannonField::paintBarrier( QPainter *p ) { p->setBrush( yellow ); p->setPen( black ); p->setBrush( Qt::yellow ); p->setPen( Qt::black ); p->drawRect( barrierRect() ); } Loading @@ -205,8 +205,8 @@ void CannonField::paintCannon( QPainter *p ) pix.fill( this, cr.topLeft() ); tmp.begin( &pix ); tmp.setBrush( blue ); tmp.setPen( NoPen ); tmp.setBrush( Qt::blue ); tmp.setPen( Qt::NoPen ); tmp.translate( 0, pix.height() - 1 ); tmp.drawPie( QRect( -35,-35, 70, 70 ), 0, 90*16 ); Loading t14/gamebrd.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,8 @@ GameBoard::GameBoard( QWidget *parent, const char *name ) QLabel *shotsLeftL = new QLabel( "SHOTS LEFT", this, "shotsleftLabel" ); QAccel *accel = new QAccel( this ); accel->connectItem( accel->insertItem( Key_Space), this, SLOT(fire()) ); accel->connectItem( accel->insertItem( Key_Q), qApp, SLOT(quit()) ); accel->connectItem( accel->insertItem( Qt::Key_Space), this, SLOT(fire()) ); accel->connectItem( accel->insertItem( Qt::Key_Q), qApp, SLOT(quit()) ); quit->setGeometry( 10, 10, 75, 30 ); angle->setGeometry( 10, quit->y() + quit->height() + 10, 75, 130 ); Loading t14/lcdrange.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ void LCDRange::init() QScrollBar::Horizontal, // orientation this, "scrollbar" ); label = new QLabel( this, "label" ); label->setAlignment( AlignCenter ); label->setAlignment( Qt::AlignCenter ); connect( sBar, SIGNAL(valueChanged(int)), lcd, SLOT(display(int)) ); connect( sBar, SIGNAL(valueChanged(int)), SIGNAL(valueChanged(int)) ); Loading Loading
t14/cannon.cpp +12 −12 Original line number Diff line number Diff line Loading @@ -128,9 +128,9 @@ void CannonField::paintEvent( QPaintEvent *e ) if ( updateR.intersects( barrierRect() ) ) paintBarrier( &p ); if ( gameEnded ) { p.setPen( black ); p.setPen( Qt::black ); p.setFont( QFont( "Courier", 48, QFont::Bold ) ); p.drawText( rect(), AlignCenter, "Game Over" ); p.drawText( rect(), Qt::AlignCenter, "Game Over" ); } else { if ( shooting && updateR.intersects( shotRect() ) ) paintShot( &p ); Loading @@ -142,7 +142,7 @@ void CannonField::paintEvent( QPaintEvent *e ) void CannonField::mousePressEvent( QMouseEvent *e ) { if ( e->button() != LeftButton ) if ( e->button() != Qt::LeftButton ) return; if ( barrelHit( e->pos() ) ) barrelPressed = true; Loading @@ -163,7 +163,7 @@ void CannonField::mouseMoveEvent( QMouseEvent *e ) void CannonField::mouseReleaseEvent( QMouseEvent *e ) { if ( e->button() == LeftButton ) if ( e->button() == Qt::LeftButton ) barrelPressed = false; } Loading @@ -175,22 +175,22 @@ void CannonField::stopShooting() void CannonField::paintShot( QPainter *p ) { p->setBrush( black ); p->setPen( NoPen ); p->setBrush( Qt::black ); p->setPen( Qt::NoPen ); p->drawRect( shotRect() ); } void CannonField::paintTarget( QPainter *p ) { p->setBrush( red ); p->setPen( black ); p->setBrush( Qt::red ); p->setPen( Qt::black ); p->drawRect( targetRect() ); } void CannonField::paintBarrier( QPainter *p ) { p->setBrush( yellow ); p->setPen( black ); p->setBrush( Qt::yellow ); p->setPen( Qt::black ); p->drawRect( barrierRect() ); } Loading @@ -205,8 +205,8 @@ void CannonField::paintCannon( QPainter *p ) pix.fill( this, cr.topLeft() ); tmp.begin( &pix ); tmp.setBrush( blue ); tmp.setPen( NoPen ); tmp.setBrush( Qt::blue ); tmp.setPen( Qt::NoPen ); tmp.translate( 0, pix.height() - 1 ); tmp.drawPie( QRect( -35,-35, 70, 70 ), 0, 90*16 ); Loading
t14/gamebrd.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,8 @@ GameBoard::GameBoard( QWidget *parent, const char *name ) QLabel *shotsLeftL = new QLabel( "SHOTS LEFT", this, "shotsleftLabel" ); QAccel *accel = new QAccel( this ); accel->connectItem( accel->insertItem( Key_Space), this, SLOT(fire()) ); accel->connectItem( accel->insertItem( Key_Q), qApp, SLOT(quit()) ); accel->connectItem( accel->insertItem( Qt::Key_Space), this, SLOT(fire()) ); accel->connectItem( accel->insertItem( Qt::Key_Q), qApp, SLOT(quit()) ); quit->setGeometry( 10, 10, 75, 30 ); angle->setGeometry( 10, quit->y() + quit->height() + 10, 75, 130 ); Loading
t14/lcdrange.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ void LCDRange::init() QScrollBar::Horizontal, // orientation this, "scrollbar" ); label = new QLabel( this, "label" ); label->setAlignment( AlignCenter ); label->setAlignment( Qt::AlignCenter ); connect( sBar, SIGNAL(valueChanged(int)), lcd, SLOT(display(int)) ); connect( sBar, SIGNAL(valueChanged(int)), SIGNAL(valueChanged(int)) ); Loading