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