author | zecke <zecke> | 2002-10-17 17:03:21 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-17 17:03:21 (UTC) |
commit | d7cdf9468af510848688584caf34cb1cc03b8562 (patch) (side-by-side diff) | |
tree | dfd7a19eec935385262ad003883dd7d384872bbd /core/apps/calibrate/calibrate.cpp | |
parent | 0655456f68849bfad9019a7760dec961792d7519 (diff) | |
download | opie-d7cdf9468af510848688584caf34cb1cc03b8562.zip opie-d7cdf9468af510848688584caf34cb1cc03b8562.tar.gz opie-d7cdf9468af510848688584caf34cb1cc03b8562.tar.bz2 |
stupid #ifdefs around Calibrate...
tell moc to ignore them or put them inside the methods :(
Diffstat (limited to 'core/apps/calibrate/calibrate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/calibrate/calibrate.cpp | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/core/apps/calibrate/calibrate.cpp b/core/apps/calibrate/calibrate.cpp index a5f8792..e079195 100644 --- a/core/apps/calibrate/calibrate.cpp +++ b/core/apps/calibrate/calibrate.cpp @@ -28,3 +28,3 @@ -#if defined(Q_WS_QWS) || defined(_WS_QWS_) +//#if defined(Q_WS_QWS) || defined(_WS_QWS_) @@ -39,2 +39,3 @@ Calibrate::Calibrate( QWidget* parent, const char * name, WFlags wf ) : { +#ifdef QWS showCross = TRUE; @@ -60,2 +61,3 @@ Calibrate::Calibrate( QWidget* parent, const char * name, WFlags wf ) : connect( timer, SIGNAL( timeout() ), this, SLOT( timeout() ) ); +#endif } @@ -69,2 +71,3 @@ void Calibrate::show() { +#ifdef QWS grabMouse(); @@ -73,2 +76,3 @@ void Calibrate::show() QDialog::show(); +#endif } @@ -77,3 +81,5 @@ void Calibrate::store() { +#ifdef QWS QWSServer::mouseHandler() ->calibrate( &goodcd ); +#endif } @@ -89,3 +95,3 @@ void Calibrate::hide() e << QString ( "calibrate" ); - } + } } @@ -96,2 +102,3 @@ void Calibrate::reset() { +#ifdef QWS penPos = QPoint(); @@ -99,2 +106,3 @@ void Calibrate::reset() crossPos = fromDevice( cd.screenPoints[ location ] ); +#endif } @@ -103,3 +111,8 @@ QPoint Calibrate::fromDevice( const QPoint &p ) { +#ifdef QWS return qt_screen->mapFromDevice ( p, QSize( qt_screen->deviceWidth ( ), qt_screen->deviceHeight() ) ); +#else + return QPoint(); +#endif + } @@ -108,2 +121,3 @@ bool Calibrate::sanityCheck() { +#ifdef QWS QPoint tl = cd.devPoints[QWSPointerCalibrationData::TopLeft]; @@ -129,4 +143,4 @@ bool Calibrate::sanityCheck() int db = (int) ::sqrt (( dbx * dbx ) + ( dby * dby )); - - // Calculate leeway for x/y (we do not care if diff1/diff2 is for x or y here !) + + // Calculate leeway for x/y (we do not care if diff1/diff2 is for x or y here !) int diff1 = QABS( dl - dr ); @@ -139,3 +153,3 @@ bool Calibrate::sanityCheck() // It needs to be performed only for the triange (bl, tl, tr) - int diff3 = QABS(( dlx + dly + dtx + dty ) - ( dl + dt )); + int diff3 = QABS(( dlx + dly + dtx + dty ) - ( dl + dt )); int avg3 = (( dlx + dly + dtx + dty ) + ( dl + dt )) / 2; @@ -148,3 +162,6 @@ bool Calibrate::sanityCheck() return true; -} +#else +return true; +#endif +} @@ -192,2 +209,3 @@ void Calibrate::mousePressEvent( QMouseEvent *e ) { +#ifdef QWS // map to device coordinates @@ -199,2 +217,3 @@ void Calibrate::mousePressEvent( QMouseEvent *e ) ( penPos.y() + devPos.y() ) / 2 ); +#endif } @@ -203,2 +222,3 @@ void Calibrate::mouseReleaseEvent( QMouseEvent * ) { +#ifdef QWS if ( timer->isActive() ) @@ -231,2 +251,3 @@ void Calibrate::mouseReleaseEvent( QMouseEvent * ) } +#endif } @@ -235,2 +256,3 @@ void Calibrate::timeout() { +#ifdef QWS QPoint target = fromDevice( cd.screenPoints[ location ] ); @@ -257,4 +279,5 @@ void Calibrate::timeout() moveCrosshair( newPos ); +#endif } -#endif // _WS_QWS_ +//#endif // _WS_QWS_ |