author | simon <simon> | 2002-04-30 14:49:30 (UTC) |
---|---|---|
committer | simon <simon> | 2002-04-30 14:49:30 (UTC) |
commit | c959b0c2170d2c12f93f5fa04ff02ca4c7c0ef4a (patch) (side-by-side diff) | |
tree | e85e8136aeb87c582e958a48f8428765ef7b99be | |
parent | a0cdb6f85e270e20bd5383e980df9dcf862a93ce (diff) | |
download | opie-c959b0c2170d2c12f93f5fa04ff02ca4c7c0ef4a.zip opie-c959b0c2170d2c12f93f5fa04ff02ca4c7c0ef4a.tar.gz opie-c959b0c2170d2c12f93f5fa04ff02ca4c7c0ef4a.tar.bz2 |
- resolved clash between const char *name and struct utsname name
-rw-r--r-- | noncore/games/qasteroids/toplevel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/games/qasteroids/toplevel.cpp b/noncore/games/qasteroids/toplevel.cpp index 090099f..71daf60 100644 --- a/noncore/games/qasteroids/toplevel.cpp +++ b/noncore/games/qasteroids/toplevel.cpp @@ -1,184 +1,184 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************//* * KAsteroids - Copyright (c) Martin R. Jones 1997 * * Part of the KDE project */ // --- toplevel.cpp --- #include "toplevel.h" #include "ledmeter.h" #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qaccel.h> #include <qlabel.h> #include <qlayout.h> #include <qlcdnumber.h> #include <qpushbutton.h> #include <sys/utsname.h> #define SB_SCORE 1 #define SB_LEVEL 2 #define SB_SHIPS 3 struct SLevel { int nrocks; double rockSpeed; }; #define MAX_LEVELS 16 SLevel levels[MAX_LEVELS] = { { 1, 0.4 }, { 1, 0.6 }, { 2, 0.5 }, { 2, 0.7 }, { 2, 0.8 }, { 3, 0.6 }, { 3, 0.7 }, { 3, 0.8 }, { 4, 0.6 }, { 4, 0.7 }, { 4, 0.8 }, { 5, 0.7 }, { 5, 0.8 }, { 5, 0.9 }, { 5, 1.0 } }; const char *soundEvents[] = { "ShipDestroyed", "RockDestroyed", 0 }; const char *soundDefaults[] = { "Explosion.wav", "ploop.wav", 0 }; -KAstTopLevel::KAstTopLevel( QWidget *parent, const char *name ) - : QMainWindow( parent, name ) +KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name ) + : QMainWindow( parent, _name ) { setCaption( tr("Asteroids") ); QWidget *border = new QWidget( this ); border->setBackgroundColor( black ); setCentralWidget( border ); QVBoxLayout *borderLayout = new QVBoxLayout( border ); QWidget *mainWin = new QWidget( border ); borderLayout->addWidget( mainWin, 2, AlignHCenter ); view = new KAsteroidsView( mainWin ); connect( view, SIGNAL( shipKilled() ), SLOT( slotShipKilled() ) ); connect( view, SIGNAL( rockHit(int) ), SLOT( slotRockHit(int) ) ); connect( view, SIGNAL( rocksRemoved() ), SLOT( slotRocksRemoved() ) ); connect( view, SIGNAL( updateVitals() ), SLOT( slotUpdateVitals() ) ); QVBoxLayout *vb = new QVBoxLayout( mainWin ); QHBoxLayout *hb = new QHBoxLayout; QHBoxLayout *hbd = new QHBoxLayout; vb->addLayout( hb ); QFont labelFont( "helvetica", 12 ); QColorGroup grp( darkGreen, black, QColor( 128, 128, 128 ), QColor( 64, 64, 64 ), black, darkGreen, black ); QPalette pal( grp, grp, grp ); mainWin->setPalette( pal ); QLabel *label; label = new QLabel( tr("Score"), mainWin ); label->setFont( labelFont ); label->setPalette( pal ); // label->setFixedWidth( label->sizeHint().width() ); hb->addWidget( label ); scoreLCD = new QLCDNumber( 5, mainWin ); scoreLCD->setFrameStyle( QFrame::NoFrame ); scoreLCD->setSegmentStyle( QLCDNumber::Flat ); scoreLCD->setFixedHeight( 16 ); scoreLCD->setPalette( pal ); hb->addWidget( scoreLCD ); hb->addStretch( 1 ); label = new QLabel( tr("Level"), mainWin ); label->setFont( labelFont ); label->setPalette( pal ); // label->setFixedWidth( label->sizeHint().width() ); hb->addWidget( label ); levelLCD = new QLCDNumber( 2, mainWin ); levelLCD->setFrameStyle( QFrame::NoFrame ); levelLCD->setSegmentStyle( QLCDNumber::Flat ); levelLCD->setFixedHeight( 16 ); levelLCD->setPalette( pal ); hb->addWidget( levelLCD ); hb->addStretch( 1 ); label = new QLabel( tr("Ships"), mainWin ); label->setFont( labelFont ); // label->setFixedWidth( label->sizeHint().width() ); label->setPalette( pal ); hb->addWidget( label ); shipsLCD = new QLCDNumber( 1, mainWin ); shipsLCD->setFrameStyle( QFrame::NoFrame ); shipsLCD->setSegmentStyle( QLCDNumber::Flat ); shipsLCD->setFixedHeight( 16 ); shipsLCD->setPalette( pal ); hb->addWidget( shipsLCD ); // hb->addStrut( 14 ); vb->addWidget( view, 10 ); // -- bottom layout: vb->addLayout( hbd ); QFont smallFont( "helvetica", 12 ); hbd->addSpacing( 5 ); /* label = new QLabel( tr( "T" ), mainWin ); label->setFont( smallFont ); label->setFixedWidth( label->sizeHint().width() ); label->setPalette( pal ); hbd->addWidget( label ); teleportsLCD = new QLCDNumber( 1, mainWin ); teleportsLCD->setFrameStyle( QFrame::NoFrame ); teleportsLCD->setSegmentStyle( QLCDNumber::Flat ); teleportsLCD->setPalette( pal ); teleportsLCD->setFixedHeight( 18 ); hbd->addWidget( teleportsLCD ); hbd->addSpacing( 10 ); |