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