summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/bounce/main.cpp1
-rw-r--r--noncore/games/buzzword/main.cpp1
-rw-r--r--noncore/games/fifteen/main.cpp1
-rw-r--r--noncore/games/go/gowidget.cpp2
-rw-r--r--noncore/games/go/main.cpp1
-rw-r--r--noncore/games/kcheckers/main.cpp1
-rw-r--r--noncore/games/minesweep/main.cpp1
-rw-r--r--noncore/games/parashoot/main.cpp1
-rw-r--r--noncore/games/qasteroids/main.cpp1
-rw-r--r--noncore/games/snake/interface.cpp2
-rw-r--r--noncore/games/snake/main.cpp1
-rw-r--r--noncore/games/solitaire/main.cpp1
-rw-r--r--noncore/games/tetrix/main.cpp1
-rw-r--r--noncore/games/tictac/main.cpp1
-rw-r--r--noncore/games/wordgame/main.cpp1
-rw-r--r--noncore/games/wordgame/wordgame.cpp2
-rw-r--r--noncore/games/zlines/main.cpp1
-rw-r--r--noncore/games/zsame/ZSameWidget.cpp1
18 files changed, 18 insertions, 3 deletions
diff --git a/noncore/games/bounce/main.cpp b/noncore/games/bounce/main.cpp
index eb8d561..bec4a86 100644
--- a/noncore/games/bounce/main.cpp
+++ b/noncore/games/bounce/main.cpp
@@ -1,24 +1,25 @@
1/* 1/*
2 * Copyright (C) 2000 Stefan Schimanski <schimmi@kde.org> 2 * Copyright (C) 2000 Stefan Schimanski <schimmi@kde.org>
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public 14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the Free 15 * License along with this program; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19#include "kbounce.h" 19#include "kbounce.h"
20 20
21#include <opie2/oapplicationfactory.h> 21#include <opie2/oapplicationfactory.h>
22 22
23using namespace Opie::Core;
23OPIE_EXPORT_APP( OApplicationFactory<KJezzball> ) 24OPIE_EXPORT_APP( OApplicationFactory<KJezzball> )
24 25
diff --git a/noncore/games/buzzword/main.cpp b/noncore/games/buzzword/main.cpp
index 596cf16..a95e91a 100644
--- a/noncore/games/buzzword/main.cpp
+++ b/noncore/games/buzzword/main.cpp
@@ -1,23 +1,24 @@
1/* 1/*
2 * Copyright (C) 2002 Martin Imobersteg <imm@gmx.ch> 2 * Copyright (C) 2002 Martin Imobersteg <imm@gmx.ch>
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public 5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License,Life or (at your option) any later version. 7 * version 2 of the License,Life or (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public 14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the Free 15 * License along with this program; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19#include <opie2/oapplicationfactory.h> 19#include <opie2/oapplicationfactory.h>
20 20
21#include "buzzword.h" 21#include "buzzword.h"
22 22
23using namespace Opie::Core;
23OPIE_EXPORT_APP( OApplicationFactory<BuzzWord> ) 24OPIE_EXPORT_APP( OApplicationFactory<BuzzWord> )
diff --git a/noncore/games/fifteen/main.cpp b/noncore/games/fifteen/main.cpp
index ed74a47..800a270 100644
--- a/noncore/games/fifteen/main.cpp
+++ b/noncore/games/fifteen/main.cpp
@@ -1,23 +1,24 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2004 Holger Freyther. All rights reserved. 2** Copyright (C) 2004 Holger Freyther. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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**********************************************************************/ 16**********************************************************************/
17 17
18#include "fifteen.h" 18#include "fifteen.h"
19 19
20#include <opie2/oapplicationfactory.h> 20#include <opie2/oapplicationfactory.h>
21 21
22using namespace Opie::Core;
22OPIE_EXPORT_APP( OApplicationFactory<FifteenMainWindow> ) 23OPIE_EXPORT_APP( OApplicationFactory<FifteenMainWindow> )
23 24
diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp
index 79820b1..d134540 100644
--- a/noncore/games/go/gowidget.cpp
+++ b/noncore/games/go/gowidget.cpp
@@ -1,91 +1,91 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "gowidget.h" 21#include "gowidget.h"
22 22
23#include <qpe/config.h> 23#include <qpe/config.h>
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25 25
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qpe/qpetoolbar.h> 27#include <qtoolbar.h>
28#include <qmenubar.h> 28#include <qmenubar.h>
29#include <qaction.h> 29#include <qaction.h>
30#include <qapplication.h> //processEvents() 30#include <qapplication.h> //processEvents()
31#include <qlabel.h> 31#include <qlabel.h>
32 32
33//#include <stdio.h> 33//#include <stdio.h>
34 34
35 35
36static const enum bVal computer_color = BLACK; 36static const enum bVal computer_color = BLACK;
37 37
38static int current_handicap = 1; 38static int current_handicap = 1;
39 39
40static QBrush *goBrush; 40static QBrush *goBrush;
41//static QImage *newBlackStone; 41//static QImage *newBlackStone;
42//static QImage *blackStone; 42//static QImage *blackStone;
43//static QImage *whiteStone; 43//static QImage *whiteStone;
44static QPixmap *newBlackStone; 44static QPixmap *newBlackStone;
45static QPixmap *blackStone; 45static QPixmap *blackStone;
46static QPixmap *whiteStone; 46static QPixmap *whiteStone;
47 47
48static bool smallStones = FALSE; 48static bool smallStones = FALSE;
49 49
50GoMainWidget::GoMainWidget( QWidget *parent, const char* name, WFlags fl) : 50GoMainWidget::GoMainWidget( QWidget *parent, const char* name, WFlags fl) :
51 QMainWindow( parent, name, fl ) 51 QMainWindow( parent, name, fl )
52{ 52{
53 setToolBarsMovable( FALSE ); 53 setToolBarsMovable( FALSE );
54 GoWidget *go = new GoWidget(this); 54 GoWidget *go = new GoWidget(this);
55 55
56 setCentralWidget(go); 56 setCentralWidget(go);
57 toolbar = new QToolBar(this); 57 toolbar = new QToolBar(this);
58 toolbar->setHorizontalStretchable( TRUE ); 58 toolbar->setHorizontalStretchable( TRUE );
59 addToolBar(toolbar); 59 addToolBar(toolbar);
60 60
61 QMenuBar *mb = new QMenuBar( toolbar ); 61 QMenuBar *mb = new QMenuBar( toolbar );
62 mb->setMargin(0); 62 mb->setMargin(0);
63 QPopupMenu *file = new QPopupMenu( this ); 63 QPopupMenu *file = new QPopupMenu( this );
64 64
65 QAction *a = new QAction( tr( "New Game" ), QString::null, 0, this, 0 ); 65 QAction *a = new QAction( tr( "New Game" ), QString::null, 0, this, 0 );
66 connect( a, SIGNAL( activated() ), go, SLOT( newGame() ) ); 66 connect( a, SIGNAL( activated() ), go, SLOT( newGame() ) );
67 a->addTo( file ); 67 a->addTo( file );
68 68
69 a = new QAction( tr( "Pass" ), Resource::loadPixmap( "pass" ), QString::null, 0, this, 0 ); 69 a = new QAction( tr( "Pass" ), Resource::loadPixmap( "pass" ), QString::null, 0, this, 0 );
70 connect( a, SIGNAL( activated() ), go, SLOT( pass() ) ); 70 connect( a, SIGNAL( activated() ), go, SLOT( pass() ) );
71 a->addTo( file ); 71 a->addTo( file );
72 a->addTo( toolbar ); 72 a->addTo( toolbar );
73 73
74 74
75 a = new QAction( tr( "Resign" ), Resource::loadPixmap( "reset" ), QString::null, 0, this, 0 ); 75 a = new QAction( tr( "Resign" ), Resource::loadPixmap( "reset" ), QString::null, 0, this, 0 );
76 connect( a, SIGNAL( activated() ), go, SLOT( resign() ) ); 76 connect( a, SIGNAL( activated() ), go, SLOT( resign() ) );
77 a->addTo( file ); 77 a->addTo( file );
78 78
79 a = new QAction( tr( "Two player option" ), QString::null, 0, this, 0 ); 79 a = new QAction( tr( "Two player option" ), QString::null, 0, this, 0 );
80 a->setToggleAction( TRUE ); 80 a->setToggleAction( TRUE );
81 connect( a, SIGNAL( toggled(bool) ), go, SLOT( setTwoplayer(bool) ) ); 81 connect( a, SIGNAL( toggled(bool) ), go, SLOT( setTwoplayer(bool) ) );
82 a->addTo( file ); 82 a->addTo( file );
83 83
84 mb->insertItem( tr( "Game" ), file ); 84 mb->insertItem( tr( "Game" ), file );
85 85
86 QLabel *turnLabel = new QLabel( toolbar ); 86 QLabel *turnLabel = new QLabel( toolbar );
87 turnLabel->setBackgroundMode( PaletteButton ); 87 turnLabel->setBackgroundMode( PaletteButton );
88 connect( go, SIGNAL(showTurn(const QPixmap&)), 88 connect( go, SIGNAL(showTurn(const QPixmap&)),
89 turnLabel, SLOT(setPixmap(const QPixmap&)) ); 89 turnLabel, SLOT(setPixmap(const QPixmap&)) );
90 90
91 91
diff --git a/noncore/games/go/main.cpp b/noncore/games/go/main.cpp
index 46817d1..f6bb813 100644
--- a/noncore/games/go/main.cpp
+++ b/noncore/games/go/main.cpp
@@ -1,27 +1,28 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "gowidget.h" 21#include "gowidget.h"
22 22
23 23
24#include <opie2/oapplicationfactory.h> 24#include <opie2/oapplicationfactory.h>
25 25
26using namespace Opie::Core;
26OPIE_EXPORT_APP( OApplicationFactory<GoMainWidget> ) 27OPIE_EXPORT_APP( OApplicationFactory<GoMainWidget> )
27 28
diff --git a/noncore/games/kcheckers/main.cpp b/noncore/games/kcheckers/main.cpp
index 79b5ac7..8c708e2 100644
--- a/noncore/games/kcheckers/main.cpp
+++ b/noncore/games/kcheckers/main.cpp
@@ -1,9 +1,10 @@
1 1
2 2
3#include "kcheckers.h" 3#include "kcheckers.h"
4 4
5#include <opie2/oapplicationfactory.h> 5#include <opie2/oapplicationfactory.h>
6 6
7using namespace Opie::Core;
7OPIE_EXPORT_APP( OApplicationFactory<KCheckers> ) 8OPIE_EXPORT_APP( OApplicationFactory<KCheckers> )
8 9
9 10
diff --git a/noncore/games/minesweep/main.cpp b/noncore/games/minesweep/main.cpp
index f3070f5..629afbf 100644
--- a/noncore/games/minesweep/main.cpp
+++ b/noncore/games/minesweep/main.cpp
@@ -1,26 +1,27 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "minesweep.h" 21#include "minesweep.h"
22 22
23#include <opie2/oapplicationfactory.h> 23#include <opie2/oapplicationfactory.h>
24 24
25using namespace Opie::Core;
25OPIE_EXPORT_APP( OApplicationFactory<MineSweep> ) 26OPIE_EXPORT_APP( OApplicationFactory<MineSweep> )
26 27
diff --git a/noncore/games/parashoot/main.cpp b/noncore/games/parashoot/main.cpp
index 81d513d..da21c25 100644
--- a/noncore/games/parashoot/main.cpp
+++ b/noncore/games/parashoot/main.cpp
@@ -1,26 +1,27 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "interface.h" 21#include "interface.h"
22 22
23#include <opie2/oapplicationfactory.h> 23#include <opie2/oapplicationfactory.h>
24 24
25using namespace Opie::Core;
25OPIE_EXPORT_APP( OApplicationFactory<ParaShoot> ) 26OPIE_EXPORT_APP( OApplicationFactory<ParaShoot> )
26 27
diff --git a/noncore/games/qasteroids/main.cpp b/noncore/games/qasteroids/main.cpp
index 33e4729..6ddb238 100644
--- a/noncore/games/qasteroids/main.cpp
+++ b/noncore/games/qasteroids/main.cpp
@@ -1,26 +1,27 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "toplevel.h" 21#include "toplevel.h"
22 22
23#include <opie2/oapplicationfactory.h> 23#include <opie2/oapplicationfactory.h>
24 24
25 25
26using namespace Opie::Core;
26OPIE_EXPORT_APP( OApplicationFactory<KAstTopLevel> ) 27OPIE_EXPORT_APP( OApplicationFactory<KAstTopLevel> )
diff --git a/noncore/games/snake/interface.cpp b/noncore/games/snake/interface.cpp
index b5fb5bf..9d9550a 100644
--- a/noncore/games/snake/interface.cpp
+++ b/noncore/games/snake/interface.cpp
@@ -1,89 +1,89 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "interface.h" 21#include "interface.h"
22 22
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24 24
25#include <qpe/qpetoolbar.h> 25#include <qtoolbar.h>
26#include <qtoolbutton.h> 26#include <qtoolbutton.h>
27 27
28SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : 28SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) :
29 QMainWindow(parent,name,f), 29 QMainWindow(parent,name,f),
30 canvas(232, 258) 30 canvas(232, 258)
31{ 31{
32 setCaption( tr("Snake") ); 32 setCaption( tr("Snake") );
33 QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff ); 33 QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff );
34 QPixmap bg = Resource::loadPixmap("snake/grass"); 34 QPixmap bg = Resource::loadPixmap("snake/grass");
35 canvas.setBackgroundPixmap(bg); 35 canvas.setBackgroundPixmap(bg);
36 canvas.setUpdatePeriod(100); 36 canvas.setUpdatePeriod(100);
37 snake = 0; 37 snake = 0;
38 38
39 cv = new QCanvasView(&canvas, this); 39 cv = new QCanvasView(&canvas, this);
40 40
41 pauseTimer = new QTimer(this); 41 pauseTimer = new QTimer(this);
42 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) ); 42 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) );
43 43
44 setToolBarsMovable( FALSE ); 44 setToolBarsMovable( FALSE );
45 45
46 QToolBar* toolbar = new QToolBar( this); 46 QToolBar* toolbar = new QToolBar( this);
47 toolbar->setHorizontalStretchable( TRUE ); 47 toolbar->setHorizontalStretchable( TRUE );
48 48
49 QPixmap newicon = Resource::loadPixmap("ksnake"); 49 QPixmap newicon = Resource::loadPixmap("ksnake");
50 setIcon(newicon); 50 setIcon(newicon);
51 (void)new QToolButton(newicon, tr("New Game"), 0, 51 (void)new QToolButton(newicon, tr("New Game"), 0,
52 this, SLOT(newGame()), toolbar, "New Game"); 52 this, SLOT(newGame()), toolbar, "New Game");
53 53
54 scorelabel = new QLabel(toolbar); 54 scorelabel = new QLabel(toolbar);
55 showScore(0); 55 showScore(0);
56 scorelabel->setBackgroundMode( PaletteButton ); 56 scorelabel->setBackgroundMode( PaletteButton );
57 scorelabel->setAlignment( AlignRight | AlignVCenter | ExpandTabs ); 57 scorelabel->setAlignment( AlignRight | AlignVCenter | ExpandTabs );
58 toolbar->setStretchableWidget( scorelabel ); 58 toolbar->setStretchableWidget( scorelabel );
59 59
60 setFocusPolicy(StrongFocus); 60 setFocusPolicy(StrongFocus);
61 61
62 setCentralWidget(cv); 62 setCentralWidget(cv);
63 63
64 QTimer::singleShot( 16, this, SLOT(welcomescreen()) ); 64 QTimer::singleShot( 16, this, SLOT(welcomescreen()) );
65 gamestopped = true; 65 gamestopped = true;
66 waitover = true; 66 waitover = true;
67} 67}
68 68
69SnakeGame::~SnakeGame() 69SnakeGame::~SnakeGame()
70{ 70{
71 delete snake; 71 delete snake;
72} 72}
73 73
74void SnakeGame::resizeEvent(QResizeEvent *) 74void SnakeGame::resizeEvent(QResizeEvent *)
75{ 75{
76 QSize s = centralWidget()->size(); 76 QSize s = centralWidget()->size();
77 int fw = style().defaultFrameWidth(); 77 int fw = style().defaultFrameWidth();
78 canvas.resize( s.width() - fw - 2, s.height() - fw - 2); 78 canvas.resize( s.width() - fw - 2, s.height() - fw - 2);
79} 79}
80 80
81void SnakeGame::welcomescreen() 81void SnakeGame::welcomescreen()
82{ 82{
83 QCanvasText* title = new QCanvasText(tr("SNAKE!"), &canvas); 83 QCanvasText* title = new QCanvasText(tr("SNAKE!"), &canvas);
84 title->setColor(yellow); 84 title->setColor(yellow);
85 title->setFont( QFont("times", 18, QFont::Bold) ); 85 title->setFont( QFont("times", 18, QFont::Bold) );
86 int w = title->boundingRect().width(); 86 int w = title->boundingRect().width();
87 title->move(canvas.width()/2 -w/2, canvas.height()/2-110); 87 title->move(canvas.width()/2 -w/2, canvas.height()/2-110);
88 title->show(); 88 title->show();
89 QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Resource::findPixmap("snake/title")); 89 QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Resource::findPixmap("snake/title"));
diff --git a/noncore/games/snake/main.cpp b/noncore/games/snake/main.cpp
index 44f742f..81eb9ee 100644
--- a/noncore/games/snake/main.cpp
+++ b/noncore/games/snake/main.cpp
@@ -1,28 +1,29 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "interface.h" 21#include "interface.h"
22 22
23#include <opie2/oapplicationfactory.h> 23#include <opie2/oapplicationfactory.h>
24 24
25 25
26using namespace Opie::Core;
26OPIE_EXPORT_APP( OApplicationFactory<SnakeGame> ) 27OPIE_EXPORT_APP( OApplicationFactory<SnakeGame> )
27 28
28 29
diff --git a/noncore/games/solitaire/main.cpp b/noncore/games/solitaire/main.cpp
index d4f6673..c8d4040 100644
--- a/noncore/games/solitaire/main.cpp
+++ b/noncore/games/solitaire/main.cpp
@@ -1,25 +1,26 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "canvascardwindow.h" 21#include "canvascardwindow.h"
22 22
23#include <opie2/oapplicationfactory.h> 23#include <opie2/oapplicationfactory.h>
24 24
25using namespace Opie::Core;
25OPIE_EXPORT_APP( OApplicationFactory<CanvasCardWindow> ) \ No newline at end of file 26OPIE_EXPORT_APP( OApplicationFactory<CanvasCardWindow> ) \ No newline at end of file
diff --git a/noncore/games/tetrix/main.cpp b/noncore/games/tetrix/main.cpp
index 147d13d..6194bbf 100644
--- a/noncore/games/tetrix/main.cpp
+++ b/noncore/games/tetrix/main.cpp
@@ -1,27 +1,28 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "qtetrix.h" 21#include "qtetrix.h"
22 22
23 23
24#include <opie2/oapplicationfactory.h> 24#include <opie2/oapplicationfactory.h>
25 25
26using namespace Opie::Core;
26OPIE_EXPORT_APP( OApplicationFactory<QTetrix> ) 27OPIE_EXPORT_APP( OApplicationFactory<QTetrix> )
27 28
diff --git a/noncore/games/tictac/main.cpp b/noncore/games/tictac/main.cpp
index b8193f7..f3df375 100644
--- a/noncore/games/tictac/main.cpp
+++ b/noncore/games/tictac/main.cpp
@@ -1,13 +1,14 @@
1/**************************************************************************** 1/****************************************************************************
2** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 2** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of an example program for Qt. This example 4** This file is part of an example program for Qt. This example
5** program may be used, distributed and modified without limitation. 5** program may be used, distributed and modified without limitation.
6** 6**
7*****************************************************************************/ 7*****************************************************************************/
8 8
9#include "tictac.h" 9#include "tictac.h"
10 10
11#include <opie2/oapplicationfactory.h> 11#include <opie2/oapplicationfactory.h>
12 12
13using namespace Opie::Core;
13OPIE_EXPORT_APP( OApplicationFactory<TicTacToe> ) 14OPIE_EXPORT_APP( OApplicationFactory<TicTacToe> )
diff --git a/noncore/games/wordgame/main.cpp b/noncore/games/wordgame/main.cpp
index 7fd5f50..c388775 100644
--- a/noncore/games/wordgame/main.cpp
+++ b/noncore/games/wordgame/main.cpp
@@ -1,27 +1,28 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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#include "wordgame.h" 21#include "wordgame.h"
22 22
23#include <opie2/oapplicationfactory.h> 23#include <opie2/oapplicationfactory.h>
24 24
25 25
26using namespace Opie::Core;
26OPIE_EXPORT_APP( OApplicationFactory<WordGame> ) 27OPIE_EXPORT_APP( OApplicationFactory<WordGame> )
27 28
diff --git a/noncore/games/wordgame/wordgame.cpp b/noncore/games/wordgame/wordgame.cpp
index 43a54f8..a80bd35 100644
--- a/noncore/games/wordgame/wordgame.cpp
+++ b/noncore/games/wordgame/wordgame.cpp
@@ -1,100 +1,100 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
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 "wordgame.h" 22#include "wordgame.h"
23 23
24#include <qpe/global.h> 24#include <qpe/global.h>
25#include <qpe/resource.h> 25#include <qpe/resource.h>
26#include <qpe/config.h> 26#include <qpe/config.h>
27 27
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qmessagebox.h> 29#include <qmessagebox.h>
30#include <qcombobox.h> 30#include <qcombobox.h>
31#include <qdir.h> 31#include <qdir.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qpushbutton.h> 33#include <qpushbutton.h>
34#include <qtextstream.h> 34#include <qtextstream.h>
35#include <qtimer.h> 35#include <qtimer.h>
36#include <qpe/qpetoolbar.h> 36#include <qtoolbar.h>
37#include <qtoolbutton.h> 37#include <qtoolbutton.h>
38#include <qvbox.h> 38#include <qvbox.h>
39#include <qwidgetstack.h> 39#include <qwidgetstack.h>
40#include <qlayout.h> 40#include <qlayout.h>
41 41
42#include <stdlib.h> 42#include <stdlib.h>
43#include <unistd.h> 43#include <unistd.h>
44#include <pwd.h> 44#include <pwd.h>
45#include <sys/types.h> 45#include <sys/types.h>
46 46
47enum RuleEffects { 47enum RuleEffects {
48 Multiplier=15, 48 Multiplier=15,
49 MultiplyAll=64, 49 MultiplyAll=64,
50 Start=128 50 Start=128
51}; 51};
52 52
53static int tile_smallw = 16; 53static int tile_smallw = 16;
54static int tile_smallh = 16; 54static int tile_smallh = 16;
55static int tile_bigw = 22; 55static int tile_bigw = 22;
56static int tile_bigh = 22; 56static int tile_bigh = 22;
57static int tile_stweak = -2; 57static int tile_stweak = -2;
58static int tile_btweak = -1; 58static int tile_btweak = -1;
59 59
60static const int rack_tiles=7; 60static const int rack_tiles=7;
61 61
62const char* sampleWGR= 62const char* sampleWGR=
63 "wordgame_shapes\n" 63 "wordgame_shapes\n"
64 "15 15\n" 64 "15 15\n"
65 "400001040100004\n" 65 "400001040100004\n"
66 "030000000000030\n" 66 "030000000000030\n"
67 "002002000200200\n" 67 "002002000200200\n"
68 "000300020003000\n" 68 "000300020003000\n"
69 "000020000020000\n" 69 "000020000020000\n"
70 "102001000100201\n" 70 "102001000100201\n"
71 "000000202000000\n" 71 "000000202000000\n"
72 "400200050002004\n" 72 "400200050002004\n"
73 "000000202000000\n" 73 "000000202000000\n"
74 "102001000100201\n" 74 "102001000100201\n"
75 "000020000020000\n" 75 "000020000020000\n"
76 "000300020003000\n" 76 "000300020003000\n"
77 "002002000200200\n" 77 "002002000200200\n"
78 "030000000000030\n" 78 "030000000000030\n"
79 "400001040100004\n" 79 "400001040100004\n"
80 "1 2 3 66 67 194 100 0\n" 80 "1 2 3 66 67 194 100 0\n"
81 "1 j 8\n" 81 "1 j 8\n"
82 "1 q 7\n" 82 "1 q 7\n"
83 "1 x 6\n" 83 "1 x 6\n"
84 "1 z 6\n" 84 "1 z 6\n"
85 "1 w 4\n" 85 "1 w 4\n"
86 "1 k 4\n" 86 "1 k 4\n"
87 "1 v 3\n" 87 "1 v 3\n"
88 "1 f 3\n" 88 "1 f 3\n"
89 "2 y 3\n" 89 "2 y 3\n"
90 "2 h 2\n" 90 "2 h 2\n"
91 "2 b 2\n" 91 "2 b 2\n"
92 "2 m 2\n" 92 "2 m 2\n"
93 "3 p 2\n" 93 "3 p 2\n"
94 "3 g 2\n" 94 "3 g 2\n"
95 "3 u 2\n" 95 "3 u 2\n"
96 "4 d 2\n" 96 "4 d 2\n"
97 "4 c 2\n" 97 "4 c 2\n"
98 "5 l 1\n" 98 "5 l 1\n"
99 "5 o 1\n" 99 "5 o 1\n"
100 "7 t 1\n" 100 "7 t 1\n"
diff --git a/noncore/games/zlines/main.cpp b/noncore/games/zlines/main.cpp
index d1709e4..8d80bae 100644
--- a/noncore/games/zlines/main.cpp
+++ b/noncore/games/zlines/main.cpp
@@ -1,28 +1,29 @@
1/*************************************************************************** 1/***************************************************************************
2 main.cpp - description 2 main.cpp - description
3 ------------------- 3 -------------------
4 begin : Fri May 19 2000 4 begin : Fri May 19 2000
5 copyright : (C) 2000 by Roman Merzlyakov 5 copyright : (C) 2000 by Roman Merzlyakov
6 email : roman@sbrf.barrt.ru 6 email : roman@sbrf.barrt.ru
7 copyright : (C) 2000 by Roman Razilov 7 copyright : (C) 2000 by Roman Razilov
8 email : Roman.Razilov@gmx.de 8 email : Roman.Razilov@gmx.de
9 ***************************************************************************/ 9 ***************************************************************************/
10 10
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by * 14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19 /* 19 /*
20 * Roman Razilov 2000-05-19 debug dummmy 20 * Roman Razilov 2000-05-19 debug dummmy
21 * Roman Razilov 2000-05-21 qimgio 21 * Roman Razilov 2000-05-21 qimgio
22*/ 22*/
23 23
24#include "klines.h" 24#include "klines.h"
25 25
26#include <opie2/oapplicationfactory.h> 26#include <opie2/oapplicationfactory.h>
27 27
28using namespace Opie::Core;
28OPIE_EXPORT_APP( OApplicationFactory<KLines> ) 29OPIE_EXPORT_APP( OApplicationFactory<KLines> )
diff --git a/noncore/games/zsame/ZSameWidget.cpp b/noncore/games/zsame/ZSameWidget.cpp
index 3c58c93..4fab0f6 100644
--- a/noncore/games/zsame/ZSameWidget.cpp
+++ b/noncore/games/zsame/ZSameWidget.cpp
@@ -1,106 +1,107 @@
1/* Yo Emacs, this is -*- C++ -*- */ 1/* Yo Emacs, this is -*- C++ -*- */
2/* 2/*
3 * ksame 0.4 - simple Game 3 * ksame 0.4 - simple Game
4 * Copyright (C) 1997,1998 Marcus Kreutzberger 4 * Copyright (C) 1997,1998 Marcus Kreutzberger
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or 8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version. 9 * (at your option) any later version.
10 * 10 *
11 * This program is distributed in the hope that it will be useful, 11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU General Public License 16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 * 19 *
20 */ 20 */
21 21
22#include <stdio.h> 22#include <stdio.h>
23 23
24#include <opie2/oapplicationfactory.h> 24#include <opie2/oapplicationfactory.h>
25 25
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27 27
28#include <qtoolbar.h> 28#include <qtoolbar.h>
29#include <qmenubar.h> 29#include <qmenubar.h>
30#include <qapplication.h> 30#include <qapplication.h>
31#include <qaction.h> 31#include <qaction.h>
32#include <qmessagebox.h> 32#include <qmessagebox.h>
33 33
34#include <kapplication.h> 34#include <kapplication.h>
35 35
36#include "ZSameWidget.h" 36#include "ZSameWidget.h"
37 37
38static int default_colors=3; 38static int default_colors=3;
39 39
40#define i18n tr 40#define i18n tr
41 41
42 42
43using namespace Opie::Core;
43OPIE_EXPORT_APP( OApplicationFactory<ZSameWidget> ) 44OPIE_EXPORT_APP( OApplicationFactory<ZSameWidget> )
44 45
45 46
46 47
47ZSameWidget::ZSameWidget( QWidget* parent, const char* name, WFlags fl ) 48ZSameWidget::ZSameWidget( QWidget* parent, const char* name, WFlags fl )
48 : QMainWindow( parent, name, fl ) 49 : QMainWindow( parent, name, fl )
49{ 50{
50 setCaption(tr("ZSame")); 51 setCaption(tr("ZSame"));
51 52
52 setToolBarsMovable( false ); 53 setToolBarsMovable( false );
53 QToolBar* con = new QToolBar( this ); 54 QToolBar* con = new QToolBar( this );
54 con->setHorizontalStretchable( true ); 55 con->setHorizontalStretchable( true );
55 QMenuBar* mb = new QMenuBar( con ); 56 QMenuBar* mb = new QMenuBar( con );
56 QToolBar* tb = new QToolBar( this ); 57 QToolBar* tb = new QToolBar( this );
57 58
58 QPopupMenu* fileMenu = new QPopupMenu( this ); 59 QPopupMenu* fileMenu = new QPopupMenu( this );
59 60
60 QAction* a = new QAction(tr("New Game"), Resource::loadIconSet("new") , 61 QAction* a = new QAction(tr("New Game"), Resource::loadIconSet("new") ,
61 QString::null, 0, this, "new_icon"); 62 QString::null, 0, this, "new_icon");
62 a->addTo( fileMenu ); 63 a->addTo( fileMenu );
63 a->addTo( tb ); 64 a->addTo( tb );
64 connect(a, SIGNAL(activated()), this, SLOT(m_new())); 65 connect(a, SIGNAL(activated()), this, SLOT(m_new()));
65 66
66 a = new QAction(tr("Restart This Board"), Resource::loadIconSet("redo"), 67 a = new QAction(tr("Restart This Board"), Resource::loadIconSet("redo"),
67 QString::null, 0, this, "restart_board" ); 68 QString::null, 0, this, "restart_board" );
68 a->addTo( fileMenu ); 69 a->addTo( fileMenu );
69 connect( a, SIGNAL(activated()), this, SLOT(m_restart())); 70 connect( a, SIGNAL(activated()), this, SLOT(m_restart()));
70 restart = a; 71 restart = a;
71 72
72 a = new QAction( tr("Undo"), Resource::loadIconSet("undo"), 73 a = new QAction( tr("Undo"), Resource::loadIconSet("undo"),
73 QString::null, 0, this, "undo_action" ); 74 QString::null, 0, this, "undo_action" );
74 a->addTo( fileMenu ); 75 a->addTo( fileMenu );
75 a->addTo( tb ); 76 a->addTo( tb );
76 connect( a, SIGNAL(activated()), this, SLOT(m_undo())); 77 connect( a, SIGNAL(activated()), this, SLOT(m_undo()));
77 78
78 a = new QAction(tr("Quit"), Resource::loadIconSet("quit_icon"), 79 a = new QAction(tr("Quit"), Resource::loadIconSet("quit_icon"),
79 QString::null, 0, this, "quit_action"); 80 QString::null, 0, this, "quit_action");
80 a->addTo( fileMenu ); 81 a->addTo( fileMenu );
81 a->addTo( tb ); 82 a->addTo( tb );
82 connect(a, SIGNAL(activated()), this, SLOT(m_quit())); 83 connect(a, SIGNAL(activated()), this, SLOT(m_quit()));
83 84
84 mb->insertItem(tr("Game" ), fileMenu ); 85 mb->insertItem(tr("Game" ), fileMenu );
85 86
86 int foo[2]; 87 int foo[2];
87 desktop_widget(foo); 88 desktop_widget(foo);
88 stone = new StoneWidget(this,foo[0],foo[1]); 89 stone = new StoneWidget(this,foo[0],foo[1]);
89 90
90 connect( stone, SIGNAL(s_gameover()), this, SLOT(gameover())); 91 connect( stone, SIGNAL(s_gameover()), this, SLOT(gameover()));
91 92
92 connect( stone, SIGNAL(s_colors(int)), this, SLOT(setColors(int))); 93 connect( stone, SIGNAL(s_colors(int)), this, SLOT(setColors(int)));
93 connect( stone, SIGNAL(s_board(int)), this, SLOT(setBoard(int))); 94 connect( stone, SIGNAL(s_board(int)), this, SLOT(setBoard(int)));
94 connect( stone, SIGNAL(s_marked(int)), this, SLOT(setMarked(int))); 95 connect( stone, SIGNAL(s_marked(int)), this, SLOT(setMarked(int)));
95 connect( stone, SIGNAL(s_score(int)), this, SLOT(setScore(int))); 96 connect( stone, SIGNAL(s_score(int)), this, SLOT(setScore(int)));
96 connect( stone, SIGNAL(s_remove(int,int)), this, SLOT(stonesRemoved(int,int))); 97 connect( stone, SIGNAL(s_remove(int,int)), this, SLOT(stonesRemoved(int,int)));
97 98
98 connect(stone, SIGNAL(s_sizechanged()), this, SLOT(sizeChanged())); 99 connect(stone, SIGNAL(s_sizechanged()), this, SLOT(sizeChanged()));
99 100
100 sizeChanged(); 101 sizeChanged();
101 setCentralWidget(stone); 102 setCentralWidget(stone);
102 103
103 104
104 setScore(0); 105 setScore(0);
105} 106}
106 107