reverting trunk back to stable 3.4.1 version
git-svn-id: svn://svn.code.sf.net/p/qjoypad/code/trunk@82 c05e91a0-76c8-4ec0-b377-ef19ce7cc080
This commit is contained in:
committed by
virtuoussin13
parent
1cc6e9087e
commit
17ed926cdf
20
src/button.h
20
src/button.h
@ -1,18 +1,19 @@
|
||||
#ifndef BUTTON_H
|
||||
#define BUTTON_H
|
||||
|
||||
#include <QTimer>
|
||||
#include <QTextStream>
|
||||
//parent of Button
|
||||
#include "component.h"
|
||||
|
||||
//to request a periodic tap on the shoulder for rapidfire
|
||||
#include "timer.h"
|
||||
|
||||
//for getting a key name in status()
|
||||
#include "keycode.h"
|
||||
|
||||
//note that the Button class, unlike the axis class, does not need a release
|
||||
//function because it releases the key as soon as it is pressed.
|
||||
class Button : public QObject {
|
||||
Q_OBJECT
|
||||
friend class ButtonEdit;
|
||||
class Button : public Component {
|
||||
friend class ButtonEdit;
|
||||
public:
|
||||
Button( int i );
|
||||
~Button();
|
||||
@ -35,26 +36,23 @@ class Button : public QObject {
|
||||
//set the key code for this axis. Used by quickset.
|
||||
void setKey(bool mouse, int value);
|
||||
//happens every MSEC (constant.h) milliseconds
|
||||
void timerTick( int tick );
|
||||
void timer( int tick );
|
||||
protected:
|
||||
//true iff this button is physically depressed.
|
||||
bool isButtonPressed;
|
||||
bool isOn;
|
||||
//the index of this button on the joystick
|
||||
int index;
|
||||
//actually sends a key press/release
|
||||
virtual void click( bool press );
|
||||
//is a simulated key currently depressed?
|
||||
bool isDown;
|
||||
int tick;
|
||||
|
||||
//button settings
|
||||
bool rapidfire;
|
||||
bool sticky;
|
||||
bool useMouse;
|
||||
int keycode;
|
||||
int mousecode; //like keycode, only mousebutton ;)
|
||||
QTimer *timer;
|
||||
public slots:
|
||||
void timerCalled();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user