00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "mainwindow.h"
00021
00022 #include <gluon/input/inputmanager.h>
00023
00024 #include <QtCore/QDebug>
00025 #include <QtCore/QObject>
00026 #include <QtCore/QPointer>
00027 #include <QtGui/QApplication>
00028
00029 using namespace GluonInput;
00030
00031 int main(int argc, char *argv[])
00032 {
00033 QApplication app(argc, argv);
00034 app.setOrganizationName("KDE Gluon");
00035 app.setApplicationName("Gluon Player");
00036 MainWindow window;
00037
00038 #if defined(Q_WS_S60)
00039 window.showMaximized();
00040 #else
00041 window.show();
00042 #endif
00043
00044 if (InputManager::instance()->inputList().count() > 0) {
00045 qDebug() << "creating generic test game loop";
00046 QList<InputDevice *> inputList = InputManager::instance()->inputList();
00047 foreach(InputDevice *input, inputList) {
00048 QObject::connect(window.inputEventTextEdit(), SIGNAL(buttonStateChanged(int, int)), input, SLOT(buttonStateChanged(int, int)));
00049 input->setEnabled(true);
00050 }
00051
00052
00053 }
00054
00055 qDebug() << "starting generic game event loop";
00056 app.exec();
00057 }