Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

Location:
trunk/source/interfaces
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/interfaces/CVS/Entries

    r1337 r1340  
    44/CMakeLists.txt/1.1/Wed Sep 29 18:45:30 2010//
    55/GNUmakefile/1.7/Thu Sep 30 06:11:40 2010//
    6 /History/1.153/Thu Sep 30 11:54:02 2010//
     6/History/1.156/Fri Oct  8 10:14:53 2010//
  • trunk/source/interfaces/History

    r1325 r1340  
    1 $Id: History,v 1.153 2010/06/23 13:06:16 lgarnier Exp $
     1$Id: History,v 1.156 2010/10/08 10:14:53 lgarnier Exp $
    22-------------------------------------------------------------------
    33
     
    1818     ----------------------------------------------------------
    1919
     208, October L. Garnier
     21- G4UIQt : Fiw problem with redraw of help tree
     22
     236, October J. Allison  (interfaces-V09-03-12)
     24- G4UIQt : Remove message about empty viewer (comment out
     25           fEmptyViewerTabLabel - suggested by Laurent).
     26
     275, June L. Garnier
     28- G4UIQt : Fix some bug on helpTree view
     29
    203023, June L. Garnier
    2131- G4UIQt : Fix compilation warnings on Qt3 and Qt4
  • trunk/source/interfaces/basic/GNUmakefile

    r1337 r1340  
    1313
    1414# For debug mode
    15 # CPPFLAGS += -DG4DEBUG_INTERFACES_BASIC
     15CPPFLAGS += -DG4DEBUG_INTERFACES_BASIC
    1616
    1717include $(G4INSTALL)/config/architecture.gmk
  • trunk/source/interfaces/basic/src/CVS/Entries

    r1337 r1340  
    77/G4UIterminal.cc/1.28/Thu Sep 30 06:11:43 2010//
    88/G4VUIshell.cc/1.10/Thu Sep 30 06:11:43 2010//
    9 /G4UIQt.cc/1.49/Thu Sep 30 11:54:07 2010//
     9/G4UIQt.cc/1.53/Tue Nov  2 15:38:51 2010//
    1010D
  • trunk/source/interfaces/basic/src/G4UIQt.cc

    r1335 r1340  
    2525//
    2626//
    27 // $Id: G4UIQt.cc,v 1.49 2010/06/23 13:06:16 lgarnier Exp $
     27// $Id: G4UIQt.cc,v 1.53 2010/11/02 15:38:51 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    3131
    3232#ifdef G4UI_BUILD_QT_SESSION
    33 
    34 //#define QT_CONNECT_TEST 1
    3533
    3634#include "G4Types.hh"
     
    109107,char** argv
    110108)
    111 :fG4cout("")
     109:fHelpArea(NULL)
     110,fG4cout("")
    112111,fHelpTreeWidget(NULL)
    113112,fHelpTBWidget(NULL)
     
    116115,fVisParametersTBWidget(NULL)
    117116,fViewComponentsTBWidget(NULL)
     117,fHelpLine(NULL)
    118118,fTabWidget(NULL)
    119119,fCoutText("Output")
     
    508508)
    509509{
    510 #ifdef QT_CONNECT_TEST
    511   bool shouldConnect = false;
    512 #endif
    513 
    514510#ifdef G4DEBUG_INTERFACES_BASIC
    515511  printf("G4UIQt::AddTabWidget %d %d\n",sizeX, sizeY);
     
    541537    fTabWidget->setSizePolicy(policy);
    542538   
    543 #ifdef QT_CONNECT_TEST
    544     shouldConnect = true;
    545 #else
    546539#if QT_VERSION >= 0x040500
    547540    connect(fTabWidget,   SIGNAL(tabCloseRequested(int)), this, SLOT(TabCloseCallback(int)));
    548541#endif
    549542    connect(fTabWidget, SIGNAL(currentChanged ( int ) ), SLOT(UpdateTabWidget(int)));
    550 #endif
    551 
    552543  }
    553544
     
    602593    int tabBarY = 0;
    603594    if (fTabWidget->count() >0) {
    604 #ifdef G4DEBUG_INTERFACES_BASIC
    605   printf("G4UIQt::AddTabWidget -1-1-1\n");
    606 #endif
    607 
    608595#if QT_VERSION < 0x040000
    609596      tabBarX = fTabWidget->width()-fTabWidget->page(0)->width();
     
    615602    }
    616603
    617 #ifdef G4DEBUG_INTERFACES_BASIC
    618   printf("G4UIQt::AddTabWidget 00000\n");
    619 #endif
    620 
    621604    fMainWindow->resize(tabBarX+fMainWindow->width()+sizeX-fTabWidget->width(),tabBarY+fMainWindow->height()+sizeY-fTabWidget->height());
    622605  }
    623606
    624 #ifdef G4DEBUG_INTERFACES_BASIC
    625   printf("G4UIQt::AddTabWidget 1111111\n");
    626 #endif
    627607  // Problems with resize. The widgets are not realy drawn at this step,
    628608  // then we have to force them on order to check the size
     
    634614#endif
    635615 
    636 #ifdef G4DEBUG_INTERFACES_BASIC
    637   printf("G4UIQt::AddTabWidget 222222\n");
    638 #endif
    639616#if QT_VERSION < 0x040000
    640617  fTabWidget->setCurrentPage(fTabWidget->count()-1);
     
    643620#endif
    644621
    645 #ifdef G4DEBUG_INTERFACES_BASIC
    646   printf("G4UIQt::AddTabWidget 333333\n");
    647 #endif
    648622  // Set visible
    649623#if QT_VERSION >= 0x040000
     
    657631#endif
    658632 
    659 #ifdef G4DEBUG_INTERFACES_BASIC
    660   printf("G4UIQt::AddTabWidget -------\n");
    661 #endif
    662 #ifdef QT_CONNECT_TEST
    663   if (shouldConnect) {
    664 #if QT_VERSION >= 0x040500
    665     connect(fTabWidget,   SIGNAL(tabCloseRequested(int)), this, SLOT(TabCloseCallback(int)));
    666 #endif
    667     connect(fTabWidget, SIGNAL(currentChanged ( int ) ), SLOT(UpdateTabWidget(int)));
    668   }
    669 #endif
    670633  return true;
    671634}
     
    755718        visible = true;
    756719      }
    757     }
    758     if (visible) {
    759 #if QT_VERSION >= 0x040000
    760   #if QT_VERSION >= 0x040200
    761       fEmptyViewerTabLabel->setVisible(false);
    762   #else
    763       fEmptyViewerTabLabel->hide();
    764   #endif
    765 #else
    766       fEmptyViewerTabLabel->hide();
    767 #endif
    768     } else {
    769 #if QT_VERSION >= 0x040000
    770   #if QT_VERSION >= 0x040200
    771       fEmptyViewerTabLabel->setVisible(true);
    772   #else
    773       fEmptyViewerTabLabel->show();
    774   #endif
    775 #else
    776       fEmptyViewerTabLabel->show();
    777 #endif
    778720    }
    779721  }
     
    11501092  if (! fHelpTreeWidget ) {
    11511093    InitHelpTree();
     1094  }
     1095
     1096  QString searchText = fHelpLine->text();
     1097
     1098  if (searchText =="") {
     1099    // clear old help tree
     1100    //    fHelpTreeWidget->clear();
     1101#if QT_VERSION < 0x040000
     1102    fHelpTreeWidget->removeColumn(1);
     1103    fHelpTreeWidget->removeColumn(0);
     1104#endif
     1105  } else {
     1106    return;
     1107  }
     1108
     1109  if (fHelpArea) {
     1110#if QT_VERSION < 0x040200
     1111    fHelpArea->clear();
     1112#else
     1113    fHelpArea->setText("");
     1114#endif
     1115  }
     1116
     1117  if (fHelpLine) {
     1118#if QT_VERSION < 0x040200
     1119    fHelpLine->clear();
     1120#else
     1121    fHelpLine->setText("");
     1122#endif
    11521123  }
    11531124
     
    18641835)
    18651836{
    1866 
    18671837  // the help tree
    18681838  G4UImanager* UI = G4UImanager::GetUIpointer();
     
    19861956#if QT_VERSION < 0x040000
    19871957    newItem = new QListViewItem(fHelpTreeWidget);
    1988     newItem->setText(0,i.data().simplifyWhiteSpace());
     1958    QString commandStr = i.data().simplifyWhiteSpace();
    19891959#else
    19901960    newItem = new QTreeWidgetItem(fHelpTreeWidget);
    1991     newItem->setText(0,i.value().trimmed());
    1992 #endif
     1961    QString commandStr = i.value().trimmed();
     1962#endif
     1963
     1964#if QT_VERSION < 0x040000
     1965    if (commandPath.find("/") == 0) {
     1966      commandStr = commandStr.right(commandStr.length()-1);
     1967#else
     1968    if (commandStr.indexOf("/") == 0) {
     1969      commandStr = commandStr.right(commandStr.size()-1);
     1970#endif
     1971    }
     1972     
     1973    newItem->setText(0,commandStr);
    19931974    newItem->setText(1,progressStr);
    19941975   
Note: See TracChangeset for help on using the changeset viewer.