Diffstat (limited to 'library/backend/rohfeedback.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | library/backend/rohfeedback.cpp | 28 |
1 files changed, 14 insertions, 14 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,5 +1,5 @@ | |||
1 | #include <rohfeedback.h> | 1 | #ifdef OPIE_WITHROHFEEDBACK |
2 | |||
3 | 2 | ||
3 | #include <rohfeedback.h> | ||
4 | #include <stdio.h> | 4 | #include <stdio.h> |
5 | #include <qpeapplication.h> | 5 | #include <qpeapplication.h> |
@@ -36,10 +36,9 @@ RoHFeedback::RoHFeedback() : | |||
36 | 36 | ||
37 | for( int i = 0; i < NOOFICONS ; i ++ ) { | 37 | for( int i = 0; i < NOOFICONS ; i ++ ) { |
38 | Imgs[i] = new QPixmap( Resource::loadPixmap("RoH/star/"+ | 38 | Imgs[i] = new QPixmap( Resource::loadPixmap( |
39 | QString::number(i+1) + | 39 | "RoH/star/"+ QString::number(i+1) + ".png" )); |
40 | ".png" )); | ||
41 | Masks[i] = new QBitmap(); | 40 | Masks[i] = new QBitmap(); |
42 | (*Masks[i]) = Resource::loadPixmap("RoH/star/"+QString::number(i+1) + | 41 | (*Masks[i]) = Resource::loadPixmap( |
43 | ".png" ); | 42 | "RoH/star/"+QString::number(i+1) + "-mask.png" ); |
44 | } | 43 | } |
45 | } | 44 | } |
@@ -67,14 +66,12 @@ void RoHFeedback::init( const QPoint & P, QWidget* wid ) { | |||
67 | 66 | ||
68 | Receiver = wid; | 67 | Receiver = wid; |
69 | IconNr = -1; | 68 | IconNr = FeedbackTimerStart; |
70 | move( P.x()-IconWidth/2, P.y() - IconHeight/2 ); | 69 | move( P.x()-IconWidth/2, P.y() - IconHeight/2 ); |
71 | // to initialize | 70 | // to initialize |
72 | Timer.start( DELAY - SPEED/NOOFICONS ); | 71 | Timer.start( DELAY ); |
73 | } | 72 | } |
74 | 73 | ||
75 | void RoHFeedback::stop( void ) { | 74 | void RoHFeedback::stop( void ) { |
76 | IconNr = -2; // stop | 75 | IconNr = FeedbackStopped; // stop |
77 | hide(); | ||
78 | Timer.stop(); | ||
79 | } | 76 | } |
80 | 77 | ||
@@ -101,5 +98,5 @@ void RoHFeedback::iconShow( void ) { | |||
101 | switch( IconNr ) { | 98 | switch( IconNr ) { |
102 | case FeedbackTimerStart: | 99 | case FeedbackTimerStart: |
103 | IconNr = 0; | 100 | IconNr = FeedbackShow; |
104 | Timer.start( SPEED/NOOFICONS ); | 101 | Timer.start( SPEED/NOOFICONS ); |
105 | break; | 102 | break; |
@@ -108,4 +105,5 @@ void RoHFeedback::iconShow( void ) { | |||
108 | IconNr = FeedbackTimerStart; | 105 | IconNr = FeedbackTimerStart; |
109 | hide(); | 106 | hide(); |
107 | Timer.stop(); | ||
110 | break; | 108 | break; |
111 | case FeedbackShow: // first | 109 | case FeedbackShow: // first |
@@ -123,3 +121,5 @@ void RoHFeedback::iconShow( void ) { | |||
123 | 121 | ||
124 | } | 122 | } |
125 | } \ No newline at end of file | 123 | } |
124 | |||
125 | #endif | ||