]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/infopanels.hpp
* Qt4 : Use a QTreeWidget instead of a ui to display stats. I hope in that way it...
[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  *          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.
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 <QLabel>
33
34 class QTreeWidget;
35 class QTreeWidgetItem;
36
37 class MetaPanel: public QWidget
38 {
39     Q_OBJECT;
40 public:
41     MetaPanel( QWidget *, intf_thread_t * );
42     virtual ~MetaPanel();
43 private:
44     intf_thread_t *p_intf;
45     QLabel *uri_text;
46     QLabel *name_text;
47     QLabel *artist_text;
48     QLabel *genre_text;
49     QLabel *copyright_text;
50     QLabel *collection_text;
51     QLabel *seqnum_text;
52     QLabel *description_text;
53     QLabel *rating_text;
54     QLabel *date_text;
55     QLabel *setting_text;
56     QLabel *language_text;
57     QLabel *nowplaying_text;
58     QLabel *publisher_text;
59
60 public slots:
61     void update( input_item_t * );
62     void clear();
63 };
64
65
66 class InputStatsPanel: public QWidget
67 {
68     Q_OBJECT;
69 public:
70     InputStatsPanel( QWidget *, intf_thread_t * );
71     virtual ~InputStatsPanel();
72 private:
73     intf_thread_t *p_intf;
74
75     QTreeWidget *StatsTree;
76     QTreeWidgetItem *input;
77     QTreeWidgetItem *read_media_stat;
78     QTreeWidgetItem *input_bitrate_stat;
79     QTreeWidgetItem *demuxed_stat;
80     QTreeWidgetItem *stream_bitrate_stat;
81
82     QTreeWidgetItem *video;
83     QTreeWidgetItem *vdecoded_stat;
84     QTreeWidgetItem *vdisplayed_stat;
85     QTreeWidgetItem *vlost_frames_stat;
86
87     QTreeWidgetItem *streaming;
88     QTreeWidgetItem *send_stat;
89     QTreeWidgetItem *send_bytes_stat;
90     QTreeWidgetItem *send_bitrate_stat;
91
92     QTreeWidgetItem *audio;
93     QTreeWidgetItem *adecoded_stat;
94     QTreeWidgetItem *aplayed_stat;
95     QTreeWidgetItem *alost_stat;
96
97 public slots:
98     void update( input_item_t * );
99     void clear();
100 };
101
102 class InfoPanel: public QWidget
103 {
104     Q_OBJECT;
105 public:
106     InfoPanel( QWidget *, intf_thread_t * );
107     virtual ~InfoPanel();
108 private:
109     intf_thread_t *p_intf;
110     QTreeWidget *InfoTree;
111 public slots:
112     void update( input_item_t * );
113     void clear();
114 };
115
116 class InfoTab: public QTabWidget
117 {
118     Q_OBJECT;
119 public:
120     InfoTab( QWidget *, intf_thread_t *, bool );
121     virtual ~InfoTab();
122     void update( input_item_t *, bool, bool );
123     void clear();
124 private:
125     bool stats;
126     intf_thread_t *p_intf;
127     InputStatsPanel *ISP;
128     MetaPanel *MP;
129     InfoPanel *IP;
130     int i_runs;
131 };
132
133 #endif