]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/infopanels.hpp
Removes trailing spaces. Removes tabs.
[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 class QLabel;
49
50 class MetaPanel: public QWidget
51 {
52     Q_OBJECT;
53 public:
54     MetaPanel( QWidget *, intf_thread_t * );
55     virtual ~MetaPanel();
56     void saveMeta();
57     void setInput( input_item_t * );
58  
59     bool isInEditMode();
60     void setEditMode( bool );
61
62 private:
63     input_item_t *p_input;
64     intf_thread_t *p_intf;
65     bool b_inEditMode;
66
67     QLineEdit *uri_text;
68     QLineEdit *title_text;
69     QLineEdit *artist_text;
70     QLineEdit *genre_text;
71     QLineEdit *copyright_text;
72     QLineEdit *collection_text;
73     QLineEdit *seqnum_text;
74     QLineEdit *description_text;
75     QSpinBox *rating_text;
76     QLineEdit *date_text;
77 //    QLineEdit *setting_text;
78     QLineEdit *language_text;
79     QLineEdit *nowplaying_text;
80     QLineEdit *publisher_text;
81 //    QLineEdit *encodedby_text;
82     QLabel *art_cover;
83
84 public slots:
85     void update( input_item_t * );
86     void clear();
87
88 private slots:
89     void enterEditMode();
90  
91 signals:
92     void uriSet( QString );
93     void editing();
94 };
95
96 class ExtraMetaPanel: public QWidget
97 {
98     Q_OBJECT;
99 public:
100     ExtraMetaPanel( QWidget *, intf_thread_t * );
101     virtual  ~ExtraMetaPanel() {};
102 private:
103     intf_thread_t *p_intf;
104     QTreeWidget *extraMetaTree;
105 public slots:
106     void update( input_item_t * );
107     void clear();
108 };
109
110 class InputStatsPanel: public QWidget
111 {
112     Q_OBJECT;
113 public:
114     InputStatsPanel( QWidget *, intf_thread_t * );
115     virtual ~InputStatsPanel();
116 private:
117     intf_thread_t *p_intf;
118
119     QTreeWidget *StatsTree;
120     QTreeWidgetItem *input;
121     QTreeWidgetItem *read_media_stat;
122     QTreeWidgetItem *input_bitrate_stat;
123     QTreeWidgetItem *demuxed_stat;
124     QTreeWidgetItem *stream_bitrate_stat;
125
126     QTreeWidgetItem *video;
127     QTreeWidgetItem *vdecoded_stat;
128     QTreeWidgetItem *vdisplayed_stat;
129     QTreeWidgetItem *vlost_frames_stat;
130
131     QTreeWidgetItem *streaming;
132     QTreeWidgetItem *send_stat;
133     QTreeWidgetItem *send_bytes_stat;
134     QTreeWidgetItem *send_bitrate_stat;
135
136     QTreeWidgetItem *audio;
137     QTreeWidgetItem *adecoded_stat;
138     QTreeWidgetItem *aplayed_stat;
139     QTreeWidgetItem *alost_stat;
140
141 public slots:
142     void update( input_item_t * );
143     void clear();
144 };
145
146 class InfoPanel: public QWidget
147 {
148     Q_OBJECT;
149 public:
150     InfoPanel( QWidget *, intf_thread_t * );
151     virtual ~InfoPanel();
152 private:
153     intf_thread_t *p_intf;
154     QTreeWidget *InfoTree;
155 public slots:
156     void update( input_item_t * );
157     void clear();
158 };
159 #endif