00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
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
00116 QPushButton *tbDeletePlaylist;
00117 int selected;
00118 QPopupMenu *pmPlayList;
00119 FileSelector* playLists;
00120 QPopupMenu *skinsMenu;
00121 PlayListWidgetPrivate *d;
00122 QVBox *vbox1;
00123 QVBox *vbox5;
00124 QToolBar *bar;
00125 QWidget *playListTab;
00126 void setActiveWindow();
00127 void setView( char );
00128
00129 MediaPlayerState *mediaPlayerState;
00130 };
00131
00132 #endif
00133