]> git.sesse.net Git - vlc/blob - modules/gui/kde/info.cpp
*: remove useless code
[vlc] / modules / gui / kde / info.cpp
1 /*****************************************************************************
2  * info.cpp: the KInfoWindow class
3  *****************************************************************************
4  * Copyright (C) 2001-2003 VideoLAN
5  * $Id$
6  *
7  * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 #include "info.h"
25 #include "common.h"
26 #include <qtextview.h>
27 #include <qlayout.h>
28 #include <qlabel.h>
29 #include <qvbox.h>
30
31 KInfoWindow::KInfoWindow( intf_thread_t * p_intf,  input_thread_t *p_input ) :
32     KDialogBase( Tabbed, _( "Messages" ), Ok, Ok, 0, 0, false)
33 {
34 //    clearWFlags(~0);
35 //    setWFlags(WType_TopLevel);
36     setSizeGripEnabled(true);
37
38     int i, j;
39
40     vlc_mutex_lock( &p_input->p_item->lock );
41     for ( i = 0; i < p_input->p_item->i_categories; i++ )
42     {
43         info_category_t *p_category =
44            p_input->p_item->pp_categories[i];
45
46         QFrame *page = addPage( QString(p_category->psz_name) );
47         QVBoxLayout *toplayout = new QVBoxLayout( page);
48         QVBox *category_table = new QVBox(page);
49         toplayout->addWidget(category_table);
50         toplayout->setResizeMode(QLayout::FreeResize);
51         toplayout->addStretch(10);
52         category_table->setSpacing(spacingHint());
53
54         for ( j = 0; j < p_category->i_infos; j++ )
55         {
56             info_t *p_info = p_category->pp_infos[j];
57
58             QHBox *hb = new QHBox( category_table );
59             new QLabel( QString(p_info->psz_name) + ":", hb );
60             new QLabel( p_info->psz_value, hb );
61         }
62     }
63     vlc_mutex_unlock( &p_input->p_item->lock );
64     resize(300,400);
65     show();
66 }
67
68 KInfoWindow::~KInfoWindow()
69 {
70     ;
71 }