]> git.sesse.net Git - vlc/blob - modules/gui/qt4/variables.hpp
Merge branch 1.0-bugfix
[vlc] / modules / gui / qt4 / variables.hpp
1 /*****************************************************************************
2  * external.hpp : Dialogs from other LibVLC core and other plugins
3  ****************************************************************************
4  * Copyright (C) 2009 RĂ©mi Denis-Courmont
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19  *****************************************************************************/
20
21 #ifndef QVLC_VARIABLES_H_
22 #define QVLC_VARIABLES_H_ 1
23
24 #include <QObject>
25 #include <vlc_common.h>
26
27 class QVLCVariable : public QObject
28 {
29     Q_OBJECT
30 private:
31     static int callback (vlc_object_t *, const char *,
32                          vlc_value_t, vlc_value_t, void *);
33     vlc_object_t *object;
34     QString name;
35     virtual void trigger (vlc_object_t *, vlc_value_t, vlc_value_t) = 0;
36
37 public:
38     QVLCVariable (vlc_object_t *, const char *, int, bool);
39     virtual ~QVLCVariable (void);
40 };
41
42 class QVLCPointer : public QVLCVariable
43 {
44     Q_OBJECT
45 private:
46     virtual void trigger (vlc_object_t *, vlc_value_t, vlc_value_t);
47
48 public:
49     QVLCPointer (vlc_object_t *, const char *, bool inherit = false);
50
51 signals:
52     void pointerChanged (vlc_object_t *, void *, void *);
53     void pointerChanged (vlc_object_t *, void *);
54 };
55
56 class QVLCInteger : public QVLCVariable
57 {
58     Q_OBJECT
59 private:
60     virtual void trigger (vlc_object_t *, vlc_value_t, vlc_value_t);
61
62 public:
63     QVLCInteger (vlc_object_t *, const char *, bool inherit = false);
64
65 signals:
66     void integerChanged (vlc_object_t *, int, int);
67     void integerChanged (vlc_object_t *, int);
68 };
69
70 #endif