summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-24 18:09:38 (UTC)
committer harlekin <harlekin>2003-03-24 18:09:38 (UTC)
commitc23656023651523d37406b43fd031ace4e2de89f (patch) (side-by-side diff)
treefd57e9985256064e57c3f93722ba8282f7e3be41
parent58f8a4fe595182abb4372ab4f990e39cf67ef08a (diff)
downloadopie-c23656023651523d37406b43fd031ace4e2de89f.zip
opie-c23656023651523d37406b43fd031ace4e2de89f.tar.gz
opie-c23656023651523d37406b43fd031ace4e2de89f.tar.bz2
pine icon now in go dir
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/go/gowidget.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp
index 8567b30..1d38c9f 100644
--- a/noncore/games/go/gowidget.cpp
+++ b/noncore/games/go/gowidget.cpp
@@ -40,3 +40,3 @@
static const enum bVal computer_color = BLACK;
-
+
static int current_handicap = 1;
@@ -54,3 +54,3 @@ static bool smallStones = FALSE;
GoMainWidget::GoMainWidget( QWidget *parent, const char* name) :
- QMainWindow( parent, name )
+ QMainWindow( parent, name )
{
@@ -76,4 +76,4 @@ GoMainWidget::GoMainWidget( QWidget *parent, const char* name) :
a->addTo( toolbar );
-
-
+
+
a = new QAction( tr( "Resign" ), Resource::loadPixmap( "reset" ), QString::null, 0, this, 0 );
@@ -86,14 +86,14 @@ GoMainWidget::GoMainWidget( QWidget *parent, const char* name) :
a->addTo( file );
-
+
mb->insertItem( tr( "Game" ), file );
-
+
QLabel *turnLabel = new QLabel( toolbar );
turnLabel->setBackgroundMode( PaletteButton );
- connect( go, SIGNAL(showTurn(const QPixmap&)),
+ connect( go, SIGNAL(showTurn(const QPixmap&)),
turnLabel, SLOT(setPixmap(const QPixmap&)) );
-
+
QLabel * scoreLabel = new QLabel( toolbar );
scoreLabel->setBackgroundMode( PaletteButton );
- connect( go, SIGNAL(showScore(const QString&)),
+ connect( go, SIGNAL(showScore(const QString&)),
scoreLabel, SLOT(setText(const QString&)) );
@@ -101,3 +101,3 @@ GoMainWidget::GoMainWidget( QWidget *parent, const char* name) :
toolbar->setStretchableWidget( scoreLabel );
-
+
go->readConfig();
@@ -119,3 +119,3 @@ GoWidget *GoWidget::self = 0;
GoWidget::GoWidget( QWidget *parent, const char* name) :
- QWidget( parent, name )
+ QWidget( parent, name )
{
@@ -126,6 +126,6 @@ GoWidget::GoWidget( QWidget *parent, const char* name) :
-
+
d = bx = by = 1;
-
- QPixmap pix = Resource::loadPixmap( "pine" );
+
+ QPixmap pix = Resource::loadPixmap( "go/pine" );
goBrush = new QBrush( black, pix );
@@ -206,3 +206,3 @@ void GoWidget::resizeEvent( QResizeEvent * )
newBlackStone->convertFromImage( newBlackStone->convertToImage().smoothScale(8,8) );
-
+
smallStones = TRUE;
@@ -240,3 +240,3 @@ void GoWidget::paintEvent( QPaintEvent *e )
int r = whiteStone->width()/2;
-
+
QPainter p(this);
@@ -251,3 +251,3 @@ void GoWidget::paintEvent( QPaintEvent *e )
p.setPen( pine.dark() );
-
+
for ( i = xMin; i < xMax+1 ; i ++ ) {
@@ -264,7 +264,7 @@ void GoWidget::paintEvent( QPaintEvent *e )
p.drawEllipse( bx+i*d-2, by+j*d-2, 5, 5 );
-
-
+
+
for ( i = xMin; i < xMax+1; i++ )
for ( j = yMin; j < yMax+1; j++ ) {
- if ( board[i][j] == WHITE ||
+ if ( board[i][j] == WHITE ||
currentPlayer==WHITE && newX == i && newY == j )
@@ -396,3 +396,3 @@ void GoWidget::showStone( int x, int y, enum bVal c )
}
-
+
}
@@ -408,3 +408,3 @@ void GoWidget::refresh( int x, int y )
{
- update( bx+d*x-d/2-1, by+d*y-d/2-1, d+2, d+2 );
+ update( bx+d*x-d/2-1, by+d*y-d/2-1, d+2, d+2 );
}