1 /*****************************************************************************
2 * info.cpp: the KInfoWindow class
3 *****************************************************************************
4 * Copyright (C) 2001-2003 VideoLAN
7 * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
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.
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.
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 *****************************************************************************/
26 #include <qtextview.h>
31 KInfoWindow::KInfoWindow( intf_thread_t * p_intf, input_thread_t *p_input ) :
32 KDialogBase( Tabbed, _( "Messages" ), Ok, Ok, 0, 0, false)
35 // setWFlags(WType_TopLevel);
36 setSizeGripEnabled(true);
40 vlc_mutex_lock( &p_input->p_item->lock );
41 for ( i = 0; i < p_input->p_item->i_categories; i++ )
43 info_category_t *p_category =
44 p_input->p_item->pp_categories[i];
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());
54 for ( j = 0; j < p_category->i_infos; j++ )
56 info_t *p_info = p_category->pp_infos[j];
58 QHBox *hb = new QHBox( category_table );
59 new QLabel( QString(p_info->psz_name) + ":", hb );
60 new QLabel( p_info->psz_value, hb );
63 vlc_mutex_unlock( &p_input->p_item->lock );
68 KInfoWindow::~KInfoWindow()