]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/messages.hpp
Qt: prefsItemData: rename ambigous var
[vlc] / modules / gui / qt4 / dialogs / messages.hpp
1 /*****************************************************************************
2  * messages.hpp : Information about a stream
3  ****************************************************************************
4  * Copyright (C) 2006-2007 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Jean-Baptiste Kempf <jb (at) 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_MESSAGES_DIALOG_H_
25 #define QVLC_MESSAGES_DIALOG_H_ 1
26
27 #include "util/qvlcframe.hpp"
28 #include "util/singleton.hpp"
29 #include "ui/messages_panel.h"
30 #include <stdarg.h>
31 #include <vlc_atomic.h>
32 #include <QMutex>
33
34 class QTabWidget;
35 class QPushButton;
36 class QSpinBox;
37 class QGridLayout;
38 class QLabel;
39 class QTextEdit;
40 class QTreeWidget;
41 class QTreeWidgetItem;
42 class QLineEdit;
43 class MsgEvent;
44
45 class MessagesDialog : public QVLCFrame, public Singleton<MessagesDialog>
46 {
47     Q_OBJECT
48 private:
49     MessagesDialog( intf_thread_t * );
50     virtual ~MessagesDialog();
51
52     Ui::messagesPanelWidget ui;
53     msg_subscription_t sub;
54     static void sinkMessage( void *, msg_item_t *, unsigned );
55     void customEvent( QEvent * );
56     void sinkMessage( const MsgEvent * );
57     bool matchFilter( const QString& );
58
59     vlc_atomic_t verbosity;
60     static void MsgCallback( void *, int, const msg_item_t *, const char *,
61                              va_list );
62
63 private slots:
64     bool save();
65     void updateConfig();
66     void changeVerbosity( int );
67     void updateOrClear();
68     void tabChanged( int );
69     void filterMessages();
70
71 private:
72     void buildTree( QTreeWidgetItem *, vlc_object_t * );
73
74     friend class    Singleton<MessagesDialog>;
75     QPushButton *updateButton;
76     QMutex messageLocker;
77 #ifndef NDEBUG
78     QTreeWidget *pldebugTree;
79     void updatePLTree();
80 #endif
81 };
82
83 #endif