mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-09 20:46:07 +01:00
7d6163c746
as a dependency. Please let me know if you have any problems. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1793 ebee16cc-31ac-478f-84a7-5cbb03baadba
115 lines
2.8 KiB
Plaintext
115 lines
2.8 KiB
Plaintext
/*!
|
|
* @file sdlgamepad.h
|
|
* @brief Headerfile for the SDLGamepad class.
|
|
*
|
|
* <p>
|
|
* In this file there are only prottyped functions and other
|
|
* global stuff. The real implemention of the functions and the
|
|
* class is in sdlgamepad.cpp. This file is not listed here because all
|
|
* documentation is inside the header file.
|
|
* </p>
|
|
*/
|
|
|
|
/*!
|
|
* @mainpage SDLGamepad API Documentation
|
|
*
|
|
* @section intro_sec Introduction
|
|
*
|
|
* <p>
|
|
* This is the API Documentation for the SDLGamepad library.
|
|
* </p>
|
|
*
|
|
* <p>
|
|
* This library makes use of the SDL-1.2 library to send / receive
|
|
* information from a gamepad / joystick that is compatible with the
|
|
* SDL system. It is written in QT. Because of the fact that SDL and QT
|
|
* are avaliable on many platforms you can use this library on every
|
|
* platform that supports SDL and qt!
|
|
* </p>
|
|
*
|
|
* @section install_sec Installation
|
|
*
|
|
* @subsection step1 Step 1: Requirements
|
|
*
|
|
* <p>
|
|
* You need a QT 4.5.x and SDL-1.2 to compile this library.
|
|
* </p>
|
|
*
|
|
* <p>
|
|
* For further information check http://qt.nokia.com and
|
|
* http://www.libsdl.org
|
|
* </p>
|
|
*
|
|
* @subsection step2 Step 2: Getting the code..
|
|
*
|
|
* <p>
|
|
* You can get the source code via svn:<br>
|
|
* <i>svn co http://www.nalla.de/svn/tank/sdlgamepad/trunk
|
|
* sdlgamepad</i>
|
|
* </p>
|
|
*
|
|
* @subsection step3 Step 3: Compile the code!
|
|
*
|
|
* <p>
|
|
* If you want debug information you should run:
|
|
* </p>
|
|
*
|
|
* <p>
|
|
* <i>qmake CONFIG+=debug</i><br>
|
|
* <i>make</i>
|
|
* </p>
|
|
*
|
|
* <p>
|
|
* You should now have .so files or a .dll file in the build
|
|
* subdirectory.
|
|
* </p>
|
|
*
|
|
* <p>
|
|
* For a release build just run qmake without the CONFIG+=debug!
|
|
* </p>
|
|
*
|
|
* @section add_sec Additional information
|
|
*
|
|
* <p>
|
|
* You need to have SDL installed globally in the mingw directory on
|
|
* windows. This is due to the fact that on unix systems sdl is mostly
|
|
* in the distributions repository system avaliable and therefore a
|
|
* global install.
|
|
* </p>
|
|
*
|
|
* @section ex_sec Implemention example
|
|
*
|
|
* @code
|
|
* #include <QCoreApplication>
|
|
* #include <QMetaType>
|
|
* #include "otherclass.h"
|
|
* #include "sdlgamepad.h"
|
|
*
|
|
* int main(int argc, char *argv[])
|
|
* {
|
|
* QCoreApplication a(argc, argv);
|
|
* OtherClass other;
|
|
* SDLGamepad sdl;
|
|
*
|
|
* a.connect(&a, SIGNAL(aboutToQuit()), &sdl, SLOT(quit()));
|
|
*
|
|
* if(sdl.init())
|
|
* {
|
|
* sdl.start();
|
|
* qRegisterMetaType<QListInt16>("QListInt16");
|
|
* qRegisterMetaType<ButtonNumber>("ButtonNumber");
|
|
*
|
|
* a.connect(&sdl, SIGNAL(axesValues(QListInt16)),
|
|
* &other, SLOT(someSlot(QListInt16)));
|
|
* a.connect(&sdl, SIGNAL(buttonState(ButtonNumber, bool)),
|
|
* &other, SLOT(someOtherSlot(ButtonNumber, bool)));
|
|
*
|
|
* return a.exec();
|
|
* }
|
|
*
|
|
* qFatal("Init of SDLGamepad failed! Shutting down..");
|
|
* a.exit();
|
|
* }
|
|
* @endcode
|
|
*/
|