- messages->setReadOnly(true);
- messages->setGeometry(0, 0, 440, 600);
- messages->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-
- layout->addWidget(messages, 0, 0, 1, 0);
- layout->addWidget(verbosityLabel, 1, 0, 1, 1);
- layout->addWidget(verbosityBox, 1, 2);
- layout->addWidget(saveLogButton, 2, 0);
- layout->addWidget(clearButton, 2, 1);
- layout->addWidget(closeButton, 2, 2);
-
- connect( closeButton, SIGNAL( clicked() ) ,
- this, SLOT( onCloseButton()));
- connect( clearButton, SIGNAL( clicked() ) ,
- this, SLOT( onClearButton()));
- connect( saveLogButton, SIGNAL( clicked() ) ,
- this, SLOT( onSaveButton()));
- connect( verbosityBox, SIGNAL( valueChanged(int) ),
- this, SLOT( onVerbosityChanged(int)));
- connect( DialogsProvider::getInstance(NULL)->fixed_timer,
- SIGNAL( timeout() ), this, SLOT(updateLog() ) );
-
- p_input = NULL;
+ messages->setReadOnly( true );
+ messages->setGeometry( 0, 0, 440, 600 );
+ messages->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
+ messages->setTextInteractionFlags( Qt::TextSelectableByMouse );
+
+ msgLayout->addWidget( messages, 0, 0, 1, 0 );
+ mainTab->addTab( msgWidget, qtr( "Messages" ) );
+
+
+ /* Modules tree */
+ QWidget *treeWidget = new QWidget;
+ QGridLayout *treeLayout = new QGridLayout( treeWidget );
+
+ modulesTree = new QTreeWidget();
+ modulesTree->header()->hide();
+
+ treeLayout->addWidget( modulesTree, 0, 0, 1, 0 );
+ mainTab->addTab( treeWidget, qtr( "Modules tree" ) );
+
+
+ /* Buttons and general layout */
+ QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
+ closeButton->setDefault( true );
+ clearUpdateButton = new QPushButton( qtr( "C&lear" ) );
+ saveLogButton = new QPushButton( qtr( "&Save as..." ) );
+ saveLogButton->setToolTip( qtr( "Saves all the displayed logs to a file" ) );
+
+ verbosityBox = new QSpinBox();
+ verbosityBox->setRange( 0, 2 );
+ verbosityBox->setValue( var_InheritInteger( p_intf, "verbose" ) );
+ verbosityBox->setWrapping( true );
+ verbosityBox->setMaximumWidth( 50 );
+
+ verbosityLabel = new QLabel( qtr( "Verbosity Level" ) );
+
+ vbobjectsEdit = new QLineEdit();
+
+ vbobjectsEdit->setMaximumWidth( 100 );
+ vbobjectsEdit->setText(config_GetPsz( p_intf, "verbose-objects"));
+ vbobjectsEdit->setToolTip( "verbose-objects usage: \n"
+ "--verbose-objects=+printthatobject,-dontprintthatone\n"
+ "(keyword 'all' to applies to all objects)");
+
+ vbobjectsLabel = new QLabel( qtr( "Message filter" ) );
+
+ mainLayout->addWidget( mainTab, 0, 0, 1, 0 );
+ mainLayout->addWidget( verbosityLabel, 1, 0, 1, 1 );
+ mainLayout->addWidget( verbosityBox, 1, 1 );
+ mainLayout->addWidget( vbobjectsLabel, 1, 2, 1, 1 );
+ mainLayout->addWidget( vbobjectsEdit, 1, 3 );
+ mainLayout->setColumnStretch( 4, 10 );
+ mainLayout->addWidget( saveLogButton, 1, 5 );
+ mainLayout->addWidget( clearUpdateButton, 1, 6 );
+ mainLayout->addWidget( closeButton, 1, 7 );
+
+ BUTTONACT( closeButton, hide() );
+ BUTTONACT( clearUpdateButton, clearOrUpdate() );
+ BUTTONACT( saveLogButton, save() );
+ CONNECT( mainTab, currentChanged( int ),
+ this, updateTab( int ) );
+ CONNECT(vbobjectsEdit, editingFinished(), this, updateConfig());
+ CONNECT( verbosityBox, valueChanged( int ),
+ this, changeVerbosity( int ) );
+
+ /* General action */
+ readSettings( "Messages", QSize( 600, 450 ) );
+
+
+ /* Hook up to LibVLC messaging */
+ cbData = new msg_cb_data_t;
+ cbData->self = this;
+ sub = msg_Subscribe( p_intf->p_libvlc, MsgCallback, cbData );
+ changeVerbosity( verbosityBox->value() );