-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | core/apps/calibrate/calibrate.cpp | 6 |
2 files changed, 5 insertions, 4 deletions
@@ -52,33 +52,34 @@ | |||
52 | 52 | ||
53 | 53 | ||
54 | Internal | 54 | Internal |
55 | -------- | 55 | -------- |
56 | * Make BluezApplet use OTaskbarApplet (mickeyl) | 56 | * Make BluezApplet use OTaskbarApplet (mickeyl) |
57 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) | 57 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) |
58 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) | 58 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) |
59 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) | 59 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) |
60 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) | 60 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) |
61 | * libopienet: Miscellaneous API cleanups (mickeyl) | 61 | * libopienet: Miscellaneous API cleanups (mickeyl) |
62 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) | 62 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) |
63 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) | 63 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) |
64 | * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) | 64 | * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) |
65 | * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) | 65 | * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) |
66 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) | 66 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) |
67 | * Fix / Optimize number of scanned directories (ljp) | 67 | * Fix / Optimize number of scanned directories (ljp) |
68 | 68 | * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) | |
69 | |||
69 | 2005-03-25Opie 1.2.0 | 70 | 2005-03-25Opie 1.2.0 |
70 | 71 | ||
71 | Fixed Bugs | 72 | Fixed Bugs |
72 | ---------- | 73 | ---------- |
73 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 74 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
74 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 75 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
75 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 76 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
76 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 77 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
77 | * n.a.- make qpeglobal.h include qglobal.h (zecke) | 78 | * n.a.- make qpeglobal.h include qglobal.h (zecke) |
78 | 79 | ||
79 | 2005-03-20Opie 1.2.0-rc1 | 80 | 2005-03-20Opie 1.2.0-rc1 |
80 | 81 | ||
81 | 82 | ||
82 | New Features | 83 | New Features |
83 | ------------ | 84 | ------------ |
84 | * Launcher: Support a static background pixmap (mickeyl) | 85 | * Launcher: Support a static background pixmap (mickeyl) |
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 | |||
@@ -111,33 +111,33 @@ QPoint Calibrate::fromDevice( const QPoint &p ) | |||
111 | return qt_screen->mapFromDevice ( p, QSize( qt_screen->deviceWidth ( ), qt_screen->deviceHeight() ) ); | 111 | return qt_screen->mapFromDevice ( p, QSize( qt_screen->deviceWidth ( ), qt_screen->deviceHeight() ) ); |
112 | #else | 112 | #else |
113 | return QPoint(); | 113 | return QPoint(); |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | } | 116 | } |
117 | 117 | ||
118 | bool Calibrate::sanityCheck() | 118 | bool Calibrate::sanityCheck() |
119 | { | 119 | { |
120 | #ifdef QWS | 120 | #ifdef QWS |
121 | QPoint tl = cd.devPoints[QWSPointerCalibrationData::TopLeft]; | 121 | QPoint tl = cd.devPoints[QWSPointerCalibrationData::TopLeft]; |
122 | QPoint tr = cd.devPoints[QWSPointerCalibrationData::TopRight]; | 122 | QPoint tr = cd.devPoints[QWSPointerCalibrationData::TopRight]; |
123 | QPoint bl = cd.devPoints[QWSPointerCalibrationData::BottomLeft]; | 123 | QPoint bl = cd.devPoints[QWSPointerCalibrationData::BottomLeft]; |
124 | QPoint br = cd.devPoints[QWSPointerCalibrationData::BottomRight]; | 124 | QPoint br = cd.devPoints[QWSPointerCalibrationData::BottomRight]; |
125 | 125 | ||
126 | // not needed anywhere .. just calculate it, so it's there | 126 | // not needed anywhere .. just calculate it, so it's there |
127 | cd.devPoints[QWSPointerCalibrationData::Center] = QRect( tl, br ).normalize().center(); | 127 | //cd.devPoints[QWSPointerCalibrationData::Center] = QRect( tl, br ).normalize().center(); |
128 | 128 | ||
129 | int dlx = QABS( bl. x ( ) - tl. x ( )); | 129 | int dlx = QABS( bl. x ( ) - tl. x ( )); |
130 | int dly = QABS( bl. y ( ) - tl. y ( )); | 130 | int dly = QABS( bl. y ( ) - tl. y ( )); |
131 | int drx = QABS( br. x ( ) - tr. x ( )); | 131 | int drx = QABS( br. x ( ) - tr. x ( )); |
132 | int dry = QABS( br. y ( ) - tr. y ( )); | 132 | int dry = QABS( br. y ( ) - tr. y ( )); |
133 | int dtx = QABS( tr. x ( ) - tl. x ( )); | 133 | int dtx = QABS( tr. x ( ) - tl. x ( )); |
134 | int dty = QABS( tr. y ( ) - tl. y ( )); | 134 | int dty = QABS( tr. y ( ) - tl. y ( )); |
135 | int dbx = QABS( br. x ( ) - bl. x ( )); | 135 | int dbx = QABS( br. x ( ) - bl. x ( )); |
136 | int dby = QABS( br. y ( ) - bl. y ( )); | 136 | int dby = QABS( br. y ( ) - bl. y ( )); |
137 | 137 | ||
138 | int dl = (int) ::sqrt (( dlx * dlx ) + ( dly * dly )); // calculate vector lengths for all sides | 138 | int dl = (int) ::sqrt (( dlx * dlx ) + ( dly * dly )); // calculate vector lengths for all sides |
139 | int dr = (int) ::sqrt (( drx * drx ) + ( dry * dry )); | 139 | int dr = (int) ::sqrt (( drx * drx ) + ( dry * dry )); |
140 | int dt = (int) ::sqrt (( dtx * dtx ) + ( dty * dty )); | 140 | int dt = (int) ::sqrt (( dtx * dtx ) + ( dty * dty )); |
141 | int db = (int) ::sqrt (( dbx * dbx ) + ( dby * dby )); | 141 | int db = (int) ::sqrt (( dbx * dbx ) + ( dby * dby )); |
142 | 142 | ||
143 | // Calculate leeway for x/y (we do not care if diff1/diff2 is for x or y here !) | 143 | // Calculate leeway for x/y (we do not care if diff1/diff2 is for x or y here !) |
@@ -162,33 +162,33 @@ bool Calibrate::sanityCheck() | |||
162 | return true; | 162 | return true; |
163 | #endif | 163 | #endif |
164 | } | 164 | } |
165 | 165 | ||
166 | void Calibrate::moveCrosshair( QPoint pt ) | 166 | void Calibrate::moveCrosshair( QPoint pt ) |
167 | { | 167 | { |
168 | showCross = FALSE; | 168 | showCross = FALSE; |
169 | repaint( crossPos.x() - 14, crossPos.y() - 14, 28, 28 ); | 169 | repaint( crossPos.x() - 14, crossPos.y() - 14, 28, 28 ); |
170 | showCross = TRUE; | 170 | showCross = TRUE; |
171 | crossPos = pt; | 171 | crossPos = pt; |
172 | repaint( crossPos.x() - 14, crossPos.y() - 14, 28, 28 ); | 172 | repaint( crossPos.x() - 14, crossPos.y() - 14, 28, 28 ); |
173 | } | 173 | } |
174 | 174 | ||
175 | void Calibrate::paintEvent( QPaintEvent * ) | 175 | void Calibrate::paintEvent( QPaintEvent * ) |
176 | { | 176 | { |
177 | QPainter p( this ); | 177 | QPainter p( this ); |
178 | int y = height() / 3; | 178 | int y = height() / 2; |
179 | 179 | ||
180 | p.drawText( 0, y + height() / 8, width(), height() - y, AlignHCenter, | 180 | p.drawText( 0, y + height() / 8, width(), height() - y, AlignHCenter, |
181 | tr( "Touch the crosshairs firmly and\n" | 181 | tr( "Touch the crosshairs firmly and\n" |
182 | "accurately to calibrate your screen." ) ); | 182 | "accurately to calibrate your screen." ) ); |
183 | 183 | ||
184 | if ( !showCross ) return; | 184 | if ( !showCross ) return; |
185 | 185 | ||
186 | #if 0 | 186 | #if 0 |
187 | if ( crosshair.isNull() ) { | 187 | if ( crosshair.isNull() ) { |
188 | #endif | 188 | #endif |
189 | p.setPen( QColor( 0, 0, 155 ) ); | 189 | p.setPen( QColor( 0, 0, 155 ) ); |
190 | p.drawEllipse( crossPos.x()-8, crossPos.y()-8, 16, 16 ); | 190 | p.drawEllipse( crossPos.x()-8, crossPos.y()-8, 16, 16 ); |
191 | p.setPen( QColor( 250, 220, 220 ) ); | 191 | p.setPen( QColor( 250, 220, 220 ) ); |
192 | p.drawRoundRect( crossPos.x()-12, crossPos.y()-12, 24, 24, 75, 75 ); | 192 | p.drawRoundRect( crossPos.x()-12, crossPos.y()-12, 24, 24, 75, 75 ); |
193 | p.setPen( QColor( 0, 0, 120 ) ); | 193 | p.setPen( QColor( 0, 0, 120 ) ); |
194 | p.drawRect( crossPos.x() - 1, crossPos.y() - 14, 2, 13 ); | 194 | p.drawRect( crossPos.x() - 1, crossPos.y() - 14, 2, 13 ); |
@@ -210,33 +210,33 @@ void Calibrate::mousePressEvent( QMouseEvent *e ) | |||
210 | penPos = devPos; | 210 | penPos = devPos; |
211 | else | 211 | else |
212 | penPos = QPoint( ( penPos.x() + devPos.x() ) / 2, | 212 | penPos = QPoint( ( penPos.x() + devPos.x() ) / 2, |
213 | ( penPos.y() + devPos.y() ) / 2 ); | 213 | ( penPos.y() + devPos.y() ) / 2 ); |
214 | #endif | 214 | #endif |
215 | } | 215 | } |
216 | 216 | ||
217 | void Calibrate::mouseReleaseEvent( QMouseEvent * ) | 217 | void Calibrate::mouseReleaseEvent( QMouseEvent * ) |
218 | { | 218 | { |
219 | #ifdef QWS | 219 | #ifdef QWS |
220 | if ( timer->isActive() ) | 220 | if ( timer->isActive() ) |
221 | return ; | 221 | return ; |
222 | 222 | ||
223 | bool doMove = TRUE; | 223 | bool doMove = TRUE; |
224 | 224 | ||
225 | cd.devPoints[ location ] = penPos; | 225 | cd.devPoints[ location ] = penPos; |
226 | if ( location < QWSPointerCalibrationData::TopRight ) { | 226 | if ( location < QWSPointerCalibrationData::Center ) { |
227 | location = (QWSPointerCalibrationData::Location) ( int( location ) + 1 ); | 227 | location = (QWSPointerCalibrationData::Location) ( int( location ) + 1 ); |
228 | } | 228 | } |
229 | else { | 229 | else { |
230 | if ( sanityCheck() ) { | 230 | if ( sanityCheck() ) { |
231 | reset(); | 231 | reset(); |
232 | goodcd = cd; | 232 | goodcd = cd; |
233 | hide(); | 233 | hide(); |
234 | emit accept(); | 234 | emit accept(); |
235 | doMove = FALSE; | 235 | doMove = FALSE; |
236 | } | 236 | } |
237 | else { | 237 | else { |
238 | location = QWSPointerCalibrationData::TopLeft; | 238 | location = QWSPointerCalibrationData::TopLeft; |
239 | } | 239 | } |
240 | } | 240 | } |
241 | 241 | ||
242 | if ( doMove ) { | 242 | if ( doMove ) { |