Ignore:
Timestamp:
Nov 9, 2009, 6:56:57 PM (16 years ago)
Author:
garnier
Message:

mise en place de Vis dans UI

Location:
trunk/source/interfaces/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/interfaces/common/include/G4Qt.hh

    r1155 r1158  
    3939#include "G4VInteractorManager.hh"
    4040
     41class G4UIQt;
     42class QWidget;
     43class QString;
     44
    4145// Class description :
    4246//
     
    5660  void FlushAndWaitExecution();
    5761  virtual ~G4Qt();                     
     62  bool AddTabVisWidget(QWidget*,QString);
     63  void SetG4UI(G4UIQt*);
     64
    5865private:
    5966  G4Qt (int,char**,char*);                     
     
    6168  int    argn;
    6269  char** args;
     70  G4UIQt* fG4UI;
    6371};
    6472
  • trunk/source/interfaces/common/src/G4Qt.cc

    r1155 r1158  
    3838
    3939#include "G4Qt.hh"
     40#include "G4UIQt.hh"
     41#include <qwidget.h>
    4042
    4143#include <qapplication.h>
     
    6668    instance = new G4Qt(a_argn,a_args,a_class);
    6769  }
     70#ifdef G4DEBUG_INTERFACES_COMMON
     71    printf("G4Qt::getInstance :%d\n",instance);
     72#endif
    6873  return instance;
    6974}
     
    143148#ifdef G4DEBUG_INTERFACES_COMMON
    144149  if (qApp) {
    145     printf("G4Qt::qApp exist\n");
     150    printf("G4Qt::qApp exist adress:%d\n",this);
    146151  }  else {
    147152    printf("G4Qt::qApp not exist\n");
     
    198203}
    199204
    200 #endif
    201 
    202 
    203 
     205/***************************************************************************/
     206void G4Qt::SetG4UI (
     207 G4UIQt* ui
     208)
     209/***************************************************************************/
     210/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
     211{
     212  fG4UI = ui;
     213}
     214
     215/***************************************************************************/
     216bool G4Qt::AddTabVisWidget (
     217 QWidget * vis
     218 ,QString name
     219)
     220/***************************************************************************/
     221/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
     222{
     223  if (fG4UI) {
     224    fG4UI->AddTabVisWidget(vis,name);
     225    return true;
     226  }
     227  return false;
     228}
     229#endif
     230
     231
     232
Note: See TracChangeset for help on using the changeset viewer.