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
23
src/axis.h
23
src/axis.h
@ -4,11 +4,11 @@
|
||||
//abs()
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <QTimer>
|
||||
#include <QTextStream>
|
||||
#include <QRegExp>
|
||||
#include <QStringList>
|
||||
#include "constant.h"
|
||||
//parent of Axis
|
||||
#include "component.h"
|
||||
|
||||
//to request a periodic tap on the shoulder for gradient mode
|
||||
#include "timer.h"
|
||||
|
||||
//default and arbitrary values for dZone and xZone
|
||||
#define DZONE 3000
|
||||
@ -18,9 +18,8 @@
|
||||
enum AxisMode {keybd, mousepv, mousenv, mouseph, mousenh};
|
||||
|
||||
//represents one joystick axis
|
||||
class Axis : public QObject {
|
||||
Q_OBJECT
|
||||
//so AxisEdit can manipulate fields directly.
|
||||
class Axis : public Component {
|
||||
//so AxisEdit can manipulate fields directly.
|
||||
friend class AxisEdit;
|
||||
public:
|
||||
Axis( int i );
|
||||
@ -46,13 +45,12 @@ class Axis : public QObject {
|
||||
void setKey(bool positive, int value);
|
||||
//happens every MSEC milliseconds (constant.h)
|
||||
//uses tick to decide if key events should be generated
|
||||
void timerTick( int tick );
|
||||
void timer( int tick );
|
||||
//recalculates the gradient curve. This should be run every time
|
||||
//maxSpeed, xZone, or dZone are changed.
|
||||
void adjustGradient();
|
||||
protected:
|
||||
int tick;
|
||||
//This axis is logically depressed (positive or negative)
|
||||
//This axis is logically depressed (positive or negative)
|
||||
//if the axis is gradient, this is true even if it is not
|
||||
//currently generating a keypress at the instant.
|
||||
bool isOn;
|
||||
@ -86,9 +84,6 @@ class Axis : public QObject {
|
||||
//note, the key is still clicked at the same pace no matter what,
|
||||
//this just decides how long it stays down each cycle.
|
||||
int duration;
|
||||
QTimer *timer;
|
||||
public slots:
|
||||
void timerCalled();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user