Diffstat (limited to 'noncore/games/tetrix/qtetrix.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/tetrix/qtetrix.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/games/tetrix/qtetrix.cpp b/noncore/games/tetrix/qtetrix.cpp index a6a5f34..d949176 100644 --- a/noncore/games/tetrix/qtetrix.cpp +++ b/noncore/games/tetrix/qtetrix.cpp @@ -1,48 +1,48 @@ /********************************************************************** ** 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. ** **********************************************************************/ #include "qtetrix.h" -#include <qpe/resource.h> +#include <opie2/oresource.h> #include <qlabel.h> #include <qdatetime.h> #include <qlayout.h> #include <qtimer.h> #include "ohighscoredlg.h" void drawTetrixButton( QPainter *p, int x, int y, int w, int h, const QColor *color ) { QColor fc; if ( color ) { QPointArray a; a.setPoints( 3, x,y+h-1, x,y, x+w-1,y ); p->setPen( color->light() ); p->drawPolyline( a ); a.setPoints( 3, x+1,y+h-1, x+w-1,y+h-1, x+w-1,y+1 ); p->setPen( color->dark() ); p->drawPolyline( a ); x++; y++; w -= 2; @@ -76,49 +76,49 @@ void ShowNextPiece::paintEvent( QPaintEvent * ) { QPainter p( this ); drawFrame( &p ); p.end(); // explicit end() so any slots can paint too emit update(); } void ShowNextPiece::drawNextSquare(int x, int y,QColor *color) { if (xOffset == -1) // Before first resizeEvent? return; QPainter paint; paint.begin(this); drawTetrixButton( &paint, xOffset+x*blockWidth, yOffset+y*blockHeight, blockWidth, blockHeight, color ); paint.end(); } QTetrix::QTetrix( QWidget *parent, const char *name, WFlags f ) : QMainWindow( parent, name, f ) { - setIcon( Resource::loadPixmap( "tetrix_icon" ) ); + setIcon( Opie::Core::OResource::loadPixmap( "tetrix_icon" ) ); setCaption( tr("Tetrix" ) ); QTime t = QTime::currentTime(); TetrixPiece::setRandomSeed( (((double)t.hour())+t.minute()+t.second())/ (24+60+60) ); QWidget *gameArea = new QWidget( this ); setCentralWidget( gameArea ); QGridLayout *gl = new QGridLayout( gameArea, 5, 3, 8 ); gl->setColStretch( 1, 5 ); gl->setColStretch( 2, 10 ); QLabel *l; l = new QLabel( tr("Next"), gameArea ); gl->addWidget( l, 0, 0 ); showNext = new ShowNextPiece(gameArea); showNext->setBackgroundColor(QColor(0,0,0)); gl->addWidget( showNext, 0, 1 ); l = new QLabel( tr("Score"), gameArea ); gl->addWidget( l, 1, 0 ); showScore = new QLabel(gameArea); gl->addWidget( showScore, 1, 1 ); |