diff --git a/t14/cannon.cpp b/t14/cannon.cpp index 5a3208caf32875b319276ae7b189c3bcf7363706..6ae4b20d153b3f63f268ca1a09ec4b3a2e765587 100644 --- a/t14/cannon.cpp +++ b/t14/cannon.cpp @@ -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 ); @@ -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; @@ -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; } @@ -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() ); } @@ -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 ); diff --git a/t14/gamebrd.cpp b/t14/gamebrd.cpp index 679e93d0e0e3da8a81254a76566cbb8072333b0d..3bf14c9870111450e081f118afe0467fdf59c687 100644 --- a/t14/gamebrd.cpp +++ b/t14/gamebrd.cpp @@ -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 ); diff --git a/t14/lcdrange.cpp b/t14/lcdrange.cpp index 89795a464c1e8199cea79537ee2694ad920dc080..f5664d25a02af273d2e552f62a95da333cdd2532 100644 --- a/t14/lcdrange.cpp +++ b/t14/lcdrange.cpp @@ -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)) );