]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/messages.hpp
85bc88975a5bf1f4dd5c209acc1dbd5d74b5d98a
[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
31 class QTabWidget;
32 class QPushButton;
33 class QSpinBox;
34 class QGridLayout;
35 class QLabel;
36 class QTextEdit;
37 class QTreeWidget;
38 class QTreeWidgetItem;
39 class QLineEdit;
40
41 class MessagesDialog : public QVLCFrame, public Singleton<MessagesDialog>
42 {
43     Q_OBJECT
44 private:
45     MessagesDialog( intf_thread_t * );
46     virtual ~MessagesDialog();
47
48     Ui::messagesPanelWidget ui;
49     msg_subscription_t *sub;
50     msg_cb_data_t *cbData;
51     static void sinkMessage( msg_cb_data_t *, msg_item_t *, unsigned );
52     void customEvent( QEvent * );
53     void sinkMessage( msg_item_t *item );
54
55 private slots:
56     bool save();
57     void updateConfig();
58     void changeVerbosity( int );
59     void clear();
60     void updateTree();
61 private:
62     void buildTree( QTreeWidgetItem *, vlc_object_t * );
63
64     friend class    Singleton<MessagesDialog>;
65 };
66
67 #endif