- 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 );
+
+ msgLayout->addWidget( messages, 0, 0, 1, 0 );
+ mainTab->addTab( msgWidget, qtr( "Messages" ) );
+ ON_TIMEOUT( updateLog() );
+
+
+ /* 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( "&Clear" ) );
+ saveLogButton = new QPushButton( qtr( "&Save as..." ) );
+
+ verbosityBox = new QSpinBox();
+ verbosityBox->setRange( 0, 2 );
+ verbosityBox->setValue( config_GetInt( p_intf, "verbose" ) );
+ verbosityBox->setWrapping( true );
+ verbosityBox->setMaximumWidth( 50 );
+
+ verbosityLabel = new QLabel( qtr( "Verbosity Level" ) );
+
+ mainLayout->addWidget( mainTab, 0, 0, 1, 0 );
+ mainLayout->addWidget( verbosityLabel, 1, 0, 1, 1 );
+ mainLayout->addWidget( verbosityBox, 1, 1 );
+ mainLayout->addWidget( saveLogButton, 1, 3 );
+ mainLayout->addWidget( clearUpdateButton, 1, 4 );
+ mainLayout->addWidget( closeButton, 1, 5 );
+
+ BUTTONACT( closeButton, hide() );
+ BUTTONACT( clearUpdateButton, clearOrUpdate() );
+ BUTTONACT( saveLogButton, save() );
+ CONNECT( mainTab, currentChanged( int ),
+ this, updateTab( int ) );
+
+ /* General action */
+ readSettings( "Messages", QSize( 600, 450 ) );