libopie API Documentation

OTicker Class Reference

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

#include <oticker.h>

Inheritance diagram for OTicker:

Inheritance graph
[legend]
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


Detailed Description

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

Definition at line 49 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 47 of file oticker.cpp.

References Config::readEntry(), Config::setGroup(), and QLabel::setTextFormat().

OTicker::~OTicker  ) 
 

Object destructor.

Definition at line 59 of file oticker.cpp.


Member Function Documentation

OTicker::setText const QString text  ) 
 

sets text to be displayed

Parameters:
text QString text to be displayed.

Reimplemented from QLabel.

Definition at line 77 of file oticker.cpp.

References QFrame::contentsRect(), QPainter::drawText(), QPainter::end(), QPixmap::fill(), QWidget::fontMetrics(), QObject::killTimers(), QString::length(), QPainter::setPen(), QObject::startTimer(), and QWidget::update().

OTicker::setBackgroundColor const QColor color  ) 
 

sets color of the ticker's background

Parameters:
color QColor color to be set.

Reimplemented from QWidget.

Definition at line 62 of file oticker.cpp.

References QWidget::update().

OTicker::setForegroundColor const QColor color  ) 
 

sets color of text

Parameters:
color QColor color of text

Definition at line 67 of file oticker.cpp.

References QWidget::update().

OTicker::setFrame int  style  ) 
 

sets frame style

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

Definition at line 72 of file oticker.cpp.

References QFrame::setFrameStyle(), and QWidget::update().

OTicker::setUpdateTime int  timeout  ) 
 

sets time of update

Parameters:
timeout int time in milliseconds between updates.

Definition at line 132 of file oticker.cpp.

OTicker::setScrollLength int  length  ) 
 

sets amount of scrolling default is 1

Parameters:
length int scroll length.

Definition at line 136 of file oticker.cpp.

OTicker::mousePressed  )  [signal]
 

signal mouse press event

Referenced by mouseReleaseEvent().

OTicker::timerEvent QTimerEvent e  )  [protected]
 

timer timeout event

Parameters:
e QEvent see QEvent.

Reimplemented from QObject.

Definition at line 115 of file oticker.cpp.

References QWidget::repaint(), and QPixmap::width().

OTicker::drawContents QPainter p  )  [protected]
 

draws widget contents

Parameters:
p QPainter. see QPainter

Reimplemented from QLabel.

Definition at line 120 of file oticker.cpp.

References QFrame::contentsRect(), QPainter::drawPixmap(), QPixmap::width(), and QWidget::y().

OTicker::mouseReleaseEvent QMouseEvent e  )  [protected]
 

mouse release event

Parameters:
e QMouseEvent. see QMouseEvent.

Reimplemented from QWidget.

Definition at line 127 of file oticker.cpp.

References mousePressed().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:25:04 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001