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

audiowidget.h

Go to the documentation of this file.
00001 /*
00002                             This file is part of the Opie Project
00003 
00004                              Copyright (c)  2002 Max Reiss <harlekin@handhelds.org>
00005                              Copyright (c)  2002 L. Potter <ljp@llornkcor.com>
00006                              Copyright (c)  2002 Holger Freyther <zecke@handhelds.org>
00007               =.
00008             .=l.
00009            .>+-=
00010  _;:,     .>    :=|.         This program is free software; you can
00011 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00012 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00013 .="- .-=="i,     .._         License as published by the Free Software
00014  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00015      ._= =}       :          or (at your option) any later version.
00016     .%`+i>       _;_.
00017     .i_,=:_.      -<s.       This program is distributed in the hope that
00018      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00019     : ..    .:,     . . .    without even the implied warranty of
00020     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00021   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00022 ..}^=.=       =       ;      Library General Public License for more
00023 ++=   -.     .`     .:       details.
00024  :     =  ...= . :.=-
00025  -.   .:....=;==+<;          You should have received a copy of the GNU
00026   -_. . .   )=.  =           Library General Public License along with
00027     --        :-=`           this library; see the file COPYING.LIB.
00028                              If not, write to the Free Software Foundation,
00029                              Inc., 59 Temple Place - Suite 330,
00030                              Boston, MA 02111-1307, USA.
00031 
00032 */
00033 
00034 #ifndef AUDIO_WIDGET_H
00035 #define AUDIO_WIDGET_H
00036 
00037 #include <qlineedit.h>
00038 
00039 #include <opie2/oticker.h>
00040 
00041 #include "mediawidget.h"
00042 
00043 class QPixmap;
00044 
00045 class AudioWidget : public MediaWidget {
00046     Q_OBJECT
00047 public:
00048     AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
00049     ~AudioWidget();
00050     void setTickerText( const QString &text ) { songInfo.setText( text ); }
00051 
00052     static MediaWidget::GUIInfo guiInfo();
00053 
00054 public slots:
00055     void updateSlider( long, long );
00056     void sliderPressed( );
00057     void sliderReleased( );
00058     void setLooping( bool b) { setToggleButton( Loop, b ); }
00059     void setPosition( long );
00060     void setSeekable( bool );
00061 
00062 public:
00063     virtual void setLength( long );
00064     virtual void setPlaying( bool b) { setToggleButton( Play, b ); }
00065     virtual void setDisplayType( MediaPlayerState::DisplayType displayType );
00066 
00067     virtual void loadSkin();
00068 
00069 signals:
00070     void sliderMoved(long);
00071 
00072 protected:
00073     void doBlank();
00074     void doUnblank();
00075     void resizeEvent( QResizeEvent *re );
00076     void timerEvent( QTimerEvent *event );
00077     void keyReleaseEvent( QKeyEvent *e);
00078 private slots:
00079     void skipFor();
00080     void skipBack();
00081     void stopSkip();
00082 private:
00083     int skipDirection;
00084     QString skin;
00085 
00086     Opie::Ui::OTicker  songInfo;
00087     QSlider slider;
00088     QLineEdit time;
00089     bool isStreaming : 1;
00090     bool audioSliderBeingMoved : 1;
00091 };
00092 
00093 
00094 #endif // AUDIO_WIDGET_H
00095 

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