]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/mediainfo.hpp
ec82d331ebcb5555aa113bec0b263f52d60351ce
[vlc] / modules / gui / qt4 / dialogs / mediainfo.hpp
1 /*****************************************************************************
2  * mediainfo.hpp : Information about a stream
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 _MEDIAINFO_DIALOG_H_
26 #define _MEDIAINFO_DIALOG_H_
27
28 #include "util/qvlcframe.hpp"
29 #include "components/infopanels.hpp"
30
31 class QTabWidget;
32 class InfoTab;
33 class QLineEdit;
34
35 class MediaInfoDialog : public QVLCFrame
36 {
37     Q_OBJECT;
38 public:
39     MediaInfoDialog( intf_thread_t *, bool stats = true,
40                     bool mainInput = false );
41     static MediaInfoDialog * getInstance( intf_thread_t *p_intf )
42     {
43         if( !instance)
44             instance = new MediaInfoDialog( p_intf, true, true );
45         return instance;
46     }
47     static void killInstance()
48     {
49         if( instance ) delete instance;
50         instance= NULL;
51     }
52     virtual ~MediaInfoDialog();
53
54     void showTab( int );
55     bool need_update;
56     void setInput( input_item_t * );
57     QLineEdit *uriLine;
58 private:
59     input_thread_t *p_input;
60     QTabWidget *IT;
61     static MediaInfoDialog *instance;
62     int i_runs;
63     bool mainInput;
64     bool stats;
65     InputStatsPanel *ISP;
66     MetaPanel *MP;
67     InfoPanel *IP;
68     ExtraMetaPanel *EMP;
69     QPushButton *saveMetaButton;
70 public slots:
71     void update();
72     void saveMeta();
73     void editMeta();
74     void update( input_item_t *, bool, bool );
75     void close();
76     void clear();
77     void updateButtons( int i_tab );
78 };
79
80 #endif