]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/info_panels.hpp
Qt: Spatializer: add values multiplier.
[vlc] / modules / gui / qt4 / components / info_panels.hpp
1 /*****************************************************************************
2  * info_panels.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  *          Ilkka Ollakka <ileoo@videolan.org>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25
26 #ifndef _INFOPANELS_H_
27 #define _INFOPANELS_H_
28
29 #ifdef HAVE_CONFIG_H
30 # include "config.h"
31 #endif
32
33 #include <vlc_common.h>
34 #include <vlc_meta.h>
35
36 #include <QWidget>
37
38 #include <limits.h>
39
40 #define setSpinBounds( spinbox ) {               \
41     spinbox->setRange( 0, INT_MAX );             \
42     spinbox->setAccelerated( true ) ;            \
43     spinbox->setAlignment( Qt::AlignRight );     \
44     spinbox->setSpecialValueText(""); }
45
46 class QTreeWidget;
47 class QTreeWidgetItem;
48 class QTreeView;
49 class QSpinBox;
50 class QLineEdit;
51 class CoverArtLabel;
52 class QTextEdit;
53 class QLabel;
54
55 class MetaPanel: public QWidget
56 {
57     Q_OBJECT
58 public:
59     MetaPanel( QWidget *, struct intf_thread_t * );
60     void saveMeta();
61
62     bool isInEditMode();
63     void setEditMode( bool );
64
65 private:
66     input_item_t *p_input;
67     struct intf_thread_t *p_intf;
68     bool b_inEditMode;
69
70     QLineEdit *title_text;
71     QLineEdit *artist_text;
72     QLineEdit *genre_text;
73     QLineEdit *copyright_text;
74     QLineEdit *collection_text;
75     QLineEdit *tracknumber_text;
76
77     QTextEdit *description_text;
78 //    QSpinBox *rating_text;
79     QLineEdit *date_text;
80 //    QLineEdit *setting_text;
81     QLineEdit *language_text;
82     QLineEdit *nowplaying_text;
83     QLineEdit *publisher_text;
84     QLineEdit *encodedby_text;
85     CoverArtLabel *art_cover;
86
87     QLabel   *lblURL;
88     QString  currentURL;
89
90 public slots:
91     void update( input_item_t * );
92     void clear();
93
94 private slots:
95     void enterEditMode();
96
97 signals:
98     void uriSet( const QString& );
99     void editing();
100 };
101
102 class ExtraMetaPanel: public QWidget
103 {
104     Q_OBJECT
105 public:
106     ExtraMetaPanel( QWidget * );
107 private:
108     QTreeWidget *extraMetaTree;
109 public slots:
110     void update( input_item_t * );
111     void clear();
112 };
113
114 class InputStatsPanel: public QWidget
115 {
116     Q_OBJECT
117 public:
118     InputStatsPanel( QWidget * );
119 private:
120     QTreeWidget *StatsTree;
121     QTreeWidgetItem *input;
122     QTreeWidgetItem *read_media_stat;
123     QTreeWidgetItem *input_bitrate_stat;
124     QTreeWidgetItem *demuxed_stat;
125     QTreeWidgetItem *stream_bitrate_stat;
126     QTreeWidgetItem *corrupted_stat;
127     QTreeWidgetItem *discontinuity_stat;
128
129     QTreeWidgetItem *video;
130     QTreeWidgetItem *vdecoded_stat;
131     QTreeWidgetItem *vdisplayed_stat;
132     QTreeWidgetItem *vlost_frames_stat;
133     QTreeWidgetItem *vfps_stat;
134
135     QTreeWidgetItem *streaming;
136     QTreeWidgetItem *send_stat;
137     QTreeWidgetItem *send_bytes_stat;
138     QTreeWidgetItem *send_bitrate_stat;
139
140     QTreeWidgetItem *audio;
141     QTreeWidgetItem *adecoded_stat;
142     QTreeWidgetItem *aplayed_stat;
143     QTreeWidgetItem *alost_stat;
144
145 public slots:
146     void update( input_item_t * );
147     void clear();
148 };
149
150 class InfoPanel: public QWidget
151 {
152     Q_OBJECT
153 public:
154     InfoPanel( QWidget * );
155 private:
156     QTreeWidget *InfoTree;
157 public slots:
158     void update( input_item_t * );
159     void clear();
160 };
161
162 #endif