]> git.sesse.net Git - vlc/blob - modules/gui/qt4/actions_manager.hpp
Qt sprefs, cleaning of Audio and Interface parts
[vlc] / modules / gui / qt4 / actions_manager.hpp
1 /*****************************************************************************
2  * Controller.hpp : Controller for the main interface
3  ****************************************************************************
4  * Copyright (C) 2006-2008 the VideoLAN team
5  * $Id$
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
24 #ifndef QVLC_ACTIONS_MANAGER_H_
25 #define QVLC_ACTIONS_MANAGER_H_ 1
26
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
30
31 #include "qt4.hpp"
32
33 #include <QObject>
34 typedef enum actionType_e
35 {
36     PLAY_ACTION,
37     STOP_ACTION,
38     OPEN_ACTION,
39     PREVIOUS_ACTION,
40     NEXT_ACTION,
41     SLOWER_ACTION,
42     FASTER_ACTION,
43     FULLSCREEN_ACTION,
44     EXTENDED_ACTION,
45     PLAYLIST_ACTION,
46     SNAPSHOT_ACTION,
47     RECORD_ACTION,
48     FRAME_ACTION,
49     ATOB_ACTION,
50     REVERSE_ACTION,
51     SKIP_BACK_ACTION,
52     SKIP_FW_ACTION,
53     QUIT_ACTION,
54     RANDOM_ACTION,
55     LOOP_ACTION,
56     INFO_ACTION,
57 } actionType_e;
58
59 class ActionsManager : public QObject
60 {
61
62     Q_OBJECT
63 public:
64     static ActionsManager *getInstance( intf_thread_t *_p_intf, QObject *_parent = 0 )
65     {
66         if( !instance )
67             instance = new ActionsManager( _p_intf, _parent );
68         return instance;
69     }
70     static void killInstance()
71     {
72         delete instance;
73         instance = NULL;
74     }
75
76 private:
77     virtual ~ActionsManager();
78
79     static ActionsManager *instance;
80     ActionsManager( intf_thread_t  *_p_i, QObject *_parent );
81     intf_thread_t       *p_intf;
82
83 public slots:
84     void toggleMuteAudio();
85     void AudioUp();
86     void AudioDown();
87     void play();
88 protected slots:
89     void fullscreen();
90     void snapshot();
91     void playlist();
92     void record();
93     void frame();
94
95     virtual void doAction( int );
96 };
97
98 #endif
99