-rw-r--r-- | libopie/oticker.h | 148 |
1 files changed, 0 insertions, 148 deletions
diff --git a/libopie/oticker.h b/libopie/oticker.h deleted file mode 100644 index 45bf7ce..0000000 --- a/libopie/oticker.h +++ b/dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> | ||
4 | Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
5 | |||
6 | =. | ||
7 | .=l. | ||
8 | .>+-= | ||
9 | _;:, .> :=|. This program is free software; you can | ||
10 | .> <`_, > . <= redistribute it and/or modify it under | ||
11 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
12 | .="- .-=="i, .._ License as published by the Free Software | ||
13 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
14 | ._= =} : or (at your option) any later version. | ||
15 | .%`+i> _;_. | ||
16 | .i_,=:_. -<s. This program is distributed in the hope that | ||
17 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
18 | : .. .:, . . . without even the implied warranty of | ||
19 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
20 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
21 | ..}^=.= = ; General Public License for more | ||
22 | ++= -. .` .: details. | ||
23 | : = ...= . :.=- | ||
24 | -. .:....=;==+<; You should have received a copy of the GNU | ||
25 | -_. . . )=. = General Public License along with | ||
26 | -- :-=` this; see the file COPYING.LIB. | ||
27 | If not, write to the Free Software Foundation, | ||
28 | Inc., 59 Temple Place - Suite 330, | ||
29 | Boston, MA 02111-1307, USA. | ||
30 | |||
31 | */ | ||
32 | |||
33 | #ifndef OTICKER_H | ||
34 | #define OTICKER_H | ||
35 | |||
36 | #include <qwidget.h> | ||
37 | #include <qpainter.h> | ||
38 | #include <qdrawutil.h> | ||
39 | #include <qpixmap.h> | ||
40 | #include <qstring.h> | ||
41 | #include <qslider.h> | ||
42 | #include <qlabel.h> | ||
43 | #include <qframe.h> | ||
44 | #include <qcolor.h> | ||
45 | |||
46 | /** | ||
47 | * @class OTicker | ||
48 | * @brief The OTicker class provides a QLabel widget that scroll its contents | ||
49 | * | ||
50 | */ | ||
51 | class OTicker : public QLabel { | ||
52 | Q_OBJECT | ||
53 | |||
54 | public: | ||
55 | |||
56 | /*! | ||
57 | * @fn OTicker( QWidget* parent = 0 ) | ||
58 | * @brief Object constructor. | ||
59 | * | ||
60 | * @param parent Pointer to parent of this control. | ||
61 | |||
62 | * Constructs a new OTicker control with parent | ||
63 | */ | ||
64 | OTicker( QWidget* parent=0 ); | ||
65 | /*! | ||
66 | * @fn ~OTicker() | ||
67 | * @brief Object destructor. | ||
68 | */ | ||
69 | ~OTicker(); | ||
70 | /*! | ||
71 | * @fn setText(const QString& ) | ||
72 | * @brief sets text to be displayed | ||
73 | * @param text QString text to be displayed. | ||
74 | * | ||
75 | */ | ||
76 | void setText( const QString& text ) ; | ||
77 | /*! | ||
78 | * @fn setBackgroundColor(const QColor& color) | ||
79 | * @brief sets color of the ticker's background | ||
80 | * @param color QColor color to be set. | ||
81 | * | ||
82 | */ | ||
83 | void setBackgroundColor(const QColor& color); | ||
84 | /*! | ||
85 | * @fn setForegroundColor(const QColor& color) | ||
86 | * @brief sets color of text | ||
87 | * @param color QColor color of text | ||
88 | * | ||
89 | */ | ||
90 | void setForegroundColor(const QColor& color); | ||
91 | /*! | ||
92 | * @fn setFrame(int style) | ||
93 | * @brief sets frame style | ||
94 | * @param style int Frame style to be see. See Qt::WidgetFlags. | ||
95 | * | ||
96 | */ | ||
97 | void setFrame(int style); | ||
98 | /*! | ||
99 | * @fn setUpdateTime(int timeout) | ||
100 | * @brief sets time of update | ||
101 | * @param timeout int time in milliseconds between updates. | ||
102 | * | ||
103 | */ | ||
104 | void setUpdateTime(int timeout); | ||
105 | /*! | ||
106 | * @fn setScrollLength(int length) | ||
107 | * @brief sets amount of scrolling default is 1 | ||
108 | * @param length int scroll length. | ||
109 | * | ||
110 | */ | ||
111 | void setScrollLength(int length); | ||
112 | signals: | ||
113 | /*! | ||
114 | * @fn mousePressed() | ||
115 | * @brief signal mouse press event | ||
116 | * | ||
117 | */ | ||
118 | void mousePressed(); | ||
119 | protected: | ||
120 | /*! | ||
121 | * @fn timerEvent( QTimerEvent * e) | ||
122 | * @brief timer timeout event | ||
123 | * @param e QEvent see QEvent. | ||
124 | * | ||
125 | */ | ||
126 | void timerEvent( QTimerEvent * e); | ||
127 | /*! | ||
128 | * @fn drawContents( QPainter *p ) | ||
129 | * @brief draws widget contents | ||
130 | * @param p QPainter. see QPainter | ||
131 | * | ||
132 | */ | ||
133 | void drawContents( QPainter *p ); | ||
134 | /*! | ||
135 | * @fn mouseReleaseEvent( QMouseEvent *e) | ||
136 | * @brief mouse release event | ||
137 | * @param e QMouseEvent. see QMouseEvent. | ||
138 | * | ||
139 | */ | ||
140 | void mouseReleaseEvent( QMouseEvent *e); | ||
141 | private: | ||
142 | QColor backgroundcolor, foregroundcolor; | ||
143 | QString scrollText; | ||
144 | QPixmap scrollTextPixmap; | ||
145 | int pos, updateTimerTime, scrollLength; | ||
146 | }; | ||
147 | |||
148 | #endif | ||