00001 /****************************************************************************** 00002 * This file is part of the Gluon Development Platform 00003 * Copyright (C) 2008 Sacha Schutz <istdasklar@free.fr> 00004 * Copyright (C) 2010 Kim Jung Nissen <jungnissen@gmail.com> 00005 * Copyright (C) 2010 Arjen Hiemstra <ahiemstra@heimr.nl> 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00020 */ 00021 #ifndef GLUONDEVICES_H 00022 #define GLUONDEVICES_H 00023 00024 #include <QtCore/QFlags> 00025 #include <QtCore/QEvent> 00026 00027 namespace GluonInput 00028 { 00029 enum DeviceFlag 00030 { 00031 UnknownDevice = 0, 00032 KeyboardDevice = 1, 00033 MouseDevice = 1 << 1, 00034 JoystickDevice = 1 << 2, 00035 TouchDevice = 1 << 3, 00036 TouchpadDevice = 1 << 4 00037 }; 00038 Q_DECLARE_FLAGS( Devices, DeviceFlag ) 00039 00040 enum InputTypeFlag 00041 { 00042 Button = QEvent::Type( QEvent::User + 1 ), 00043 RelativeAxis = QEvent::Type( QEvent::User + 2 ), 00044 AbsoluteAxis = QEvent::Type( QEvent::User + 3 ) 00045 }; 00046 }; 00047 00048 Q_DECLARE_OPERATORS_FOR_FLAGS( GluonInput::Devices ); 00049 00050 #endif