]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/infopanels.hpp
A bit of cleanup in the info stuff
[vlc] / modules / gui / qt4 / components / infopanels.hpp
1 /*****************************************************************************
2  * infopanels.hpp : Panels for the information dialogs
3  ****************************************************************************
4  * Copyright (C) 2006 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@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 _INFOPANELS_H_
25 #define _INFOPANELS_H_
26
27 #include <vlc/vlc.h>
28 #include <vlc_meta.h>
29
30 #include <QWidget>
31 #include <QTabWidget>
32 #include "ui/input_stats.h"
33
34
35 class QTreeWidget;
36 class QTreeWidgetItem;
37
38 class InputStatsPanel: public QWidget
39 {
40     Q_OBJECT;
41 public:
42     InputStatsPanel( QWidget *, intf_thread_t * );
43     virtual ~InputStatsPanel();
44 private:
45     intf_thread_t *p_intf;
46     Ui::InputStats ui;
47 public slots:
48     void update( input_item_t * );
49     void clear();
50 };
51
52 class MetaPanel: public QWidget
53 {
54     Q_OBJECT;
55 public:
56     MetaPanel( QWidget *, intf_thread_t * );
57     virtual ~MetaPanel();
58 private:
59     intf_thread_t *p_intf;
60
61 public slots:
62     void update( input_item_t * );
63     void clear();
64
65     char* getURI();
66     char* getName();
67 };
68
69 class InfoPanel: public QWidget
70 {
71     Q_OBJECT;
72 public:
73     InfoPanel( QWidget *, intf_thread_t * );
74     virtual ~InfoPanel();
75 private:
76     intf_thread_t *p_intf;
77     QTreeWidget *InfoTree;
78
79 public slots:
80     void update( input_item_t * );
81     void clear();
82 };
83
84 class InfoTab: public QTabWidget
85 {
86     Q_OBJECT;
87 public:
88     InfoTab( QWidget *, intf_thread_t *, bool );
89     virtual ~InfoTab();
90     void update( input_item_t *, bool, bool );
91     void clear();
92 private:
93     bool stats;
94     intf_thread_t *p_intf;
95     InputStatsPanel *ISP;
96     MetaPanel *MP;
97     InfoPanel *IP;
98     int i_runs;
99 };
100
101 #endif