]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/infopanels.hpp
Qt4: add meta info panel and fix layout bug in stats
[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     QLabel *uri_text;
61     QLabel *name_text;
62     QLabel *artist_text;
63     QLabel *genre_text;
64     QLabel *copyright_text;
65     QLabel *collection_text;
66     QLabel *seqnum_text;
67     QLabel *description_text;
68     QLabel *rating_text;
69     QLabel *date_text;
70     QLabel *setting_text;
71     QLabel *language_text;
72     QLabel *nowplaying_text;
73     QLabel *publisher_text;
74
75
76 public slots:
77     void update( input_item_t * );
78     void clear();
79 };
80
81 class InfoPanel: public QWidget
82 {
83     Q_OBJECT;
84 public:
85     InfoPanel( QWidget *, intf_thread_t * );
86     virtual ~InfoPanel();
87 private:
88     intf_thread_t *p_intf;
89     QTreeWidget *InfoTree;
90
91 public slots:
92     void update( input_item_t * );
93     void clear();
94 };
95
96 class InfoTab: public QTabWidget
97 {
98     Q_OBJECT;
99 public:
100     InfoTab( QWidget *, intf_thread_t *, bool );
101     virtual ~InfoTab();
102     void update( input_item_t *, bool, bool );
103     void clear();
104 private:
105     bool stats;
106     intf_thread_t *p_intf;
107     InputStatsPanel *ISP;
108     MetaPanel *MP;
109     InfoPanel *IP;
110     int i_runs;
111 };
112
113 #endif