Ignore:
Timestamp:
Sep 17, 2007, 12:10:51 PM (17 years ago)
Author:
garnier
Message:

r588@mac-90108: laurentgarnier | 2007-09-17 12:13:07 +0200
debut de correction du ticket #68

Location:
trunk/geant4/interfaces/basic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/interfaces/basic/include/G4UIQt.hh

    r528 r575  
    132132  void CommandEnteredCallback();
    133133  void ButtonCallback(const QString&);
    134   void HelpTreeCallback();
     134  void HelpTreeClicCallback();
     135  void HelpTreeDoubleClicCallback();
    135136  void ShowHelpCallback();
    136137  void CommandHistoryCallback();
  • trunk/geant4/interfaces/basic/src/G4UIQt.cc

    r571 r575  
    296296  if (!aString) return 0;
    297297  printf(" **************** G4 Cout : %s \n",(char*)aString.data());
    298   //  fTextArea->append(QString((char*)aString.data()).trimmed());
    299   //  fTextArea->verticalScrollBar()->setSliderPosition(fTextArea->verticalScrollBar()->maximum());
     298  fTextArea->append(QString((char*)aString.data()).trimmed());
     299  fTextArea->verticalScrollBar()->setSliderPosition(fTextArea->verticalScrollBar()->maximum());
    300300  return 0;
    301301}
     
    422422    fHelpTreeWidget->insertTopLevelItems(0, items);
    423423
    424     connect(fHelpTreeWidget, SIGNAL(itemSelectionChanged ()),this, SLOT(HelpTreeCallback())); 
     424    connect(fHelpTreeWidget, SIGNAL(itemSelectionChanged ()),this, SLOT(HelpTreeClicCallback())); 
     425    connect(fHelpTreeWidget, SIGNAL(itemDoubleClicked ()),this, SLOT(HelpTreeDoubleClicCallback())); 
    425426
    426427    // Set layouts
     
    480481
    481482      // Call the update of the right textArea
    482       HelpTreeCallback();
     483      HelpTreeClicCallback();
    483484    }
    484485  }
     
    785786/**   This callback is activated when user selected a item in the help tree
    786787*/
    787 void G4UIQt::HelpTreeCallback (
     788void G4UIQt::HelpTreeClicCallback (
    788789)
    789790{
     
    815816}
    816817
     818/**   This callback is activated when user double clic on a item in the help tree
     819*/
     820void G4UIQt::HelpTreeDoubleClicCallback (
     821)
     822{
     823  // update the helpArea
     824  HelpTreeClicCallback();
     825
     826  QTreeWidgetItem* item =  NULL;
     827  if (!fHelpTreeWidget)
     828    return ;
     829
     830  if (!fHelpArea)
     831    return;
     832 
     833  QList<QTreeWidgetItem *> list =fHelpTreeWidget->selectedItems();
     834  if (list.isEmpty())
     835    return;
     836  item = list.first();
     837  if (!item)
     838    return;
     839
     840  fCommandArea->setText(item->text (1));
     841}
     842
    817843
    818844/**   Callback called when user select an old command in the command history<br>
Note: See TracChangeset for help on using the changeset viewer.