actions_manager.hpp
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:2k
源码类别:

midi

开发平台:

Unix_Linux

  1. /*****************************************************************************
  2.  * Controller.hpp : Controller for the main interface
  3.  ****************************************************************************
  4.  * Copyright (C) 2006-2008 the VideoLAN team
  5.  * $Id: d42519e1726776e8d460280251e45df242006918 $
  6.  *
  7.  * Authors: Jean-Baptiste Kempf <jb@videolan.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  22.  *****************************************************************************/
  23. #ifndef QVLC_ACTIONS_MANAGER_H_
  24. #define QVLC_ACTIONS_MANAGER_H_ 1
  25. #ifdef HAVE_CONFIG_H
  26. # include "config.h"
  27. #endif
  28. #include "qt4.hpp"
  29. #include <QObject>
  30. typedef enum actionType_e
  31. {
  32.     PLAY_ACTION,
  33.     STOP_ACTION,
  34.     OPEN_ACTION,
  35.     PREVIOUS_ACTION,
  36.     NEXT_ACTION,
  37.     SLOWER_ACTION,
  38.     FASTER_ACTION,
  39.     FULLSCREEN_ACTION,
  40.     EXTENDED_ACTION,
  41.     PLAYLIST_ACTION,
  42.     SNAPSHOT_ACTION,
  43.     RECORD_ACTION,
  44.     FRAME_ACTION,
  45.     ATOB_ACTION,
  46.     REVERSE_ACTION,
  47.     SKIP_BACK_ACTION,
  48.     SKIP_FW_ACTION,
  49.     QUIT_ACTION,
  50. } actionType_e;
  51. class ActionsManager : public QObject
  52. {
  53.     Q_OBJECT
  54. public:
  55.     static ActionsManager *getInstance( intf_thread_t *_p_intf, QObject *_parent = 0 )
  56.     {
  57.         if( !instance )
  58.             instance = new ActionsManager( _p_intf, _parent );
  59.         return instance;
  60.     }
  61.     static void killInstance()
  62.     {
  63.         delete instance;
  64.         instance = NULL;
  65.     }
  66. private:
  67.     virtual ~ActionsManager();
  68.     static ActionsManager *instance;
  69.     ActionsManager( intf_thread_t  *_p_i, QObject *_parent );
  70.     intf_thread_t       *p_intf;
  71. public slots:
  72.     void toggleMuteAudio();
  73.     void AudioUp();
  74.     void AudioDown();
  75.     void play();
  76. protected slots:
  77.     void fullscreen();
  78.     void snapshot();
  79.     void playlist();
  80.     void record();
  81.     void frame();
  82.     virtual void doAction( int );
  83. };
  84. #endif