def __init__(self,parent,text,item,after=None): if after is None: QListViewItem.__init__(self,parent,text) else: QListViewItem.__init__(self,parent,after,text) self.item=item self.setPixmap(0,Icons.get_image(item.getIconName())) self.setExpandable(self.item.isExpandable()) self.children = []
def initActions(self): self.actions = [] self.newAct=QAction('New', QIconSet(Icons.get_image("new")), '&New', QKeySequence("CTRL+N"),self) self.newAct.setStatusTip('Open an empty editor window') self.newAct.setWhatsThis( """<b>New</b>""" """<p>An empty editor window will be created.</p>""") self.newAct.connect(self.newAct,SIGNAL('activated()'), self.newProc) self.actions.append(self.newAct) self.prefAct=QAction('Preferences',QIconSet(Icons.get_image("configure.png")),'&Preferences...', 0, self) self.prefAct.setStatusTip('Set the prefered configuration') self.prefAct.setWhatsThis("""<b>Preferences</b>""" """<p>Set the configuration items of the application""" """ with your prefered values.</p>""") self.prefAct.connect(self.prefAct,SIGNAL('activated()'), self.handlePreferences) self.actions.append(self.prefAct) self.runAct=QAction('Run',QIconSet(Icons.get_image("run.png")),'&Run',0,self) self.runAct.connect(self.runAct,SIGNAL('activated()'), self.run) self.runAct.setStatusTip('Run the selected schema') self.actions.append(self.runAct) self.suspAct=QAction('Suspend/resume',QIconSet(Icons.get_image("suspend-resume.gif")),'&Suspend/resume',0,self) self.suspAct.connect(self.suspAct,SIGNAL('activated()'), self.susp) self.suspAct.setStatusTip('Suspend/resume the selected schema') self.actions.append(self.suspAct) self.stepAct=QAction('Step',QIconSet(Icons.get_image("steps.png")),'&Step',0,self) self.stepAct.connect(self.stepAct,SIGNAL('activated()'), self.step) self.stepAct.setStatusTip('Step the selected schema') self.actions.append(self.stepAct) self.stopAct=QAction('Stop',QIconSet(Icons.get_image("kill.png")),'&Stop',0,self) self.stopAct.connect(self.stopAct,SIGNAL('activated()'), self.stop) self.stopAct.setStatusTip('Stop the selected schema') self.actions.append(self.stopAct) self.cataToolAct=QAction('Catalog Tool',0,self,"catatool") self.cataToolAct.connect(self.cataToolAct,SIGNAL('activated()'), self.cata_tool) self.actions.append(self.cataToolAct)