summaryrefslogtreecommitdiff
path: root/noncore/games/tetrix/qtetrix.cpp
Unidiff
Diffstat (limited to 'noncore/games/tetrix/qtetrix.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/tetrix/qtetrix.cpp4
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
@@ -12,25 +12,25 @@
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#include "qtetrix.h" 22#include "qtetrix.h"
23 23
24#include <qpe/resource.h> 24#include <opie2/oresource.h>
25 25
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qtimer.h> 29#include <qtimer.h>
30 30
31#include "ohighscoredlg.h" 31#include "ohighscoredlg.h"
32 32
33 33
34void drawTetrixButton( QPainter *p, int x, int y, int w, int h, 34void drawTetrixButton( QPainter *p, int x, int y, int w, int h,
35 const QColor *color ) 35 const QColor *color )
36{ 36{
@@ -88,25 +88,25 @@ void ShowNextPiece::drawNextSquare(int x, int y,QColor *color)
88 88
89 QPainter paint; 89 QPainter paint;
90 paint.begin(this); 90 paint.begin(this);
91 drawTetrixButton( &paint, xOffset+x*blockWidth, yOffset+y*blockHeight, 91 drawTetrixButton( &paint, xOffset+x*blockWidth, yOffset+y*blockHeight,
92 blockWidth, blockHeight, color ); 92 blockWidth, blockHeight, color );
93 paint.end(); 93 paint.end();
94} 94}
95 95
96 96
97QTetrix::QTetrix( QWidget *parent, const char *name, WFlags f ) 97QTetrix::QTetrix( QWidget *parent, const char *name, WFlags f )
98 : QMainWindow( parent, name, f ) 98 : QMainWindow( parent, name, f )
99{ 99{
100 setIcon( Resource::loadPixmap( "tetrix_icon" ) ); 100 setIcon( Opie::Core::OResource::loadPixmap( "tetrix_icon" ) );
101 setCaption( tr("Tetrix" ) ); 101 setCaption( tr("Tetrix" ) );
102 102
103 QTime t = QTime::currentTime(); 103 QTime t = QTime::currentTime();
104 TetrixPiece::setRandomSeed( (((double)t.hour())+t.minute()+t.second())/ 104 TetrixPiece::setRandomSeed( (((double)t.hour())+t.minute()+t.second())/
105 (24+60+60) ); 105 (24+60+60) );
106 106
107 QWidget *gameArea = new QWidget( this ); 107 QWidget *gameArea = new QWidget( this );
108 setCentralWidget( gameArea ); 108 setCentralWidget( gameArea );
109 109
110 QGridLayout *gl = new QGridLayout( gameArea, 5, 3, 8 ); 110 QGridLayout *gl = new QGridLayout( gameArea, 5, 3, 8 );
111 gl->setColStretch( 1, 5 ); 111 gl->setColStretch( 1, 5 );
112 gl->setColStretch( 2, 10 ); 112 gl->setColStretch( 2, 10 );