Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OTicker Class Reference

The OTicker class provides a QLabel widget that scroll its contents. More...

#include </home/clem/local/src/opie/noncore/unsupported/libopie/oticker.h>

Collaboration diagram for OTicker:

Collaboration graph
[legend]
List of all members.

Signals

void mousePressed ()
 signal mouse press event

Public Member Functions

 OTicker (QWidget *parent=0)
 Object constructor.
 ~OTicker ()
 Object destructor.
void setText (const QString &text)
 sets text to be displayed
void setBackgroundColor (const QColor &color)
 sets color of the ticker's background
void setForegroundColor (const QColor &color)
 sets color of text
void setFrame (int style)
 sets frame style
void setUpdateTime (int timeout)
 sets time of update
void setScrollLength (int length)
 sets amount of scrolling default is 1

Protected Member Functions

void timerEvent (QTimerEvent *e)
 timer timeout event
void drawContents (QPainter *p)
 draws widget contents
void mouseReleaseEvent (QMouseEvent *e)
 mouse release event

Private Attributes

QColor backgroundcolor
QColor foregroundcolor
QString scrollText
QPixmap scrollTextPixmap
int pos
int updateTimerTime
int scrollLength

Detailed Description

The OTicker class provides a QLabel widget that scroll its contents.

Definition at line 51 of file oticker.h.


Constructor & Destructor Documentation

OTicker::OTicker QWidget *  parent = 0  ) 
 

Object constructor.

Parameters:
parent Pointer to parent of this control.
Constructs a new OTicker control with parent

Definition at line 40 of file oticker.cpp.

References backgroundcolor, Qt::black, foregroundcolor, Config::readEntry(), Qt::RichText, scrollLength, Config::setGroup(), and updateTimerTime.

OTicker::~OTicker  ) 
 

Object destructor.

Definition at line 52 of file oticker.cpp.


Member Function Documentation

OTicker::drawContents QPainter *  p  )  [protected]
 

draws widget contents

Parameters:
p QPainter. see QPainter

Definition at line 113 of file oticker.cpp.

References pos, scrollTextPixmap, width, and Opie::MM::y.

OTicker::mousePressed  )  [signal]
 

signal mouse press event

Referenced by mouseReleaseEvent().

OTicker::mouseReleaseEvent QMouseEvent *  e  )  [protected]
 

mouse release event

Parameters:
e QMouseEvent. see QMouseEvent.

Definition at line 120 of file oticker.cpp.

References mousePressed().

OTicker::setBackgroundColor const QColor &  color  ) 
 

sets color of the ticker's background

Parameters:
color QColor color to be set.

Definition at line 55 of file oticker.cpp.

References backgroundcolor.

OTicker::setForegroundColor const QColor &  color  ) 
 

sets color of text

Parameters:
color QColor color of text

Definition at line 60 of file oticker.cpp.

References foregroundcolor.

OTicker::setFrame int  style  ) 
 

sets frame style

Parameters:
style int Frame style to be see. See Qt::WidgetFlags.

Definition at line 65 of file oticker.cpp.

OTicker::setScrollLength int  length  ) 
 

sets amount of scrolling default is 1

Parameters:
length int scroll length.

Definition at line 129 of file oticker.cpp.

References scrollLength.

OTicker::setText const QString text  ) 
 

sets text to be displayed

Parameters:
text QString text to be displayed.

Definition at line 70 of file oticker.cpp.

References backgroundcolor, foregroundcolor, QString::length(), pos, printf, qDebug(), scrollText, scrollTextPixmap, and updateTimerTime.

OTicker::setUpdateTime int  timeout  ) 
 

sets time of update

Parameters:
timeout int time in milliseconds between updates.

Definition at line 125 of file oticker.cpp.

References updateTimerTime.

OTicker::timerEvent QTimerEvent *  e  )  [protected]
 

timer timeout event

Parameters:
e QEvent see QEvent.

Definition at line 108 of file oticker.cpp.

References FALSE, pos, scrollLength, and scrollTextPixmap.


Member Data Documentation

QColor OTicker::backgroundcolor [private]
 

Definition at line 142 of file oticker.h.

Referenced by OTicker(), setBackgroundColor(), and setText().

QColor OTicker::foregroundcolor [private]
 

Definition at line 142 of file oticker.h.

Referenced by OTicker(), setForegroundColor(), and setText().

int OTicker::pos [private]
 

Definition at line 145 of file oticker.h.

Referenced by drawContents(), setText(), and timerEvent().

int OTicker::scrollLength [private]
 

Definition at line 145 of file oticker.h.

Referenced by OTicker(), setScrollLength(), and timerEvent().

QString OTicker::scrollText [private]
 

Definition at line 143 of file oticker.h.

Referenced by setText().

QPixmap OTicker::scrollTextPixmap [private]
 

Definition at line 144 of file oticker.h.

Referenced by drawContents(), setText(), and timerEvent().

int OTicker::updateTimerTime [private]
 

Definition at line 145 of file oticker.h.

Referenced by OTicker(), setText(), and setUpdateTime().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:43:42 2005 for OPIE by  doxygen 1.4.2