blob: 92a4be4ce88f32058abbe7c79e7e4ec16cb4a78f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef OTICKER_H
#define OTICKER_H
#include <qwidget.h>
#include <qpainter.h>
#include <qdrawutil.h>
#include <qpixmap.h>
#include <qstring.h>
#include <qslider.h>
#include <qframe.h>
#include <qlineedit.h>
#include <qcolor.h>
class OTicker : public QFrame {
Q_OBJECT
public:
OTicker( QWidget* parent=0 );
~OTicker();
void setText( const QString& text ) ;
void setBackgroundColor(QColor color);
void setForegroundColor(QColor color);
void setFrame(int);
signals:
void mousePressed();
protected:
void timerEvent( QTimerEvent * );
void drawContents( QPainter *p );
void mouseReleaseEvent ( QMouseEvent *);
private:
QColor backgroundcolor, foregroundcolor;
QString scrollText;
QPixmap scrollTextPixmap;
int pos;//, pixelLen;
};
#endif
|