author | zecke <zecke> | 2005-02-24 21:05:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-02-24 21:05:58 (UTC) |
commit | 8cddb795296ddc1f9bd3203a9441c555a565f476 (patch) (unidiff) | |
tree | 7820686578c4b8dbd3c4b3b56f405f2fb21643d7 | |
parent | 5bb50abc6c40e815714676a4a1505bc393c49b13 (diff) | |
download | opie-8cddb795296ddc1f9bd3203a9441c555a565f476.zip opie-8cddb795296ddc1f9bd3203a9441c555a565f476.tar.gz opie-8cddb795296ddc1f9bd3203a9441c555a565f476.tar.bz2 |
.png will be appened and this way we force Resource to parse all
AppLnks
Stop that and improve speed and memory consumption
-rw-r--r-- | library/backend/rohfeedback.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/backend/rohfeedback.cpp b/library/backend/rohfeedback.cpp index fa2a636..32e77c8 100644 --- a/library/backend/rohfeedback.cpp +++ b/library/backend/rohfeedback.cpp | |||
@@ -33,52 +33,52 @@ namespace Opie { | |||
33 | namespace Internal { | 33 | namespace Internal { |
34 | /* | 34 | /* |
35 | 35 | ||
36 | RightOnHold feedback | 36 | RightOnHold feedback |
37 | 37 | ||
38 | */ | 38 | */ |
39 | 39 | ||
40 | QPixmap * RoHFeedback::Imgs[NOOFICONS] = { 0, 0, 0, 0, 0 }; | 40 | QPixmap * RoHFeedback::Imgs[NOOFICONS] = { 0, 0, 0, 0, 0 }; |
41 | QBitmap * RoHFeedback::Masks[NOOFICONS]; | 41 | QBitmap * RoHFeedback::Masks[NOOFICONS]; |
42 | int RoHFeedback::IconWidth; | 42 | int RoHFeedback::IconWidth; |
43 | int RoHFeedback::IconHeight; | 43 | int RoHFeedback::IconHeight; |
44 | 44 | ||
45 | RoHFeedback::RoHFeedback() : | 45 | RoHFeedback::RoHFeedback() : |
46 | QLabel( 0, 0, Qt::WType_Popup ), Timer() { | 46 | QLabel( 0, 0, Qt::WType_Popup ), Timer() { |
47 | 47 | ||
48 | Receiver = 0l; | 48 | Receiver = 0l; |
49 | connect( &Timer, SIGNAL( timeout() ), this, SLOT( iconShow() ) ); | 49 | connect( &Timer, SIGNAL( timeout() ), this, SLOT( iconShow() ) ); |
50 | 50 | ||
51 | if( Imgs[0] == 0 ) { | 51 | if( Imgs[0] == 0 ) { |
52 | QString S; | 52 | QString S; |
53 | 53 | ||
54 | 54 | ||
55 | for( int i = 0; i < NOOFICONS ; i ++ ) { | 55 | for( int i = 0; i < NOOFICONS ; i ++ ) { |
56 | Imgs[i] = new QPixmap( Resource::loadPixmap( | 56 | Imgs[i] = new QPixmap( Resource::loadPixmap( |
57 | "RoH/star/"+ QString::number(i+1) + ".png" )); | 57 | "RoH/star/"+ QString::number(i+1) )); |
58 | Masks[i] = new QBitmap(); | 58 | Masks[i] = new QBitmap(); |
59 | (*Masks[i]) = Resource::loadPixmap( | 59 | (*Masks[i]) = Resource::loadPixmap( |
60 | "RoH/star/"+QString::number(i+1) + "-mask.png" ); | 60 | "RoH/star/"+QString::number(i+1) + "-mask" ); |
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||
64 | IconWidth = Imgs[0]->size().width(); | 64 | IconWidth = Imgs[0]->size().width(); |
65 | IconHeight = Imgs[0]->size().height(); | 65 | IconHeight = Imgs[0]->size().height(); |
66 | 66 | ||
67 | resize( IconWidth, IconHeight ); | 67 | resize( IconWidth, IconHeight ); |
68 | } | 68 | } |
69 | 69 | ||
70 | int RoHFeedback::delay( void ) { | 70 | int RoHFeedback::delay( void ) { |
71 | return DELAY+SPEED+50; | 71 | return DELAY+SPEED+50; |
72 | } | 72 | } |
73 | 73 | ||
74 | RoHFeedback::~RoHFeedback() { | 74 | RoHFeedback::~RoHFeedback() { |
75 | for ( int i = 0; i < NOOFICONS; ++i ) { | 75 | for ( int i = 0; i < NOOFICONS; ++i ) { |
76 | delete Imgs [i]; | 76 | delete Imgs [i]; |
77 | delete Masks[i]; | 77 | delete Masks[i]; |
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | void RoHFeedback::init( const QPoint & P, QWidget* wid ) { | 81 | void RoHFeedback::init( const QPoint & P, QWidget* wid ) { |
82 | if( ! IconWidth ) | 82 | if( ! IconWidth ) |
83 | return; | 83 | return; |
84 | 84 | ||