summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/rohfeedback.cpp2
-rw-r--r--library/backend/rohfeedback.h2
2 files changed, 0 insertions, 4 deletions
diff --git a/library/backend/rohfeedback.cpp b/library/backend/rohfeedback.cpp
index 9a19aac..fa2a636 100644
--- a/library/backend/rohfeedback.cpp
+++ b/library/backend/rohfeedback.cpp
@@ -1,44 +1,43 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifdef OPIE_WITHROHFEEDBACK
21 20
22#include <rohfeedback.h> 21#include <rohfeedback.h>
23#include <stdio.h> 22#include <stdio.h>
24#include <qpeapplication.h> 23#include <qpeapplication.h>
25#include <qevent.h> 24#include <qevent.h>
26#include <resource.h> 25#include <resource.h>
27#include <qpixmap.h> 26#include <qpixmap.h>
28#include <qbitmap.h> 27#include <qbitmap.h>
29 28
30#define SPEED 600 29#define SPEED 600
31#define DELAY 500 30#define DELAY 500
32 31
33namespace Opie { 32namespace Opie {
34namespace Internal { 33namespace Internal {
35/* 34/*
36 35
37 RightOnHold feedback 36 RightOnHold feedback
38 37
39*/ 38*/
40 39
41QPixmap * RoHFeedback::Imgs[NOOFICONS] = { 0, 0, 0, 0, 0 }; 40QPixmap * RoHFeedback::Imgs[NOOFICONS] = { 0, 0, 0, 0, 0 };
42QBitmap * RoHFeedback::Masks[NOOFICONS]; 41QBitmap * RoHFeedback::Masks[NOOFICONS];
43int RoHFeedback::IconWidth; 42int RoHFeedback::IconWidth;
44int RoHFeedback::IconHeight; 43int RoHFeedback::IconHeight;
@@ -120,25 +119,24 @@ void RoHFeedback::iconShow( void ) {
120 Timer.start( SPEED/NOOFICONS ); 119 Timer.start( SPEED/NOOFICONS );
121 break; 120 break;
122 case FeedbackStopped: 121 case FeedbackStopped:
123 // stopped 122 // stopped
124 IconNr = FeedbackTimerStart; 123 IconNr = FeedbackTimerStart;
125 hide(); 124 hide();
126 Timer.stop(); 125 Timer.stop();
127 break; 126 break;
128 case FeedbackShow: // first 127 case FeedbackShow: // first
129 show(); 128 show();
130 // FT 129 // FT
131 default : 130 default :
132 // show 131 // show
133 132
134 setPixmap( *(Imgs[IconNr]) ); 133 setPixmap( *(Imgs[IconNr]) );
135 setMask( *(Masks[IconNr]) ); 134 setMask( *(Masks[IconNr]) );
136 IconNr = (IconNr+1)%NOOFICONS; // rotate 135 IconNr = (IconNr+1)%NOOFICONS; // rotate
137 break; 136 break;
138 } 137 }
139} 138}
140 139
141} 140}
142} 141}
143 142
144#endif
diff --git a/library/backend/rohfeedback.h b/library/backend/rohfeedback.h
index 774ee85..2961d0e 100644
--- a/library/backend/rohfeedback.h
+++ b/library/backend/rohfeedback.h
@@ -1,47 +1,46 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef ROHFEEDBACK_H 20#ifndef ROHFEEDBACK_H
21#define ROHFEEDBACK_H 21#define ROHFEEDBACK_H
22 22
23#ifdef OPIE_WITHROHFEEDBACK
24 23
25/* 24/*
26 25
27 RightOnHold feedback show 26 RightOnHold feedback show
28 27
29*/ 28*/
30 29
31#define NOOFICONS 5 30#define NOOFICONS 5
32 31
33#include <qlabel.h> 32#include <qlabel.h>
34#include <qtimer.h> 33#include <qtimer.h>
35 34
36class QEvent; 35class QEvent;
37class QPixmap; 36class QPixmap;
38class QBitmap; 37class QBitmap;
39class QMouseEvent; 38class QMouseEvent;
40 39
41namespace Opie { 40namespace Opie {
42namespace Internal { 41namespace Internal {
43 42
44class RoHFeedback : public QLabel { 43class RoHFeedback : public QLabel {
45 44
46 Q_OBJECT 45 Q_OBJECT
47 46
@@ -60,25 +59,24 @@ public :
60 void stop( void ); 59 void stop( void );
61 int delay( void ); 60 int delay( void );
62 61
63public slots : 62public slots :
64 63
65 void iconShow( void ); 64 void iconShow( void );
66 65
67protected : 66protected :
68 67
69 bool event( QEvent * E ); 68 bool event( QEvent * E );
70 69
71 QTimer Timer; 70 QTimer Timer;
72 int IconNr; 71 int IconNr;
73 QWidget * Receiver; 72 QWidget * Receiver;
74 73
75 static int IconWidth; 74 static int IconWidth;
76 static int IconHeight; 75 static int IconHeight;
77 static QPixmap * Imgs[NOOFICONS]; 76 static QPixmap * Imgs[NOOFICONS];
78 static QBitmap * Masks[NOOFICONS]; 77 static QBitmap * Masks[NOOFICONS];
79}; 78};
80} 79}
81} 80}
82 81
83#endif 82#endif
84#endif