summaryrefslogtreecommitdiff
path: root/library/backend
Side-by-side diff
Diffstat (limited to 'library/backend') (more/less context) (show whitespace changes)
-rw-r--r--library/backend/rohfeedback.cpp26
-rw-r--r--library/backend/rohfeedback.h3
2 files changed, 16 insertions, 13 deletions
diff --git a/library/backend/rohfeedback.cpp b/library/backend/rohfeedback.cpp
index ff76a36..21aad34 100644
--- a/library/backend/rohfeedback.cpp
+++ b/library/backend/rohfeedback.cpp
@@ -1,4 +1,4 @@
-#include <rohfeedback.h>
-
+#ifdef OPIE_WITHROHFEEDBACK
+#include <rohfeedback.h>
#include <stdio.h>
@@ -37,8 +37,7 @@ RoHFeedback::RoHFeedback() :
for( int i = 0; i < NOOFICONS ; i ++ ) {
- Imgs[i] = new QPixmap( Resource::loadPixmap("RoH/star/"+
- QString::number(i+1) +
- ".png" ));
+ Imgs[i] = new QPixmap( Resource::loadPixmap(
+ "RoH/star/"+ QString::number(i+1) + ".png" ));
Masks[i] = new QBitmap();
- (*Masks[i]) = Resource::loadPixmap("RoH/star/"+QString::number(i+1) +
- ".png" );
+ (*Masks[i]) = Resource::loadPixmap(
+ "RoH/star/"+QString::number(i+1) + "-mask.png" );
}
@@ -68,6 +67,6 @@ void RoHFeedback::init( const QPoint & P, QWidget* wid ) {
Receiver = wid;
- IconNr = -1;
+ IconNr = FeedbackTimerStart;
move( P.x()-IconWidth/2, P.y() - IconHeight/2 );
// to initialize
- Timer.start( DELAY - SPEED/NOOFICONS );
+ Timer.start( DELAY );
}
@@ -75,5 +74,3 @@ void RoHFeedback::init( const QPoint & P, QWidget* wid ) {
void RoHFeedback::stop( void ) {
- IconNr = -2; // stop
- hide();
- Timer.stop();
+ IconNr = FeedbackStopped; // stop
}
@@ -102,3 +99,3 @@ void RoHFeedback::iconShow( void ) {
case FeedbackTimerStart:
- IconNr = 0;
+ IconNr = FeedbackShow;
Timer.start( SPEED/NOOFICONS );
@@ -109,2 +106,3 @@ void RoHFeedback::iconShow( void ) {
hide();
+ Timer.stop();
break;
@@ -125 +123,3 @@ void RoHFeedback::iconShow( void ) {
} \ No newline at end of file
+
+#endif
diff --git a/library/backend/rohfeedback.h b/library/backend/rohfeedback.h
index f38a095..9ffd35a 100644
--- a/library/backend/rohfeedback.h
+++ b/library/backend/rohfeedback.h
@@ -3,2 +3,4 @@
+#ifdef OPIE_WITHROHFEEDBACK
+
/*
@@ -62 +64,2 @@ protected :
#endif
+#endif