Version: 9.15.0
gui.Appli.Browser Class Reference
Inheritance diagram for gui.Appli.Browser:
Collaboration diagram for gui.Appli.Browser:

Public Member Functions

def __init__ (self, parent, proc)
 
def view_log (self)
 
def onDblSelect (self, item)
 
def onSelect (self, item)
 
def customEvent (self, ev)
 
def run (self)
 
def susp (self)
 
def step (self)
 
def stop (self)
 

Public Attributes

 proc
 
 pproc
 
 hSplitter
 
 objectBrowser
 
 panelManager
 
 boxManager
 
 selected
 
 executor
 
 resume
 
 thr
 
 log
 

Detailed Description

Definition at line 62 of file Appli.py.

Constructor & Destructor Documentation

◆ __init__()

def gui.Appli.Browser.__init__ (   self,
  parent,
  proc 
)

Definition at line 63 of file Appli.py.

63  def __init__(self,parent,proc):
64  QVBox.__init__(self,parent)
65  pp=Item.adapt(proc)
66  self.proc=proc
67  self.pproc=pp
68  self.hSplitter = QSplitter(self,"hSplitter")
69  self.objectBrowser=Tree.Tree(self.hSplitter,self.onSelect,self.onDblSelect)
70  self.objectBrowser.additem(pp)
71  self.panelManager=PanelManager.PanelManager(self.hSplitter)
72  self.panelManager.setRootItem(pp)
73  self.boxManager=BoxManager.BoxManager(self.hSplitter)
74  self.boxManager.setRootItem(pp)
75  self.selected=None
76  self.executor=None
77  self.resume=0
78  self.thr=None
79  self.log=logview.LogView()
80 

Member Function Documentation

◆ customEvent()

def gui.Appli.Browser.customEvent (   self,
  ev 
)

Definition at line 93 of file Appli.py.

93  def customEvent(self,ev):
94  if ev.type() == 8888:
95  ev.process(self)
96 

◆ onDblSelect()

def gui.Appli.Browser.onDblSelect (   self,
  item 
)

Definition at line 85 of file Appli.py.

85  def onDblSelect(self,item):
86  #item is instance of Item.Item
87  pass
88 

Referenced by gui.Tree.Tree.handleDblSelected().

◆ onSelect()

def gui.Appli.Browser.onSelect (   self,
  item 
)

Definition at line 89 of file Appli.py.

89  def onSelect(self,item):
90  #item is instance of Item.Item
91  self.selected=item
92 

Referenced by gui.Tree.Tree.handleSelected().

◆ run()

def gui.Appli.Browser.run (   self)

Definition at line 97 of file Appli.py.

97  def run(self):
98  if not self.executor:
99  self.executor = pilot.ExecutorSwig()
100  if self.thr and self.thr.isAlive():
101  return
102  #continue execution mode
103  self.executor.setExecMode(0)
104  #execute it in a thread
105  self.thr = Runner(self, self.executor, self.proc)
106  #as a daemon (no need to join)
107  self.thr.setDaemon(1)
108  #start the thread
109  self.thr.start()
110  time.sleep(0.1)
111  self.resume=0
112 
void * run(void *obj)
Definition: yacs_clt.cxx:54

References gui.Appli.Runner.executor, gui.Appli.Browser.executor, gui.Appli.Appli.executor, gui.Appli.Runner.proc, gui.Appli.Browser.proc, YACS::roottypeParser.proc(), YACS::ENGINE::Executor.resume(), gui.Appli.Browser.resume, and gui.Appli.Browser.thr.

◆ step()

def gui.Appli.Browser.step (   self)
Step on a paused schema

Definition at line 131 of file Appli.py.

131  def step(self):
132  """Step on a paused schema"""
133  if not self.executor:
134  self.executor = pilot.ExecutorSwig()
135  if not self.thr or not self.thr.isAlive():
136  #start in step by step mode
137  self.executor.setExecMode(1)
138  self.thr = Runner(self, self.executor, self.proc)
139  self.thr.setDaemon(1)
140  self.thr.start()
141  self.resume=1
142  return
143 
144  #step by step execution mode
145  self.resume=1
146  self.executor.setExecMode(1)
147  #resume it
148  self.executor.resumeCurrentBreakPoint()
149 

References gui.Appli.Runner.executor, gui.Appli.Browser.executor, gui.Appli.Appli.executor, gui.Appli.Runner.proc, gui.Appli.Browser.proc, YACS::roottypeParser.proc(), YACS::ENGINE::Executor.resume(), gui.Appli.Browser.resume, and gui.Appli.Browser.thr.

◆ stop()

def gui.Appli.Browser.stop (   self)
Stop the schema

Definition at line 150 of file Appli.py.

150  def stop(self):
151  """Stop the schema"""
152  if not self.executor:
153  return
154  if not self.thr.isAlive():
155  return
156  self.executor.setExecMode(1)
157  self.executor.waitPause()
158  self.executor.resumeCurrentBreakPoint()
159  #self.executor.stopExecution()
160 

References gui.Appli.Runner.executor, gui.Appli.Browser.executor, gui.Appli.Appli.executor, and gui.Appli.Browser.thr.

◆ susp()

def gui.Appli.Browser.susp (   self)
Suspend or resume an executing schema

Definition at line 113 of file Appli.py.

113  def susp(self):
114  """Suspend or resume an executing schema"""
115  if not self.executor:
116  return
117  if not self.thr.isAlive():
118  return
119 
120  if self.resume:
121  #continue execution mode
122  self.executor.setExecMode(0)
123  #resume it
124  self.executor.resumeCurrentBreakPoint()
125  self.resume=0
126  else:
127  #step by step execution mode
128  self.executor.setExecMode(1)
129  self.resume=1
130 

References gui.Appli.Runner.executor, gui.Appli.Browser.executor, gui.Appli.Appli.executor, YACS::ENGINE::Executor.resume(), gui.Appli.Browser.resume, and gui.Appli.Browser.thr.

◆ view_log()

def gui.Appli.Browser.view_log (   self)

Definition at line 81 of file Appli.py.

81  def view_log(self):
82  self.log.text.setText(self.proc.getLogger("parser").getStr())
83  self.log.show()
84 

References YACS::ENGINE::Logger.log(), gui.Appli.Browser.log, gui.Appli.Runner.proc, gui.Appli.Browser.proc, and YACS::roottypeParser.proc().

Member Data Documentation

◆ boxManager

gui.Appli.Browser.boxManager

Definition at line 73 of file Appli.py.

◆ executor

gui.Appli.Browser.executor

◆ hSplitter

gui.Appli.Browser.hSplitter

Definition at line 68 of file Appli.py.

Referenced by gui.browser_catalog.Browser.init().

◆ log

gui.Appli.Browser.log

Definition at line 79 of file Appli.py.

Referenced by gui.Appli.Browser.view_log().

◆ objectBrowser

gui.Appli.Browser.objectBrowser

Definition at line 69 of file Appli.py.

◆ panelManager

gui.Appli.Browser.panelManager

Definition at line 71 of file Appli.py.

◆ pproc

gui.Appli.Browser.pproc

Definition at line 67 of file Appli.py.

◆ proc

gui.Appli.Browser.proc

◆ resume

gui.Appli.Browser.resume

Definition at line 77 of file Appli.py.

Referenced by gui.Appli.Browser.run(), gui.Appli.Browser.step(), and gui.Appli.Browser.susp().

◆ selected

gui.Appli.Browser.selected

◆ thr

gui.Appli.Browser.thr

The documentation for this class was generated from the following file: