actions_manager.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Controller.hpp : Controller for the main interface
00003  ****************************************************************************
00004  * Copyright (C) 2006-2008 the VideoLAN team
00005  * $Id: fb05481e0dc62d74c37a19329e17c2006632dfac $
00006  *
00007  * Authors: Jean-Baptiste Kempf <jb@videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef QVLC_ACTIONS_MANAGER_H_
00025 #define QVLC_ACTIONS_MANAGER_H_ 1
00026 
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030 
00031 #include "qt4.hpp"
00032 
00033 #include <QObject>
00034 typedef enum actionType_e
00035 {
00036     PLAY_ACTION,
00037     STOP_ACTION,
00038     OPEN_ACTION,
00039     PREVIOUS_ACTION,
00040     NEXT_ACTION,
00041     SLOWER_ACTION,
00042     FASTER_ACTION,
00043     FULLSCREEN_ACTION,
00044     EXTENDED_ACTION,
00045     PLAYLIST_ACTION,
00046     SNAPSHOT_ACTION,
00047     RECORD_ACTION,
00048     FRAME_ACTION,
00049     ATOB_ACTION,
00050     REVERSE_ACTION,
00051     SKIP_BACK_ACTION,
00052     SKIP_FW_ACTION,
00053     QUIT_ACTION,
00054     RANDOM_ACTION,
00055     LOOP_ACTION,
00056     INFO_ACTION,
00057 } actionType_e;
00058 
00059 class ActionsManager : public QObject
00060 {
00061 
00062     Q_OBJECT
00063 public:
00064     static ActionsManager *getInstance( intf_thread_t *_p_intf, QObject *_parent = 0 )
00065     {
00066         if( !instance )
00067             instance = new ActionsManager( _p_intf, _parent );
00068         return instance;
00069     }
00070     static void killInstance()
00071     {
00072         delete instance;
00073         instance = NULL;
00074     }
00075 
00076 private:
00077     virtual ~ActionsManager();
00078 
00079     static ActionsManager *instance;
00080     ActionsManager( intf_thread_t  *_p_i, QObject *_parent );
00081     intf_thread_t       *p_intf;
00082 
00083 public slots:
00084     void toggleMuteAudio();
00085     void AudioUp();
00086     void AudioDown();
00087     void play();
00088 protected slots:
00089     void fullscreen();
00090     void snapshot();
00091     void playlist();
00092     void record();
00093     void frame();
00094 
00095     virtual void doAction( int );
00096 };
00097 
00098 #endif
00099 

Generated on Tue May 25 08:04:57 2010 for VLC by  doxygen 1.5.6