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

oticker.h

Go to the documentation of this file.
00001 /*
00002                             This file is part of the Opie Project
00003                              Copyright (c)  2002 L. Potter <ljp@llornkcor.com>
00004                              Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
00005                              
00006               =.
00007             .=l.
00008            .>+-=
00009  _;:,     .>    :=|.         This program is free software; you can
00010 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00011 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00012 .="- .-=="i,     .._         License as published by the Free Software
00013  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00014      ._= =}       :          or (at your option) any later version.
00015     .%`+i>       _;_.
00016     .i_,=:_.      -<s.       This program is distributed in the hope that
00017      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00018     : ..    .:,     . . .    without even the implied warranty of
00019     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00020   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00021 ..}^=.=       =       ;      General Public License for more
00022 ++=   -.     .`     .:       details.
00023  :     =  ...= . :.=-
00024  -.   .:....=;==+<;          You should have received a copy of the GNU
00025   -_. . .   )=.  =           General Public License along with
00026     --        :-=`           this; see the file COPYING.LIB.
00027                              If not, write to the Free Software Foundation,
00028                              Inc., 59 Temple Place - Suite 330,
00029                              Boston, MA 02111-1307, USA.
00030 
00031 */
00032 
00033 #ifndef OTICKER_H
00034 #define OTICKER_H
00035 
00036 #include <qwidget.h>
00037 #include <qpainter.h>
00038 #include <qdrawutil.h>
00039 #include <qpixmap.h>
00040 #include <qstring.h>
00041 #include <qslider.h>
00042 #include <qlabel.h>
00043 #include <qframe.h>
00044 #include <qcolor.h>
00045 
00051 class OTicker : public QLabel {
00052     Q_OBJECT
00053 
00054 public:
00055 
00064     OTicker( QWidget* parent=0 );
00069     ~OTicker();
00076     void setText( const QString& text ) ;
00083     void setBackgroundColor(const QColor& color);
00090     void setForegroundColor(const QColor& color);
00097     void setFrame(int style);
00104     void setUpdateTime(int timeout);
00111     void setScrollLength(int length);
00112 signals:
00118     void mousePressed();
00119 protected:
00126     void timerEvent( QTimerEvent * e);
00133     void drawContents( QPainter *p );
00140     void mouseReleaseEvent( QMouseEvent *e);
00141 private:
00142     QColor backgroundcolor, foregroundcolor;
00143     QString scrollText;
00144     QPixmap scrollTextPixmap;
00145     int pos, updateTimerTime, scrollLength;
00146 };
00147 
00148 #endif

Generated on Sat Nov 5 16:16:30 2005 for OPIE by  doxygen 1.4.2