From 0a141c4a9719aa273867ad45c4293208545489b1 Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 24 Aug 2004 13:38:23 +0000 Subject: Add RightOn Hold Visual Feedback and integrate it into QPEApplication Icons and Config Option will be comitted by WIMPIE --- (limited to 'library/backend/rohfeedback.h') diff --git a/library/backend/rohfeedback.h b/library/backend/rohfeedback.h new file mode 100644 index 0000000..f38a095 --- a/dev/null +++ b/library/backend/rohfeedback.h @@ -0,0 +1,62 @@ +#ifndef ROHFEEDBACK_H +#define ROHFEEDBACK_H + +/* + + RightOnHold feedback show + +*/ + +#define NOOFICONS 5 + +#include +#include + +class QEvent; +class QPixmap; +class QBitmap; +class QMouseEvent; + +namespace Opie { +namespace Internal { + +class RoHFeedback : public QLabel { + + Q_OBJECT + + enum Actions { + FeedbackStopped = -2, + FeedbackTimerStart = -1, + FeedbackShow = 0 + }; +public : + + RoHFeedback(); + ~RoHFeedback(); + + + void init( const QPoint & P, QWidget* wid ); + void stop( void ); + int delay( void ); + +public slots : + + void iconShow( void ); + +protected : + + bool event( QEvent * E ); + + QTimer Timer; + int IconNr; + QWidget * Receiver; + + static int IconWidth; + static int IconHeight; + static QPixmap * Imgs[NOOFICONS]; + static QBitmap * Masks[NOOFICONS]; +}; +} +} + +#endif -- cgit v0.9.0.2