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 | |
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 :(
-rw-r--r-- | core/apps/calibrate/calibrate.cpp | 27 | ||||
-rw-r--r-- | core/apps/calibrate/calibrate.h | 6 |
2 files changed, 29 insertions, 4 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 } @@ -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]; @@ -148,2 +162,5 @@ 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_ diff --git a/core/apps/calibrate/calibrate.h b/core/apps/calibrate/calibrate.h index 97108c9..06aa0c9 100644 --- a/core/apps/calibrate/calibrate.h +++ b/core/apps/calibrate/calibrate.h @@ -22,3 +22,3 @@ -#if defined(Q_WS_QWS) || defined(_WS_QWS_) +//#if defined(Q_WS_QWS) || defined(_WS_QWS_) @@ -54,4 +54,6 @@ private: QPixmap logo; +#ifdef QWS QWSPointerCalibrationData goodcd,cd; QWSPointerCalibrationData::Location location; +#endif QPoint crossPos; @@ -65,3 +67,3 @@ private: -#endif // _WS_QWS_ +//#endif // _WS_QWS_ |