1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#
--- qpe-vexed_arm/mainWidget.cpp~vit
+++ qpe-vexed_arm/mainWidget.cpp
@@ -24,7 +24,7 @@
#include <qhbox.h>
#include <qpe/qpeapplication.h>
-MainWidget::MainWidget(QWidget *parent, const char *name) : QWidget(parent, name) {
+MainWidget::MainWidget(QWidget *parent, const char *name, WFlags f) : QMainWindow(parent, name, f) {
this -> setBackgroundMode(PaletteButton);
this -> setCaption("QPE-Vexed");
--- qpe-vexed_arm/mainWidget.h~vit
+++ qpe-vexed_arm/mainWidget.h
@@ -28,7 +28,7 @@
#include "level.h"
#include "statuslabel.h"
-#include <qwidget.h>
+#include <qmainwindow.h>
#include <qstring.h>
/*
@@ -36,10 +36,11 @@
* Handles allmost all signals
*/
-class MainWidget : public QWidget {
+class MainWidget : public QMainWindow {
Q_OBJECT
public:
- MainWidget(QWidget *parent = NULL, const char *name = NULL);
+ static QString appName() { return QString::fromLatin1("qpevexed"); }
+ MainWidget(QWidget *parent = NULL, const char *name = NULL, WFlags f = 0);
~MainWidget();
protected:
void keyPressEvent(QKeyEvent*);
--- qpe-vexed_arm/qpeVexed.cpp~vit
+++ qpe-vexed_arm/qpeVexed.cpp
@@ -18,15 +18,8 @@
*
*/
-#include <qpe/qpeapplication.h>
#include "mainWidget.h"
+#include <opie2/oapplicationfactory.h>
-int main(int argc, char **argv) {
- QPEApplication a(argc, argv);
-
- MainWidget mw;
-
- a.setMainWidget(&mw);
- mw.show();
- a.exec();
-}
+using namespace Opie::Core;
+OPIE_EXPORT_APP( OApplicationFactory<MainWidget> )
--- qpe-vexed_arm/statuslabel.cpp~vit
+++ qpe-vexed_arm/statuslabel.cpp
@@ -32,6 +32,6 @@
StatusLabel::~StatusLabel() {}
void StatusLabel::setLabel(const QString& pack, const QString& name, int num) {
- QString s = QString::number(num);
+ QString s = QString::number(num+1);
setText(pack+" ("+s+"):\n\t"+name);
}
--- qpe-vexed_arm/qpe-vexed.pro~vit
+++ qpe-vexed_arm/qpe-vexed.pro
@@ -5,6 +5,6 @@
SOURCES = button.cpp fileiface.cpp level.cpp mainWidget.cpp menuBar.cpp playingBoard.cpp qpeVexed.cpp stone.cpp about.cpp statuslabel.cpp instruction.cpp
INCLUDEPATH += $(QPEDIR)/include
DEPENDPATH += $(QPEDIR)/include
-LIBS += -lqpe -lqte
+LIBS += -lqpe -lqte -lopiecore2
#INTERFACES = board_designed.ui
TARGET = qpe-vexed
|