re: review - fix spaces and rename Absolute2
This commit is contained in:
@ -125,7 +125,7 @@ bool Axis::read( QTextStream &stream ) {
|
||||
absolute = false;
|
||||
}
|
||||
else if (*it == "absolute") {
|
||||
interpretation = Absolute2; // to avoid name collision with a #define Absolute
|
||||
interpretation = AbsolutePos;
|
||||
gradient = true;
|
||||
absolute = true;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class Axis : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
//each axis can create a key press or move the mouse in one of four directions.
|
||||
enum Interpretation { ZeroOne, Gradient, Absolute, Absolute2 = Absolute };
|
||||
enum Interpretation { ZeroOne, Gradient, AbsolutePos };
|
||||
enum Mode {Keyboard, MousePosVert, MouseNegVert, MousePosHor, MouseNegHor};
|
||||
enum TransferCurve {Linear, Quadratic, Cubic, QuadraticExtreme,
|
||||
PowerFunction};
|
||||
@ -77,9 +77,9 @@ class Axis : public QObject {
|
||||
float inverseRange;
|
||||
|
||||
//actual axis settings:
|
||||
Interpretation interpretation;
|
||||
Interpretation interpretation;
|
||||
bool gradient;
|
||||
bool absolute;
|
||||
bool absolute;
|
||||
int maxSpeed; //0..MAXMOUSESPEED
|
||||
unsigned int transferCurve;
|
||||
float sensitivity;
|
||||
|
@ -26,7 +26,7 @@ AxisEdit::AxisEdit( Axis* ax )
|
||||
chkGradient = new QComboBox(this);
|
||||
chkGradient->insertItem((int) Axis::ZeroOne, tr("Use 0 or max always"), Qt::DisplayRole);
|
||||
chkGradient->insertItem((int) Axis::Gradient, tr("Relative movement (previously gradient)"), Qt::DisplayRole);
|
||||
chkGradient->insertItem((int) Axis::Absolute, tr("Absolute movement (direct position)"), Qt::DisplayRole);
|
||||
chkGradient->insertItem((int) Axis::AbsolutePos, tr("Absolute movement (direct position)"), Qt::DisplayRole);
|
||||
chkGradient->setCurrentIndex( axis->interpretation );
|
||||
connect(chkGradient, SIGNAL(activated(int)), this, SLOT( gradientChanged( int )));
|
||||
v2->addWidget(chkGradient);
|
||||
@ -179,7 +179,7 @@ void AxisEdit::throttleChanged( int index ) {
|
||||
void AxisEdit::accept() {
|
||||
axis->interpretation = (Axis::Interpretation)chkGradient->currentIndex();
|
||||
axis->gradient = axis->interpretation != Axis::ZeroOne;
|
||||
axis->absolute = axis->interpretation == Axis::Absolute;
|
||||
axis->absolute = axis->interpretation == Axis::AbsolutePos;
|
||||
axis->maxSpeed = spinSpeed->value();
|
||||
axis->transferCurve = (Axis::TransferCurve)cmbTransferCurve->currentIndex();
|
||||
axis->sensitivity = spinSensitivity->value();
|
||||
|
@ -18,9 +18,9 @@ void sendevent(const FakeEvent &e) {
|
||||
if (e.move.x) rememberX = e.move.x;
|
||||
if (e.move.y) rememberY = e.move.y;
|
||||
const int scaledX100 = rememberX * (XWidthOfScreen(screen)/2) / 100;
|
||||
const int scaledY100 = rememberY * (XHeightOfScreen(screen)/2) / 100;
|
||||
XTestFakeMotionEvent(display, DefaultScreen(display),
|
||||
XWidthOfScreen(screen)/2 + scaledX100,
|
||||
const int scaledY100 = rememberY * (XHeightOfScreen(screen)/2) / 100;
|
||||
XTestFakeMotionEvent(display, DefaultScreen(display),
|
||||
XWidthOfScreen(screen)/2 + scaledX100,
|
||||
XHeightOfScreen(screen)/2 + scaledY100, 0);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user