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

playlistwidgetgui.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 ..}^=.=    =    ;      General Public License for more
00023 ++=  -.   .`   .:       details.
00024 :   = ...= . :.=-
00025 -.  .:....=;==+<;          You should have received a copy of the GNU
00026  -_. . .  )=. =           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 PLAY_LIST_WIDGET_GUI_H
00035 #define PLAY_LIST_WIDGET_GUI_H
00036 
00037 #include <qmainwindow.h>
00038 
00039 #include <opie2/oresource.h>
00040 
00041 #include <qpe/qpeapplication.h>
00042 #include <qpe/fileselector.h>
00043 
00044 #include <qtabwidget.h>
00045 #include <qaction.h>
00046 #include <qtoolbutton.h>
00047 #include <qslider.h>
00048 #include <qlcdnumber.h>
00049 
00050 class PlayListWidgetPrivate;
00051 class PlayListSelection;
00052 class MediaPlayerState;
00053 class PlayListFileView;
00054 
00055 class Config;
00056 class QToolBar;
00057 class QListViewItem;
00058 class QListView;
00059 class QPoint;
00060 class QAction;
00061 class QLabel;
00062 
00063 class PlayListWidgetPrivate {
00064 public:
00065     QToolButton *tbPlay, *tbFull, *tbLoop,  *tbShuffle, *tbAddToList,  *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove;
00066     QFrame *playListFrame;
00067     PlayListSelection *selectedFiles;
00068     bool setDocumentUsed;
00069 };
00070 
00071 
00072 class ToolButton : public QToolButton {
00073     Q_OBJECT
00074 public:
00075     ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
00076         : QToolButton( parent, name ) {
00077         setTextLabel( name );
00078         setUsesBigPixmap( qApp->desktop()->size().width() > 330 );
00079         setPixmap( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ) );
00080         setAutoRaise( TRUE );
00081         setFocusPolicy( QWidget::NoFocus );
00082         setToggleButton( t );
00083         connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
00084     }
00085 };
00086 
00087 class MenuItem : public QAction {
00088 
00089 public:
00090     MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot )
00091         : QAction( text, QString::null, 0, 0 ) {
00092         connect( this, SIGNAL( activated() ), handler, slot );
00093         addTo( parent );
00094     }
00095 };
00096 
00097 class PlayListWidgetGui : public QMainWindow {
00098     Q_OBJECT
00099 public:
00100     PlayListWidgetGui( QWidget* parent=0, const char* name=0 );
00101     ~PlayListWidgetGui();
00102 
00103 protected:
00104     QTabWidget * tabWidget;
00105     PlayListFileView *audioView, *videoView;
00106     QListView *playlistView;
00107     QLabel *libString;
00108     QPopupMenu *pmView ;
00109     QPopupMenu *gammaMenu;
00110     QSlider *gammaSlider;
00111     QLCDNumber *gammaLCD;
00112     bool fromSetDocument;
00113     bool insanityBool;
00114     QString setDocFileRef;
00115     // retrieve the current playlist entry (media file link)
00116     QPushButton *tbDeletePlaylist;
00117     int selected;
00118     QPopupMenu *pmPlayList;
00119     FileSelector*  playLists;
00120     QPopupMenu *skinsMenu;
00121     PlayListWidgetPrivate *d; // Private implementation data
00122     QVBox *vbox1;
00123     QVBox *vbox5;
00124     QToolBar *bar;
00125     QWidget *playListTab;
00126     void setActiveWindow(); // need to handle this to show the right view
00127     void setView( char );
00128 
00129     MediaPlayerState *mediaPlayerState;
00130 };
00131 
00132 #endif
00133 

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