]> git.sesse.net Git - vlc/blob - modules/gui/kde/info.cpp
* modules/gui/wxwindows/playlist.cpp: unicode fix.
[vlc] / modules / gui / kde / info.cpp
1 #include "info.h"
2 #include "common.h"
3 #include <qtextview.h>
4 #include <qlayout.h>
5 #include <qlabel.h>
6 #include <qvbox.h>
7
8 KInfoWindow::KInfoWindow( intf_thread_t * p_intf,  input_thread_t *p_input ) :
9     KDialogBase( Tabbed, _( "Messages" ), Ok, Ok, 0, 0, false)
10 {
11 //    clearWFlags(~0);
12 //    setWFlags(WType_TopLevel);
13     setSizeGripEnabled(true);
14     vlc_mutex_lock( &p_input->stream.stream_lock );
15     input_info_category_t *p_category = p_input->stream.p_info;
16     while ( p_category )
17     {
18         QFrame *page = addPage( QString(p_category->psz_name) );
19         QVBoxLayout *toplayout = new QVBoxLayout( page);
20         QVBox *category_table = new QVBox(page);
21         toplayout->addWidget(category_table);
22         toplayout->setResizeMode(QLayout::FreeResize);
23         toplayout->addStretch(10);
24         category_table->setSpacing(spacingHint());
25         input_info_t *p_info = p_category->p_info;
26         while ( p_info )
27         {
28             QHBox *hb = new QHBox( category_table );
29             new QLabel( QString(p_info->psz_name) + ":", hb );
30             new QLabel( p_info->psz_value, hb );
31             p_info = p_info->p_next;
32         }
33         p_category = p_category->p_next;
34     }
35     vlc_mutex_unlock( &p_input->stream.stream_lock );
36     resize(300,400);
37     show();
38 }
39
40 KInfoWindow::~KInfoWindow()
41 {
42     ;
43 }