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                                                                                                                  and Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
00005               =.
00006             .=l.
00007            .>+-=
00008  _;:,     .>    :=|.         This program is free software; you can
00009 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00010 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00011 .="- .-=="i,     .._         License as published by the Free Software
00012  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00013      ._= =}       :          or (at your option) any later version.
00014     .%`+i>       _;_.
00015     .i_,=:_.      -<s.       This program is distributed in the hope that
00016      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00017     : ..    .:,     . . .    without even the implied warranty of
00018     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00019   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00020 ..}^=.=       =       ;      Library General Public License for more
00021 ++=   -.     .`     .:       details.
00022  :     =  ...= . :.=-
00023  -.   .:....=;==+<;          You should have received a copy of the GNU
00024   -_. . .   )=.  =           General Public License along with
00025     --        :-=`           this library; see the file COPYING.LIB.
00026                              If not, write to the Free Software Foundation,
00027                              Inc., 59 Temple Place - Suite 330,
00028                              Boston, MA 02111-1307, USA.
00029 
00030 */
00031 
00032 #ifndef OTICKER_H
00033 #define OTICKER_H
00034 
00035 #include <qwidget.h>
00036 #include <qpainter.h>
00037 #include <qdrawutil.h>
00038 #include <qpixmap.h>
00039 #include <qstring.h>
00040 #include <qslider.h>
00041 #include <qlabel.h>
00042 #include <qframe.h>
00043 #include <qcolor.h>
00044 
00045 
00046 namespace Opie {
00047 namespace Ui   {
00053 class OTicker : public QLabel {
00054     Q_OBJECT
00055 
00056 public:
00057 
00066     OTicker( QWidget* parent=0 );
00071     ~OTicker();
00078     void setText( const QString& text ) ;
00085     void setBackgroundColor(const QColor& color);
00092     void setForegroundColor(const QColor& color);
00099     void setFrame(int style);
00106     void setUpdateTime(int timeout);
00113     void setScrollLength(int length);
00114 signals:
00120     void mousePressed();
00121 protected:
00128     void timerEvent( QTimerEvent * e);
00135     void drawContents( QPainter *p );
00142     void mouseReleaseEvent( QMouseEvent *e);
00143 private:
00144     QColor backgroundcolor, foregroundcolor;
00145     QString scrollText;
00146     QPixmap scrollTextPixmap;
00147     int pos, updateTimerTime, scrollLength;
00148 };
00149 
00150 }
00151 }
00152 #endif

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