Contribs: update mpg123 to 1.25.10
[vlc.git] / modules / gui / qt / actions_manager.hpp
blobf82f6ee0aa10f65d693796d8b5dfba7dfbb7b77c
1 /*****************************************************************************
2 * actions_manager.hpp : Controller for the main interface
3 ****************************************************************************
4 * Copyright (C) 2006-2008 the VideoLAN team
5 * $Id$
7 * Authors: Jean-Baptiste Kempf <jb@videolan.org>
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.
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.
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 *****************************************************************************/
24 #ifndef QVLC_ACTIONS_MANAGER_H_
25 #define QVLC_ACTIONS_MANAGER_H_ 1
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
31 #include "qt.hpp"
32 #include "util/singleton.hpp"
33 #include <QVector>
35 #include <QObject>
36 #include <QTimer>
37 class QAction;
39 typedef enum actionType_e
41 PLAY_ACTION,
42 STOP_ACTION,
43 OPEN_ACTION,
44 PREVIOUS_ACTION,
45 NEXT_ACTION,
46 SLOWER_ACTION,
47 FASTER_ACTION,
48 FULLSCREEN_ACTION,
49 FULLWIDTH_ACTION,
50 EXTENDED_ACTION,
51 PLAYLIST_ACTION,
52 SNAPSHOT_ACTION,
53 RECORD_ACTION,
54 FRAME_ACTION,
55 ATOB_ACTION,
56 REVERSE_ACTION,
57 SKIP_BACK_ACTION,
58 SKIP_FW_ACTION,
59 QUIT_ACTION,
60 RANDOM_ACTION,
61 LOOP_ACTION,
62 INFO_ACTION,
63 OPEN_SUB_ACTION,
64 } actionType_e;
66 class ActionsManager : public QObject, public Singleton<ActionsManager>
69 Q_OBJECT
70 friend class Singleton<ActionsManager>;
72 public:
74 private:
75 ActionsManager( intf_thread_t *_p_i );
76 virtual ~ActionsManager();
78 intf_thread_t* const p_intf;
79 QVector<vlc_renderer_discovery_t*> m_rds;
80 QTimer m_stop_scan_timer;
81 bool m_scanning;
83 static void renderer_event_item_added( vlc_renderer_discovery_t *,
84 vlc_renderer_item_t * );
85 static void renderer_event_item_removed( vlc_renderer_discovery_t *,
86 vlc_renderer_item_t * );
87 static vlc_renderer_item_t* getMatchingRenderer( const QVariant &m_obj,
88 vlc_renderer_item_t* p_item );
90 public slots:
91 void toggleMuteAudio();
92 void AudioUp();
93 void AudioDown();
94 void play();
95 void record();
96 void skipForward();
97 void skipBackward();
98 void StartRendererScan();
99 void RendererMenuCountdown();
100 void StopRendererScan();
101 void RendererSelected( QAction * );
103 protected slots:
104 void onRendererItemAdded( vlc_renderer_item_t* );
105 void onRendererItemRemoved( vlc_renderer_item_t* );
106 void fullscreen();
107 void snapshot();
108 void playlist();
109 void frame();
111 virtual void doAction( int );
113 signals:
114 void rendererItemAdded( vlc_renderer_item_t* );
115 void rendererItemRemoved( vlc_renderer_item_t* );
118 #endif