]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/infopanels.hpp
Qt4 - Copyright update and CRs
[vlc] / modules / gui / qt4 / components / infopanels.hpp
1 /*****************************************************************************
2  * infopanels.hpp : Panels for the information dialogs
3  ****************************************************************************
4  * Copyright (C) 2006-2007 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Baptiste Kempf <jb@videolan.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #ifndef _INFOPANELS_H_
26 #define _INFOPANELS_H_
27
28 #include <vlc/vlc.h>
29 #include <vlc_meta.h>
30
31 #include <QWidget>
32 #include <QTabWidget>
33 #include <QLabel>
34
35 class QTreeWidget;
36 class QTreeWidgetItem;
37
38 class MetaPanel: public QWidget
39 {
40     Q_OBJECT;
41 public:
42     MetaPanel( QWidget *, intf_thread_t * );
43     virtual ~MetaPanel();
44 private:
45     intf_thread_t *p_intf;
46     QLabel *uri_text;
47     QLabel *name_text;
48     QLabel *artist_text;
49     QLabel *genre_text;
50     QLabel *copyright_text;
51     QLabel *collection_text;
52     QLabel *seqnum_text;
53     QLabel *description_text;
54     QLabel *rating_text;
55     QLabel *date_text;
56     QLabel *setting_text;
57     QLabel *language_text;
58     QLabel *nowplaying_text;
59     QLabel *publisher_text;
60
61 public slots:
62     void update( input_item_t * );
63     void clear();
64 };
65
66
67 class InputStatsPanel: public QWidget
68 {
69     Q_OBJECT;
70 public:
71     InputStatsPanel( QWidget *, intf_thread_t * );
72     virtual ~InputStatsPanel();
73 private:
74     intf_thread_t *p_intf;
75
76     QTreeWidget *StatsTree;
77     QTreeWidgetItem *input;
78     QTreeWidgetItem *read_media_stat;
79     QTreeWidgetItem *input_bitrate_stat;
80     QTreeWidgetItem *demuxed_stat;
81     QTreeWidgetItem *stream_bitrate_stat;
82
83     QTreeWidgetItem *video;
84     QTreeWidgetItem *vdecoded_stat;
85     QTreeWidgetItem *vdisplayed_stat;
86     QTreeWidgetItem *vlost_frames_stat;
87
88     QTreeWidgetItem *streaming;
89     QTreeWidgetItem *send_stat;
90     QTreeWidgetItem *send_bytes_stat;
91     QTreeWidgetItem *send_bitrate_stat;
92
93     QTreeWidgetItem *audio;
94     QTreeWidgetItem *adecoded_stat;
95     QTreeWidgetItem *aplayed_stat;
96     QTreeWidgetItem *alost_stat;
97
98 public slots:
99     void update( input_item_t * );
100     void clear();
101 };
102
103 class InfoPanel: public QWidget
104 {
105     Q_OBJECT;
106 public:
107     InfoPanel( QWidget *, intf_thread_t * );
108     virtual ~InfoPanel();
109 private:
110     intf_thread_t *p_intf;
111     QTreeWidget *InfoTree;
112 public slots:
113     void update( input_item_t * );
114     void clear();
115 };
116
117 class InfoTab: public QTabWidget
118 {
119     Q_OBJECT;
120 public:
121     InfoTab( QWidget *, intf_thread_t *, bool );
122     virtual ~InfoTab();
123     void update( input_item_t *, bool, bool );
124     void clear();
125 private:
126     bool stats;
127     intf_thread_t *p_intf;
128     InputStatsPanel *ISP;
129     MetaPanel *MP;
130     InfoPanel *IP;
131     int i_runs;
132 };
133
134 #endif