From 62ae8e732a5d4e5b23d060185c0655b1666be59c Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sat, 03 Sep 2005 20:36:38 +0000 Subject: switch to 5-point calibration to make it work on some newer Zaurii this goes hand in hand with the integration of the RMK tslib calibration algorithm into Qt/Embedded 2.3.x. Patch courtesy Richard Purdie. --- (limited to 'core/apps') diff --git a/core/apps/calibrate/calibrate.cpp b/core/apps/calibrate/calibrate.cpp index 5f52bdc..53388f1 100644 --- a/core/apps/calibrate/calibrate.cpp +++ b/core/apps/calibrate/calibrate.cpp @@ -124,7 +124,7 @@ bool Calibrate::sanityCheck() QPoint br = cd.devPoints[QWSPointerCalibrationData::BottomRight]; // not needed anywhere .. just calculate it, so it's there - cd.devPoints[QWSPointerCalibrationData::Center] = QRect( tl, br ).normalize().center(); + //cd.devPoints[QWSPointerCalibrationData::Center] = QRect( tl, br ).normalize().center(); int dlx = QABS( bl. x ( ) - tl. x ( )); int dly = QABS( bl. y ( ) - tl. y ( )); @@ -175,7 +175,7 @@ void Calibrate::moveCrosshair( QPoint pt ) void Calibrate::paintEvent( QPaintEvent * ) { QPainter p( this ); - int y = height() / 3; + int y = height() / 2; p.drawText( 0, y + height() / 8, width(), height() - y, AlignHCenter, tr( "Touch the crosshairs firmly and\n" @@ -223,7 +223,7 @@ void Calibrate::mouseReleaseEvent( QMouseEvent * ) bool doMove = TRUE; cd.devPoints[ location ] = penPos; - if ( location < QWSPointerCalibrationData::TopRight ) { + if ( location < QWSPointerCalibrationData::Center ) { location = (QWSPointerCalibrationData::Location) ( int( location ) + 1 ); } else { -- cgit v0.9.0.2