actions_manager.hpp 2.47 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*****************************************************************************
 * Controller.hpp : Controller for the main interface
 ****************************************************************************
 * Copyright (C) 2006-2008 the VideoLAN team
 * $Id$
 *
 * Authors: Jean-Baptiste Kempf <jb@videolan.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

24
25
#ifndef QVLC_ACTIONS_MANAGER_H_
#define QVLC_ACTIONS_MANAGER_H_ 1
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include "qt4.hpp"

#include <QObject>
typedef enum actionType_e
{
    PLAY_ACTION,
    STOP_ACTION,
    OPEN_ACTION,
    PREVIOUS_ACTION,
    NEXT_ACTION,
    SLOWER_ACTION,
    FASTER_ACTION,
    FULLSCREEN_ACTION,
    EXTENDED_ACTION,
    PLAYLIST_ACTION,
    SNAPSHOT_ACTION,
    RECORD_ACTION,
    FRAME_ACTION,
    ATOB_ACTION,
    REVERSE_ACTION,
    SKIP_BACK_ACTION,
    SKIP_FW_ACTION,
53
    QUIT_ACTION,
54
    RANDOM_ACTION,
55
    LOOP_ACTION,
56
    INFO_ACTION,
57
58
59
60
61
62
63
} actionType_e;

class ActionsManager : public QObject
{

    Q_OBJECT
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
69
70
71
        return instance;
    }
    static void killInstance()
    {
72
73
        delete instance;
        instance = NULL;
74
75
76
    }

private:
77
78
    virtual ~ActionsManager();

79
    static ActionsManager *instance;
80
    ActionsManager( intf_thread_t  *_p_i, QObject *_parent );
81
82
    intf_thread_t       *p_intf;

83
84
85
86
public slots:
    void toggleMuteAudio();
    void AudioUp();
    void AudioDown();
87
    void play();
88
protected slots:
89
90
    void fullscreen();
    void snapshot();
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
91
    void playlist();
92
93
94
    void record();
    void frame();

95
    virtual void doAction( int );
96
97
98
99
};

#endif