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

Public Member Functions

def __init__
 
def view_log
 
def onDblSelect
 
def onSelect
 
def customEvent
 
def run
 
def susp
 
def step
 
def stop
 

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

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

Definition at line 63 of file Appli.py.

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

Member Function Documentation

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

Definition at line 93 of file Appli.py.

93 
94  def customEvent(self,ev):
95  if ev.type() == 8888:
96  ev.process(self)
def gui.Appli.Browser.onDblSelect (   self,
  item 
)

Definition at line 85 of file Appli.py.

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

Definition at line 89 of file Appli.py.

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

Definition at line 97 of file Appli.py.

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

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

Definition at line 131 of file Appli.py.

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

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

Definition at line 150 of file Appli.py.

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

151  def stop(self):
152  """Stop the schema"""
153  if not self.executor:
154  return
155  if not self.thr.isAlive():
156  return
157  self.executor.setExecMode(1)
158  self.executor.waitPause()
159  self.executor.resumeCurrentBreakPoint()
160  #self.executor.stopExecution()
def gui.Appli.Browser.susp (   self)
Suspend or resume an executing schema

Definition at line 113 of file Appli.py.

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

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

Definition at line 81 of file Appli.py.

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

Member Data Documentation

gui.Appli.Browser.boxManager

Definition at line 73 of file Appli.py.

gui.Appli.Browser.executor

Definition at line 76 of file Appli.py.

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

gui.Appli.Browser.hSplitter

Definition at line 68 of file Appli.py.

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

gui.Appli.Browser.log

Definition at line 79 of file Appli.py.

gui.Appli.Browser.objectBrowser

Definition at line 69 of file Appli.py.

gui.Appli.Browser.panelManager

Definition at line 71 of file Appli.py.

gui.Appli.Browser.pproc

Definition at line 67 of file Appli.py.

gui.Appli.Browser.proc

Definition at line 66 of file Appli.py.

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

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().

gui.Appli.Browser.selected

Definition at line 75 of file Appli.py.

Referenced by gui.browser_catalog.Browser.handleBut1(), gui.Appli.Browser.onSelect(), and gui.GraphViewer.GraphViewer.selectItem().

gui.Appli.Browser.thr

Definition at line 78 of file Appli.py.

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


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