Ejemplo n.º 1
0
Archivo: slaveTab.py Proyecto: hdd/drQt
 def _set_values(self):
     self._tab_id.setText("%d"%self._drq_node_object.hwinfo.id)
     self._tab_name.setText("%s"%self._drq_node_object.hwinfo.name)
     self._tab_enabled.setPixmap( self.icons[self._drq_node_object.limits.enabled].scaled(25,25))
     
     self._tab_loadavg.setText("%d:%d:%d"%(self._drq_node_object.status.get_loadavg(0),
                                           self._drq_node_object.status.get_loadavg(1),
                                           self._drq_node_object.status.get_loadavg(2)))
     
     self._tab_os.setText("%s"%drqueue.osstring(self._drq_node_object.hwinfo.os))
     self._tab_cpus.setText("%d"%self._drq_node_object.hwinfo.ncpus)
     
     for i in range(self._drq_node_object.limits.npools):
         pool = self._drq_node_object.limits.get_pool(i).name
         self._tab_pools.addItem("%s"%pool)
Ejemplo n.º 2
0
Archivo: slaveTab.py Proyecto: hdd/drQt
 def _set_tooltip(self):
     html_tooltip=open(os.path.join(tooltips_path,"node_info.html"),"r")
     tooltipData ={}
     tooltipData["id"]=self._drq_node_object.hwinfo.id
     tooltipData["arch"]=drqueue.archstring(self._drq_node_object.hwinfo.arch)
     tooltipData["memory"]=self._drq_node_object.hwinfo.memory
     tooltipData["name"]=self._drq_node_object.hwinfo.name
     tooltipData["ncpus"]=self._drq_node_object.hwinfo.ncpus
     tooltipData["nnbits"]=drqueue.bitsstring(self._drq_node_object.hwinfo.nnbits)
     tooltipData["os"]=drqueue.osstring(self._drq_node_object.hwinfo.os)
     tooltipData["procspeed"]=self._drq_node_object.hwinfo.procspeed
     tooltipData["proctype"]=drqueue.proctypestring(self._drq_node_object.hwinfo.proctype)
     tooltipData["speedindex"]=self._drq_node_object.hwinfo.speedindex
     
     formattedTolltip=str(html_tooltip.read()).format(**tooltipData)
     
     for column in self.columns:
         column.setToolTip(formattedTolltip)