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

mwindow.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 _mwindow_h
00035 #define _mwindow_h
00036 
00037 #include <qmainwindow.h>
00038 
00039 #include <qpe/applnk.h>
00040 
00041 #include <qaction.h>
00042 
00043 namespace Opie {
00044 namespace Ui {
00045     class OWidgetStack;
00046     class OFileSelector;
00047 }
00048 }
00049 
00050 namespace XINE {
00051     class Lib;
00052 }
00053 
00054 class PlaylistView;
00055 class QToolBar;
00056 class QPopupMenu;
00057 class QMenuBar;
00058 class AudioWidget;
00059 class VideoWidget;
00060 class PlaylistItem;
00061 class QSlider;
00062 
00063 class PMainWindow : public QMainWindow {
00064     Q_OBJECT
00065 public:
00066     static QString appName() { return QString::fromLatin1("opie-mediaplayer3" ); }
00067     static QString appTitle() {return QString::fromLatin1("Opie Mediaplayer 3" ); }
00068     PMainWindow(QWidget*, const char*, WFlags );
00069     virtual ~PMainWindow();
00070 
00071 public slots:
00072     virtual void slotVideoclicked();
00073 protected:
00074 
00075     /* GUI parts */
00076     static const int stack_list = 0;
00077     static const int stack_file = 1;
00078     static const int stack_audio = 2;
00079     static const int stack_video = 3;
00080     Opie::Ui::OWidgetStack *m_stack;
00081     Opie::Ui::OFileSelector*m_sfl;
00082     PlaylistView*m_playList;
00083     AudioWidget*m_AudioPlayer;
00084     VideoWidget*m_VideoPlayer;
00085     QWidget*m_MainBox;
00086     QSlider*m_PosSlider;
00087 
00088     QAction*a_appendFiles,*a_removeFiles,*a_showPlaylist,*a_playAction,*a_stopAction;
00089     QAction*a_playNext,*a_playPrevious,*a_ShowFull,*a_stopPlay,*a_ShowMedia;
00090     QAction*a_addDir,*a_loadPlaylist,*a_savePlaylist;
00091     QAction*a_Scaleup;
00092     QActionGroup*playersGroup,*playlistOnly,*settingsGroup;
00093     QToolBar*m_toolBar;
00094     QPopupMenu *fileMenu,*dispMenu,*playMenu,*configMenu;
00095     QMenuBar*m_menuBar;
00096     XINE::Lib*m_PlayLib;
00097 
00098     void setupActions();
00099     void setupToolBar();
00100     void setupMenu();
00101     void checkLib();
00102     void setupVideo(bool full);
00103     void hideVideo();
00104     bool m_playing:1;
00105     bool m_pressed:1;
00106     int m_uppos;
00107 
00108     int m_CurrentPos;
00109     PlaylistItem*m_LastItem;
00110     void mediaWindowraised();
00111 
00112 protected slots:
00113     virtual void fileSelected(const DocLnk&);
00114     virtual void slotAppendFiles();
00115     virtual void slotRemoveFiles();
00116     virtual void slotShowList();
00117     virtual void slotPlayList();
00118     virtual void slotPlayNext();
00119     virtual void slotPlayPrevious();
00120     virtual void slotPlayCurrent();
00121     virtual void slotStopped();
00122     virtual void slotCheckPos();
00123     virtual void slotToggleFull(bool);
00124     virtual void slotUserStop();
00125     virtual void slotGoNext();
00126     virtual void slotTogglePlay(bool);
00127     virtual void slotShowMediaWindow();
00128     virtual void slotListChanged(int);
00129     virtual void slotNewPos(int pos);
00130     virtual void sliderPressed();
00131     virtual void sliderReleased();
00132     virtual void slot_scaleupToggled(bool);
00133 
00134 
00135 signals:
00136     void sigPos(int);
00137 };
00138 
00139 #endif

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