_tabWidget->addTab( _clients, tr( "Running" ) );
_tabWidget->addTab( _history, tr( "History" ) );
connect( _tabWidget, SIGNAL( currentChanged( QWidget* )), this, SLOT( slotListeSelect() ) );
- connect( _clients, SIGNAL( clicked( QTreeWidgetItem* ) ), this, SLOT( slotClientChanged( QTreeWidgetItem* ) ) );
- connect( _history, SIGNAL( clicked( QTreeWidgetItem* ) ), this, SLOT( slotHistoryChanged( QTreeWidgetItem* ) ) );
+ connect( _clients, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( slotClientChanged( QTreeWidgetItem* , int ) ) );
+ connect( _history, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( slotHistoryChanged( QTreeWidgetItem* , int ) ) );
setCentralWidget( _tabWidget );
// Timer definition (used to automaticaly refresh the display area)
setGeometry( xpos, ypos, largeur, hauteur ) ;
setWindowTitle( tr( "Registry" ) ) ;
statusBar()->showMessage(" ");
+
+ slotListeSelect();
}
/*!
else if ( object == _clients && event->type() == QEvent::KeyPress ) {
QKeyEvent* ke = (QKeyEvent*)event;
if ( ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return ) {
- slotClientChanged( _clients->currentItem() );
+ slotClientChanged( _clients->currentItem(), 0 );
}
}
else if ( object == _history && event->type() == QEvent::KeyPress ) {
QKeyEvent* ke = (QKeyEvent*)event;
if ( ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return ) {
- slotHistoryChanged( _history->currentItem() );
+ slotHistoryChanged( _history->currentItem(), 0 );
}
}
}
\brief Called when user clicks on item in \c Running list
\param item item clicked by the user
*/
-void ToolsGUI_RegWidget::slotClientChanged( QTreeWidgetItem* item )
+void ToolsGUI_RegWidget::slotClientChanged( QTreeWidgetItem* item, int col )
{
- if ( item <= 0)
+ if ( !item || col < 0 )
return;
blockSignals( true ); // for sure that item will not be deleted when refreshing
\brief Called when user clicks on item in \c History list
\param item item clicked by the user
*/
-void ToolsGUI_RegWidget::slotHistoryChanged( QTreeWidgetItem* item )
+void ToolsGUI_RegWidget::slotHistoryChanged( QTreeWidgetItem* item, int col )
{
- if ( item <= 0)
+ if ( !item || col < 0 )
return;
blockSignals( true ); // for sure that item will not be deleted when refreshing