]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/infopanels.hpp
Qt4 - MediaInfo: spaces cleanup
[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
33 #ifdef HAVE_LIMITS_H
34 #   include <limits.h>
35 #endif
36
37 #define setSpinBounds( spinbox ) {               \
38     spinbox->setRange( 0, INT_MAX );             \
39     spinbox->setAccelerated( true ) ;            \
40     spinbox->setAlignment( Qt::AlignRight );     \
41     spinbox->setSpecialValueText(""); }
42
43 class QTreeWidget;
44 class QTreeWidgetItem;
45 class QTreeView;
46 class QSpinBox;
47 class QLineEdit;
48
49 class MetaPanel: public QWidget
50 {
51     Q_OBJECT;
52 public:
53     MetaPanel( QWidget *, intf_thread_t * );
54     virtual ~MetaPanel();
55 private:
56     intf_thread_t *p_intf;
57     QLineEdit *uri_text;
58     QLineEdit *title_text;
59     QLineEdit *artist_text;
60     QLineEdit *genre_text;
61     QLineEdit *copyright_text;
62     QLineEdit *collection_text;
63     QSpinBox *seqnum_text;
64     QLineEdit *description_text;
65     QSpinBox *rating_text;
66     QSpinBox *date_text;
67     QLineEdit *setting_text;
68     QLineEdit *language_text;
69     QLineEdit *nowplaying_text;
70     QLineEdit *publisher_text;
71
72 public slots:
73     void update( input_item_t * );
74     void clear();
75 };
76
77 class ExtraMetaPanel: public QWidget
78 {
79     Q_OBJECT;
80 public:
81     ExtraMetaPanel( QWidget *, intf_thread_t * );
82     virtual  ~ExtraMetaPanel() {};
83 private:
84     intf_thread_t *p_intf;
85     QTreeWidget *extraMetaTree;
86 public slots:
87     void update( input_item_t * );
88     void clear();
89 };
90
91 class InputStatsPanel: public QWidget
92 {
93     Q_OBJECT;
94 public:
95     InputStatsPanel( QWidget *, intf_thread_t * );
96     virtual ~InputStatsPanel();
97 private:
98     intf_thread_t *p_intf;
99
100     QTreeWidget *StatsTree;
101     QTreeWidgetItem *input;
102     QTreeWidgetItem *read_media_stat;
103     QTreeWidgetItem *input_bitrate_stat;
104     QTreeWidgetItem *demuxed_stat;
105     QTreeWidgetItem *stream_bitrate_stat;
106
107     QTreeWidgetItem *video;
108     QTreeWidgetItem *vdecoded_stat;
109     QTreeWidgetItem *vdisplayed_stat;
110     QTreeWidgetItem *vlost_frames_stat;
111
112     QTreeWidgetItem *streaming;
113     QTreeWidgetItem *send_stat;
114     QTreeWidgetItem *send_bytes_stat;
115     QTreeWidgetItem *send_bitrate_stat;
116
117     QTreeWidgetItem *audio;
118     QTreeWidgetItem *adecoded_stat;
119     QTreeWidgetItem *aplayed_stat;
120     QTreeWidgetItem *alost_stat;
121
122 public slots:
123     void update( input_item_t * );
124     void clear();
125 };
126
127 class InfoPanel: public QWidget
128 {
129     Q_OBJECT;
130 public:
131     InfoPanel( QWidget *, intf_thread_t * );
132     virtual ~InfoPanel();
133 private:
134     intf_thread_t *p_intf;
135     QTreeWidget *InfoTree;
136 public slots:
137     void update( input_item_t * );
138     void clear();
139 };
140 #endif