Diffstat (limited to 'noncore/games/buzzword/buzzword.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/buzzword/buzzword.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/games/buzzword/buzzword.cpp b/noncore/games/buzzword/buzzword.cpp index f746065..13eb481 100644 --- a/noncore/games/buzzword/buzzword.cpp +++ b/noncore/games/buzzword/buzzword.cpp | |||
@@ -1,68 +1,67 @@ | |||
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 <qlayout.h> | 19 | #include <qlayout.h> |
20 | #include <qmessagebox.h> | ||
21 | #include <qmainwindow.h> | 20 | #include <qmainwindow.h> |
22 | #include <qlabel.h> | 21 | #include <qlabel.h> |
23 | #include <qgrid.h> | 22 | #include <qgrid.h> |
24 | #include <qcolor.h> | 23 | #include <qcolor.h> |
25 | #include <qbutton.h> | 24 | #include <qbutton.h> |
26 | #include <qfile.h> | 25 | #include <qfile.h> |
27 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
28 | #include <qstringlist.h> | 27 | #include <qstringlist.h> |
29 | #include <qmessagebox.h> | 28 | #include <qmessagebox.h> |
30 | #include <qdir.h> | 29 | #include <qdir.h> |
31 | 30 | ||
32 | #include <math.h> | 31 | #include <math.h> |
33 | #include <stdlib.h> | 32 | #include <stdlib.h> |
34 | 33 | ||
35 | #include <qpe/qpeapplication.h> | 34 | #include <qpe/qpeapplication.h> |
36 | 35 | ||
37 | #include "buzzword.h" | 36 | #include "buzzword.h" |
38 | 37 | ||
39 | BuzzLabel::BuzzLabel( QWidget *parent, const char *name ) | 38 | BuzzLabel::BuzzLabel( QWidget *parent, const char *name ) |
40 | : QLabel( parent, name ) | 39 | : QLabel( parent, name ) |
41 | { | 40 | { |
42 | } | 41 | } |
43 | 42 | ||
44 | void BuzzLabel::mousePressEvent(QMouseEvent *e) | 43 | void BuzzLabel::mousePressEvent(QMouseEvent *e) |
45 | { | 44 | { |
46 | if(e->button() == LeftButton) | 45 | if(e->button() == LeftButton) |
47 | { | 46 | { |
48 | emit clicked(); | 47 | emit clicked(); |
49 | } | 48 | } |
50 | } | 49 | } |
51 | 50 | ||
52 | BuzzItem::BuzzItem( int row, int column, QString text, QWidget *parent, const char *name ) | 51 | BuzzItem::BuzzItem( int row, int column, QString text, QWidget *parent, const char *name ) |
53 | : QVBox( parent, name ), _row(row), _column(column) | 52 | : QVBox( parent, name ), _row(row), _column(column) |
54 | { | 53 | { |
55 | setFrameStyle( QFrame::Panel | QFrame::Raised ); | 54 | setFrameStyle( QFrame::Panel | QFrame::Raised ); |
56 | setLineWidth( 1 ); | 55 | setLineWidth( 1 ); |
57 | label = new BuzzLabel(this, "label"); | 56 | label = new BuzzLabel(this, "label"); |
58 | label->setText(text); | 57 | label->setText(text); |
59 | label->setAlignment( int( QLabel::AlignCenter ) ); | 58 | label->setAlignment( int( QLabel::AlignCenter ) ); |
60 | 59 | ||
61 | connect( label, SIGNAL(clicked()), this, SLOT(flip()) ); | 60 | connect( label, SIGNAL(clicked()), this, SLOT(flip()) ); |
62 | } | 61 | } |
63 | 62 | ||
64 | void BuzzItem::flip() | 63 | void BuzzItem::flip() |
65 | { | 64 | { |
66 | setLineWidth( 1 ); | 65 | setLineWidth( 1 ); |
67 | label->setBackgroundColor(label->colorGroup().highlight()); | 66 | label->setBackgroundColor(label->colorGroup().highlight()); |
68 | emit clicked(_row, _column); | 67 | emit clicked(_row, _column); |